Hi folks, I'm seeking a quick consultation from anyone who has set up httpd.conf to serve multiple VirtualHosts. I've RTFM'ed and I'm clearly just missing something that I suspect someone who has done this before can point out.
This is probably in the area of exactly what is supposed to be on the NameVirtualHost, VirtualHost, and ServerName directives as well as what might go into /etc/hosts.
If someone out there has time for a quick 5-10 minute phone call, I'd really appreciate it. Please e-mail me off list.
Thanks much, Steve
-
Re: httpd.conf, trying to set up VirtualHosts. Little help?
Mon, December 20, 2004 - 3:04 AM<VirtualHost 10.0.0.1>
ServerName www.abc.dom
ServerAdmin webgirl@abc.dom
DocumentRoot /www/abc
</VirtualHost>
When you define the Virtual Host replace 10.0.0.1 with the ip you want the server to listen to for the virtual host. You will also want to make sure you define it with the Listen Directive pointing it to the ip as well as any others needed.
ServerName you define with the address of the virutal host..you can also use *.abc.com to catch all sub-domains of the domain.
DocumentRoot is where the virtual host is located on the server..the files to be hosted.
Hope that proves helpfull. -
-
Re: httpd.conf, trying to set up VirtualHosts. Little help?
Mon, December 20, 2004 - 5:50 AMIf you're trying to get it to work locally on a Windows machine, there might be some relevant notes, here: lithuania.tribe.net/thread/9...bc28d93be
drove me crazy for weeks. Still not sure what I was doing wrong; all I know is I can get it to work, now!
-
-
Re: httpd.conf, trying to set up VirtualHosts. Little help?
Tue, December 21, 2004 - 1:21 PMUse this and you can forget about all the other virtual hosting directives.
VirtualDocumentRoot "/www/data/%0"
VirtualScriptAlias "/www/cgi-bin/%0/"
UseCanonicalName Off
The %0 is a placeholder for the server name given in the incoming HTTP request. Adding a new host is as simple as adding a new directory, no further httpd.conf changes required. -
-
Unsu...
Re: httpd.conf, trying to set up VirtualHosts. Little help?
Tue, December 28, 2004 - 2:15 PM
That's only been available since 1.3.7 - if you're running an older version you'll need to upgrade first.
-