[ale] Issue with virtual hosts in Apache 2.2.9 on Debian
Brian Pitts
brian at polibyte.com
Fri Aug 29 13:39:44 EDT 2008
Scott Denlinger wrote:
> Thanks, Brian. But I'm still wondering why I need the separate "Listen 80" line
> when I have the "NameVirtualHost *:80" clause, which, according to everything
> I've looked at, should be specifying port 80 for all the virtual hosts.
>
> For now, since I'm really just running one site, it's no big deal to have that
> "Listen 80" directive there, but I want to figure out why it seems to be
> necessary, despite the syntax of my NameVirtualHost directive.
Hi Scott,
Does
http://httpd.apache.org/docs/2.2/bind.html
answer your question?
A snippet:
"The Listen directive does not implement Virtual Hosts - it only tells
the main server what addresses and ports to listen on. If no
<VirtualHost> directives are used, the server will behave in the same
way for all accepted requests. However, <VirtualHost> can be used to
specify a different behavior for one or more of the addresses or ports.
To implement a VirtualHost, the server must first be told to listen to
the address and port to be used. Then a <VirtualHost> section should be
created for the specified address and port to set the behavior of this
virtual host. Note that if the <VirtualHost> is set for an address and
port that the server is not listening to, it cannot be accessed."
-Brian
More information about the Ale
mailing list