[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: virtual hosts with own cgi-bin?
John Wolgamot wrote, On 5/22/2003 8:55 AM:
> I have multiple virtual hosts and it seems that all use a common cgi-bin
[...]
> Or would I do it like this with the ScriptAlias statment?
>
>
> <VirtualHost 22.22.222.22 22.22.222.22 >
> ServerName www.foo.com
> ServerSignature email
> DocumentRoot /home/robert/website
> DirectoryIndex index.html index.htm index.php index.shtml
> ServerSignature email
> LogLevel warn
> HostNameLookups off
> ScriptAlias /cgi-bin/ "/home/robert/website/cgi-bin"
> </VirtualHost>
That's pretty much how I generally do it - though my scheme is to set up
a directory for each virtual host - /home/www/www.domain.com - and
within that directory make 2 subdirs, "docs" and "cgi-bin". The "docs"
dir is the server root and cgi-bin is ScriptAlias'd to /cgi-bin. I
mostly do that because I don't like aliasing a virtual path over the top
of a real path - that kind of thing can only come back to bite you later.
I like using a seperate logfile, too, but that's just to make generation
of statistics easier. This is my virtual host template, if it helps.
"VIRT_HOST" gets replaced by the new domain name when a new host is created.
## VIRT_HOST
<VirtualHost 10.1.1.5>
ServerName www.VIRT_HOST
ServerAdmin webmaster@VIRT_HOST
DocumentRoot /home/www/www.VIRT_HOST/docs
#ScriptAlias /cgi-bin /home/www/www.VIRT_HOST/cgi-bin
CustomLog logs/www.VIRT_HOST combined
ErrorLog logs/www.VIRT_HOST-error_log
</VirtualHost>
<VirtualHost 10.1.1.5>
ServerName VIRT_HOST
ServerAlias *.VIRT_HOST
Redirect permanent / http://www.VIRT_HOST/
</VirtualHost>
HTH.
--Danny
-
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.