Forum Moderators: phranque
Here is the problem I have run into. I am running redhat 9 linux with apache 2 and i am trying to setup virtual hosts for 2 websites that each need their own cgi-bin folder. The default location when apache was set up was /var/www/cgi-bin for the cgifolder and /var/www/html for the html files. So to run 2 sites what i did was kept the "html" folder for one site and created another folder called "auctionb" for the second site. both folders reside in /var/www/ Then I copied the cgi-bin folder and pasted it in each site folder so the new cgi-bin locations are /var/www/html/cgi-bin/ and /var/www/auctionb/cgi-bin/. The problem is that the cgi files in the auctionb folder will not exeute. The html files will show up, so the virtualhost containers must be correct, but the cgi-bin is not being recognized. What did i miss? here is my virtual host layout.
NameVirtualHost *:80
<VirtualHost *:80>
Servername www.example.com
ServerAlias example.com *.example.com
ServerAdmin admin@example.com
DocumentRoot /var/www/html
ScriptAlias /cgi-bin/ "/var/www/html/cgi-bin/"
ServerSignature email
DirectoryIndex index.shtml index.cgi index.pl index.php index.html index.htm
<Directory "/var/www/html/">
Options Indexes Includes FollowSymLinks +ExecCGI
AllowOverride none
</Directory>
LogLevel debug
HostNameLookups off
</VirtualHost>
<VirtualHost *:80>
ServerName www.example.net
ServerAdmin admin@example.net
ServerAlias example.net *.example.net
DocumentRoot /var/www/auctionb
ScriptAlias /cgi-bin/ /var/www/auctionb/cgi-bin/
ServerSignature email
DirectoryIndex index.shtml index.cgi index.pl index.php index.html index.htm
<Directory /var/www/auctionb>
Options Indexes Includes FollowSymLinks +ExecCGI
AllowOverride none
</Directory>
LogLevel debug
HostNameLookups off
</VirtualHost>
[edited by: jdMorgan at 7:47 pm (utc) on May 20, 2005]
[edit reason] Removed specifics per TOS. [/edit]