Click to See Complete Forum and Search --> : cgi bins for virtual hosts?


Morph
05-30-2001, 04:48 PM
Anyone know how I set up different cgi-bins for each virtual host?

The main cgi-bin is for the 'main' server but I dont want to have to let everyone with a virtual server on my box access to that account otherwise everyone would be able to see evryone elses scripts.

Cheers.

Morph
05-30-2001, 06:02 PM
well I found out on the apache newsgroup.. it was right down the end. The VEry last topic in the list.

Answer for those who are interested is to put:

<VirtualHost 123.123.123.123>
ServerAdmin webmaster@domain.com
DocumentRoot /home/virtualhtml
ScriptAlias /cgi-bin/ "/home/virtualhtml/cgi-bin/"
AddHandler cgi-script .cgi
ServerName www.domain.com (http://www.domain.com)
</VirtualHost>

freebsd
05-30-2001, 11:25 PM
You don't need AddHandler cgi-script .cgi if it's already defined globally.