Hello,
I have one domainone currently using cgi-scripts fine.
I would like mynewdomain to have it's own cgi-bin. As shown below I have ScriptAlias defined globally in the httpd file.
I also have the directory listing. My question is in order for each newdomain to have its own cgi-bin do I comment out the global ScriptAlias and define each cgi-bin within the vhost container? By doing so is the <directory> container needed for each domain using a cgi-bin? Should the directory container be within the vhost section? This seems redundant if the path is defined in the ServerAlias line.
Thanks
ScriptAlias /cgi-bin/ /home/domainone/cgi-bin/
<Directory "/home/domainone/cgi-bin">
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
</Directory>
# Named Virtual hosts
# Vhost domainone.com
<VirtualHost x.x.x.x>
DocumentRoot /home/domainone/www/
ServerAdmin me@domainone.com
ServerName ServerAlias /cgi-bin/ /home/domainone/cgi-bin/
</VirtualHost>
# Vhost mynewdomain.com
<VirtualHost x.x.x.x>
DocumentRoot /home/mynewdomain/www/
ServerAdmin me@mynewdomain.com
ServerName </VirtualHost>
I have one domainone currently using cgi-scripts fine.
I would like mynewdomain to have it's own cgi-bin. As shown below I have ScriptAlias defined globally in the httpd file.
I also have the directory listing. My question is in order for each newdomain to have its own cgi-bin do I comment out the global ScriptAlias and define each cgi-bin within the vhost container? By doing so is the <directory> container needed for each domain using a cgi-bin? Should the directory container be within the vhost section? This seems redundant if the path is defined in the ServerAlias line.
Thanks
ScriptAlias /cgi-bin/ /home/domainone/cgi-bin/
<Directory "/home/domainone/cgi-bin">
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
</Directory>
# Named Virtual hosts
# Vhost domainone.com
<VirtualHost x.x.x.x>
DocumentRoot /home/domainone/www/
ServerAdmin me@domainone.com
ServerName ServerAlias /cgi-bin/ /home/domainone/cgi-bin/
</VirtualHost>
# Vhost mynewdomain.com
<VirtualHost x.x.x.x>
DocumentRoot /home/mynewdomain/www/
ServerAdmin me@mynewdomain.com
ServerName </VirtualHost>