This is a discussion on Problem setting up additional cgi-bin directory on Apache 2 within the Linux Web Servers forums, part of the Web Server and Related Forums category; Hello, I have a problem with setting up an additional virtual host on my Apache 2.0.40 server, running ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hello,
I have a problem with setting up an additional virtual host on my Apache 2.0.40 server, running under Red Hat Linux 9. I have a standard server running on port 8080: ServerName www.mysite.com:8080 ....with standardly defined cgi-bin folder: ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" All this setup worked well until I added additional virtual host: NameVirtualHost *:8080 <VirtualHost *:8080> ServerName subdomain.mysite.com ScriptAlias /cgi-bin/ /usr/local/scripts/cgi-bin/ <Directory /usr/local/scripts/cgi-bin/> Options None AllowOverride None Order allow,deny Allow from all </Directory> </VirtualHost> Ok, this is a pretty stripped-out version, but the info should be enough. The problem is that when I restart Apache with this new configuration, my old cgi-bin scripts aren't available, only the new ones are. For example: http://www.mysite.com/cgi-bin/some-script.pl works before adding the new virtual host, and after adding the virtual host it gives an 404 ("Object not available"), while the new virtual host's is working perfectly, i.e. http://subdomain.mysite.com/cgi-bin/script.pl gives the wanted output. I can see from the httpd logs that the error is obviously in the configuration (the top-level site looks for its scripts in the cgi-bin folder of the virtual host, instead of its own). I can't see where the problem with my configuration is - the ScriptAlias and the associated folder for the top-level site -- www.mysite.com -- are configured ok and work until I include the additional virtual host. When I do that, only the scripts in the new virtual host's cgi-bin directory are mapped. I suspect there can be a problem with the /etc/hosts file: 127.0.0.1 localhost localhost.localdomain 67.57.47.37 www.mysite.com subdomain.mysite.com so I tried to remove the subdomain.mysite.com part, and still without results. Can somebody enlighten me? Thanks, Darko |