Limiting 3rd party software per virtual host?

I have a webserver running Apache 1.3.23, with ActivePerl, a PHP module, ColdFusion, and ASP support. How do I disable specific virtual hosts from using these third party pieces of software?  For instance, I want one host to be able to use all of those types of files.  I want another to only be able to interpret PHP files, and another only ASP and ColdFusion.  Is Apache responsible for this delegation?
Who is Participating?
samriConnect With a Mentor Commented:
Perhaps you could try use Location directive in that particular VirtualHost container.

For example, if you want to deny php, pl, or asp, this might work.

    <Location /(*.php?|*.pl|*.asp?)>
        Deny from all

Next options is to use <Files> directive   within the VirtualHost.  An of course, you need to change the regex to match your filename/types.

--------excerpt from httpd.conf (Apache 1.3.22 Win32).
# The following lines prevent .htaccess files from being viewed by
# Web clients.  Since .htaccess files often contain authorization
# information, access is disallowed for security reasons.  Comment
# these lines out if you want Web visitors to see the contents of
# .htaccess files.  If you change the AccessFileName directive above,
# be sure to make the corresponding changes here.
# Also, folks tend to use names such as .htpasswd for password
# files, so this will protect those as well.
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all

Another option is to use mod_rewrite.  You can do the same thing in the VirtualHost container, and rewrite such request to other links.

Some examples are shown here, but not exactly as what you described.  Some minor adjustment to the code could achive the same purpose.  Pay extra attention at "Content Handling" section.

hope this helps

scotsmenAuthor Commented:
Good point.  I was worried about using handlers per specific vhost which I'm not sure is supported.  This solution is much easier (sigh -- and more obvious.)  Thanks!
Almost all apache directives can be used inside a VirtualHost container.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.