httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leif W" <warp-...@usa.net>
Subject Re: [users@httpd] Virtual host here today, Default host gone tomorrow!
Date Tue, 09 Sep 2003 23:06:44 GMT

Please post to the list in Plain Text (not HTML messages).  Thanks.

I noticed the same thing, so I just make sure the first Virtual Host is the
default, and add a second VirtualHost (which is the first real site), and so
on.  I think once you use NameVirtualHost on an IP:port pair, it will only
look for the ServerName or ServerAlias in the defined VIrtualHosts also
assosciated with that IP:port pair, otherwise it gives up and just uses the
first VirtualHost it finds for that IP:port pair.

Anyone else, correct me if this is wrong, but I think it's the behaviour I
observed, at least in 2.0.47.  Not sure about 1.3.x.

Also note, if you're splitting the VirtualHost sites into separate conf
files in a vhost directory, ensure you're including all your Listen and
NameVirtualHosts without duplicates.  For me, using one IP for several
sites, and listening on different ports (for SSL), it's easiest to achieve
this with a separate file with all the Listen and NameVirtualHost
directives, then the default VirtualHost (catches all the IP scans), then
your sites.  If using multiple IPs, one and only each per, it may be easier
to put the Listen and NameVirtualHost directives in with each site's conf.
In any case, naming the files with _000 and _001 ensures that they will be
loaded before the files that begin with real domain names, as the underscore
can't be used in a domain name.

_000.name_vhosts.conf
_001.default.conf
site1.com.conf
site2.net.conf
site3.org.conf

Leif

----- Original Message ----- 
From: William Hanson
To: users@httpd.apache.org
Sent: Tuesday, September 09, 2003 4:38 PM
Subject: [users@httpd] Virtual host here today, Default host gone tomorrow!


Apache Users,

I could use your assistance in resolving a problem with Apache 1.3.23. My
situation is I have 1 virtual host configured according to official apache
documentation for "NameBased VirtualHosts. However, when I enter the default
host name in a web browser, it defaults to the virtualhost and not the
standard apache placeholder page... What might I be missing here?

Regards.



---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message