httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boyle Owen" <>
Subject RE: [users@httpd] Help with Virtual Hosting
Date Wed, 04 Sep 2002 08:48:30 GMT
First of all, as a matter of style, whenever you begin to use VirtualHosts, remove all VH-specfic
directives from the main config and assign them to a VH container. The only things outside
a VH should be those directives which apply to ALL VHs. This makes debugging much simpler,

Returning to your problem, you seem to be assigning the URL
to two resources:
- /www/cgi-bin/ via the ScriptAlias directive and
- via the ProxyPass directive.

There has to be a one-to-one mapping between URL and internal resource but you have two, therefore
a conflict - which resource is apache to choose? As it happens, it uses the later-defined
which is ProxyPass (if you reverse the order of the directives, my guess is that the ProxyPass
will stop working and apache will look in /www/cgi-bin...).

Perhaps I am misundertanding your requirements, but I can't figure out why you would assign
two resources to one URL? Am I missing something?


Owen Boyle

>-----Original Message-----
>From: Neil Marjoram []
>Sent: Mittwoch, 4. September 2002 10:22
>Subject: [users@httpd] Help with Virtual Hosting
>I applogise if this subject has been posted before, I am a new 
>member and have 
>missed it!
>I have a small problem with ScriptAlias and virtual hosts. I 
>currently run 
>Apache 1.3.6 on a Solaris system running a two vitual hosts, 
>one of which is 
>obsolete. These hosts were set up so that Apache could call 
>the content 
>management system using ProxyPass, and also some static pages we have 
>installed outside the content manager.
>I have recently installed a new system RH 7.3 with Apache 
>1.3.23 to replace 
>the old Solaris system. Again two virtual hosts have been 
>setup, one to call 
>the old content management system and serve the old static 
>site now installed 
>on the new system, the other for a new site on the same system. 
>Both these sites have their own cgi-bin and DocumentRoot. 
>Everything works 
>fine, except for ScriptAlias, the default ScriptAlias is set 
>to /www/cgi-bin, 
>which is the new cgi bin for the first site. This is also set 
>in the virtual 
>host section for the frst site, the second site is set within 
>it's virtual 
>host to /www/tm/cgi-bin. The second site works fine, but the 
>first does not 
>want to know, even when it is not specified in the virtual 
>host section ( I 
>would expect it then to take it from the server default). The 
>only difference 
>between the two v hosts is the use of ProxyPass. If I place a 
>ProxyPass back 
>to the localhost it works (as shown in extract) I have copied 
>out the section 
>in the httpd.conf file for the v hosts. Can anyone shed light 
>on my problem - 
>I guess I have scrambled the Proxy setup! Or perhaps this is how it is 
>suppose to work ?
>The cgi-directorys have ExecCGI set in the conf, the server listens on 
>locahost:8081 and port 80 to allow the ProxyPass.
>-- <VirtualHost>
>    ServerAdmin
>    DocumentRoot /www/htdocs
>    ScriptAlias /cgi-bin/ /www/cgi-bin/ # Has no effect present or not
>    ServerName
>    CacheRoot "/var/cache/static"
>    CacheSize 5
>    CacheGcInterval 4
>    CacheMaxExpire 24
>    CacheLastModifiedFactor 0.1
>    CacheDefaultExpire 1
>    ProxyPass /cgi-bin/	# This 
>line allows cgi 						
>to run but above ScriptAlias has no effect
>    ProxyPass /vastatic/
>    ProxyPass /Explorer/Virtual/forums/   
>    ProxyPass /
>    ErrorLog /var/log/httpd/httpd-www-error.log
>    CustomLog /var/log/httpd/httpd-www-access.log common
>    ServerAdmin
>    DocumentRoot /www/tm/docs
>    ScriptAlias /cgi-bin/ /www/tm/cgi-bin/ # This works fine
>    ServerName
>    CacheRoot "/var/cache/tm"
>    CacheSize 5
>    CacheGcInterval 4
>    CacheMaxExpire 24
>    CacheLastModifiedFactor 0.1
>    CacheDefaultExpire 1
>    ErrorLog /var/log/httpd/httpd-tm-error.log
>    CustomLog /var/log/httpd/httpd-tm-access.log common
>Neil Marjoram.
>Unix Systems Manager,
>Victoria and Albert Museum,
>Cromwell Road,
>The official User-To-User support forum of the Apache HTTP 
>Server Project.
>See <URL:> for more info.
>To unsubscribe, e-mail:
>   "   from the digest:
>For additional commands, e-mail:

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message