httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Norman Peelman" <npeel...@cfl.rr.com>
Subject Re: [users@httpd] NameVirtualHost * with <VirtualHost IP>
Date Thu, 04 Dec 2003 12:28:55 GMT
----- Original Message ----- 
From: "MiksIr" <miksir@laudlink.ru>
To: <users@httpd.apache.org>
Sent: Thursday, December 04, 2003 2:46 AM
Subject: [users@httpd] NameVirtualHost * with <VirtualHost IP>


> Hello all,
> 
>      apache 2.0.48
> 
> NameVirtualHost *
> 
> <VirtualHost *>
>      DocumentRoot ...
>      ServerName empty.somedomain
> </VirtualHost>
> 
> <VirtualHost *>
>      DocumentRoot ...
>      ServerName www.somedomain
> </VirtualHost>
> 
>     This is work nice. Make some changes.
> 
> NameVirtualHost *
> 
> <VirtualHost *>
>      DocumentRoot ...
>      ServerName empty.somedomain
> </VirtualHost>
> 
> <VirtualHost 1.2.3.4>
>      DocumentRoot ...
>      ServerName www.somedomain
> </VirtualHost>
> 
>    But now for 1.2.3.4 run _ip-based_ virtual hosting. As result, for
>    requests to 1.2.3.4 always answer second virtualhost. And more, if
>    i add third virtualhost this 1.2.3.4 IP, apache generate warning
>    about overlaps.
>    I think, that's wrong, because NameVirtualHost * say, what for
>    all IP run name-based virtual hosting.
> 

  Try this (notice two NameVirtualHost directives):

NameVirtualHost empty.somedomain.com
<VirtualHost empty.somedomain.com>
      DocumentRoot ...
      ServerName empty.somedomain
      DirectoryIndex index.htm index.html
      ErrorLog logs/empty_somedomain_log
      CustomLog logs/empty_somedomain_log common
</VirtualHost>

NameVirtualHost www.somedomain.com
<VirtualHost www.somedomain.com>
      DocumentRoot ...
      ServerName www.somedomain.com

      DirectoryIndex index.htm index.html
      ErrorLog logs/www_somedomain_log
      CustomLog logs/www_somedomain_log common
</VirtualHost>

Now if you need to change one to ip based addressing you can...



---------------------------------------------------------------------
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