apache config help

i need help configuring apache using virtual hosts and a ScriptAlias
hello all! i need help. i get a 404 (cannot find file) error when trying to process a script. i have a virtual host setup and the cgi-bin in a different location. if you could help or point in the right direction, i'd be most grateful. here is what i have that pertains to the cgi-bin and virtual host.

ScriptAlias /cgi-bin/ "/var/www/cgi-bin"
<Directory "/var/www/cgi-bin">
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
</Directory>

<VirtualHost www.hartmann-networks.net>
ServerAdmin root@hartmann-networks.net
DocumentRoot /usr/virthost/hartmann-networks.net
ServerName hartmann-networks.net
ErrorLog logs/hartmann-networks.net-errorlog
CustomLog logs/hartmann-networks.net-access_log common
</VirtualHost>
[/code]

i tried putting the ScriptAlias in the VirtualHost directive, but got same result. i have checked all the permissions, directories, names, locations, etc... again, if you could help, i'd be most greatful. thanks! :-)

matthew

Comments

Re:apache config help

thanks!! it works now! you are a genius! i don't know why i didn't think of that. thanks again for your help. :-)

Re:apache config help

If you're setting up a virtualhost, don't use a script alias. Just setup the virtualhost directory (which you seem to have done), then put your CGI scripts within the virtual directory (like in a cgi-bin directory or whatnot. This is a good idea, trust me).

You then will have to configure the CGI directory within the virtual host, just like you've done above. I personally try to stay away from the ScriptAlias command, it has given me too many headaches. Here's an example I use.

<Directory "/somewhere/cgi-bin/">
AllowOverride None
Options ExecCGI
SetHandler cgi-script
Order allow,deny
Allow from all
</Directory>