httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neil Marjoram <n.marjo...@vam.ac.uk>
Subject Re: [users@httpd] Help with Virtual Hosting
Date Wed, 04 Sep 2002 08:58:51 GMT
Owen,

Thanks for your reply, no your not missing anything! 

The ScriptAlias in the VH pointing at /www/cgi-bin does not work, it doesn't 
seem to matter if it is there or not, I was rather hoping to run Apache with 
only this ScriptAlias without the need for the ProxyPass /cgi-bin/ 
http://127.0.0.1:8081/cgi-bin/, but it is ignored, the server returns Not 
Found. I would have thought that it should work anyway as the ScriptAlias is 
set outside the VH in the main section, and  should not need to reference it 
again inside the VH unless it was different (which it isn't) but it still 
returns not found. The only way to get the cgi going is to use the ProxyPass, 
which of course points it back at the main server ScriptAlias!!
Interestingly the second vhost with a different ScriptAlias works fine!
I think I may have my ProxyPass statements in a pickle!!

Thanks,

Neil.

On Wednesday 04 September 2002 09:48, Boyle Owen wrote:
> 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, IMHO.
>
> Returning to your problem, you seem to be assigning the URL
> http://www.aname.ac.uk/cgi-bin/ to two resources: - /www/cgi-bin/ via the
> ScriptAlias directive and
> - http://127.0.0.1:8081/cgi-bin/ 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?
>
> Rgds,
>
> Owen Boyle
>
> >-----Original Message-----
>
> From: Neil Marjoram [mailto:n.marjoram@vam.ac.uk]
>
> >Sent: Mittwoch, 4. September 2002 10:22
> >To: users@httpd.apache.org
> >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.
> >
> >NameVirtualHost 172.16.49.53
> >-- <VirtualHost 172.16.49.53>
> >    ServerAdmin n.marjoram@vam.ac.uk
> >    DocumentRoot /www/htdocs
> >    ScriptAlias /cgi-bin/ /www/cgi-bin/ # Has no effect present or not
> >    ServerName www.aname.ac.uk
> >    CacheRoot "/var/cache/static"
> >    CacheSize 5
> >    CacheGcInterval 4
> >    CacheMaxExpire 24
> >    CacheLastModifiedFactor 0.1
> >    CacheDefaultExpire 1
> >    ProxyPass /cgi-bin/ http://127.0.0.1:8081/cgi-bin/	# This
> >line allows cgi
> >to run but above ScriptAlias has no effect
> >    ProxyPass /vastatic/ http://127.0.0.1:8081/vastatic/
> >    ProxyPass /Explorer/Virtual/forums/
> >http://www.aname.ac.uk:8081/Explorer/Virtual/forums/
> >    ProxyPass / http://oldserver.aname.ac.uk:8080/
> >    ErrorLog /var/log/httpd/httpd-www-error.log
> >    CustomLog /var/log/httpd/httpd-www-access.log common
> ></VirtualHost>
> >
> >
> ><VirtualHost 172.16.49.53>
> >    ServerAdmin n.marjoram@vam.ac.uk
> >    DocumentRoot /www/tm/docs
> >    ScriptAlias /cgi-bin/ /www/tm/cgi-bin/ # This works fine
> >    ServerName tm.aname.ac.uk
> >    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
> ></VirtualHost>
> >
> >Neil Marjoram.
> >Unix Systems Manager,
> >Victoria and Albert Museum,
> >Cromwell Road,
> >London.
> >
> >
> >
> >---------------------------------------------------------------------
> >The official User-To-User support forum of the Apache HTTP
> >Server Project.
> >See <URL:http://httpd.apache.org/userslist.html> for more info.
> >To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> >   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> >For additional commands, e-mail: users-help@httpd.apache.org
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org

-- 
Neil Marjoram.
Unix System Manager,
Victoria and Albert Museum,
Cromwell Road,
London.

020 7942 2342


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message