[Cialug] Virtual hosts in Apache
Jeffrey C. Ollie
jeff at ocjtech.us
Fri Jun 1 23:52:52 CDT 2007
On Fri, 2007-06-01 at 22:52 -0500, Tim Wilson wrote:
> I figured out why foobar.domain1.com was always displaying the page
> for foo.domain1.com when going to port 80. From the Apache website:
> "If no matching virtual host is found, then the first listed virtual
> host that matches the IP address will be used." So I moved my entry
> with the invalid DocumentRoot to the top, and now it works. I'm still
> getting a couple "no VirtualHosts" warnings. Both are for domain2,
> which is a .us domain. There isn't anything weird with a .us domain,
> is there?
No, a .us domain should be fine. Make sure that you have everything
matching up in your Listen, NameVirtualHost and VirtualHost entries, so
since you are using ip addresses, you probably want:
Listen 127.0.0.1:80
Listen 127.0.0.1:8080
NameVirtualHost 127.0.0.1:8080
NameVirtualHost 127.0.0.1:8080
<VirtualHost 127.0.0.1:80>
Servername XXX
<VirtualHost 127.0.0.1:8080>
Servername YYY
Jeff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://cialug.org/pipermail/cialug/attachments/20070601/abe802df/attachment.pgp
More information about the Cialug
mailing list