Re: Mangled my Virtual Hosts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2009-03-26 at 09:28 -0500, Joseph Morgan wrote:
> I tried just the *:80... but that didn't work at all... no web sites 
> worked after that...

You should have these directives in your conf file:

Listen 80
NameVirtualHost *

<VirtualHost *>
  ServerName www.prosportsresumes.com
  # all other directives for this vhost
</VirtualHost

<VirtualHost *>
  ServerName www.videofortworth.com
  # all the other directives for this vhost
</VirtualHost>

'Listen 80' says to listen on port 80, all interfaces.
'NameVirtualHost *' says to look for virtual hosts when the request is
received on a socket which matches * (ie, all requests)
'<VirtualHost *>' says that this is a vhost that can match when we match
the corresponding NameVirtualHost.

Configure different access and error logs for each vhost, this should
explain which vhost you are hitting.

Your DNS settings have nothing to do with apache, apache does not care
about DNS a great deal. It would help with connecting to those vhosts
from the local machine though. 

Apache simply looks at the socket the request is received on, looks at
the host header of the request, and finds a vhost that matches the
receiving socket and the host header. If it cant find one that matches
them both, it serves the first mentioned vhost that matches the socket.

Cheers

Tom


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux