You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Ola Ogunneye <oo...@adventisthealthcare.com> on 2004/06/17 15:18:14 UTC

[users@httpd] Name Based Virtual Host Questions?

Hello all,


To start with, I am running Windows 2000 Advanced Server. My webserver
has been up and running for 6 Months, so I am still a newbie. Now I am
trying to had a couple more sites to my existing one. 

My Server is on a LAN that is using a NAT router. So using the private
address range of 192.168.1.x, my server  IP address is 192.168.1.10
while the router LAN interface is 192.168.1.1 and the WAN has the public
IP address.

So here are my questions, is my configuration below okay, and secondly,
if I have to be explicit about the IP address in my namebasedvirtualhost
directive, the * stands for which IP address the server LAN address or
my Router WAN address?


NameVirtualHost *:80

<VirtualHost *:80>
ServerName www.site1.com 
ServerAlias site1.com *.site1.com
DocumentRoot c:/apache/apache2/htdocs/site1/public_html
</VirtualHost>

<VirtualHost *:80>
ServerName www.site2.biz 
ServerAlias site2.biz *.site2.biz
DocumentRoot c:/apache/apache2/htdocs/site2/public_html
</VirtualHost>

<VirtualHost *:80>
ServerName www.site3.org 
ServerAlias site3.org *.site3.org
DocumentRoot c:/apache/apache2/htdocs/site3/public_html
</VirtualHost>

Thank you all in advance.

Ola

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


Re: [users@httpd] Name Based Virtual Host Questions?

Posted by Joshua Slive <jo...@slive.ca>.
On Thu, 17 Jun 2004, Ola Ogunneye wrote:
> So here are my questions, is my configuration below okay, and secondly,
> if I have to be explicit about the IP address in my namebasedvirtualhost
> directive, the * stands for which IP address the server LAN address or
> my Router WAN address?

The configuration you quoted seems reasonable.

The NameVirtualHost and <VirtualHost> directives need an IP address 
associated with the server on which they are running.  If you use "*", 
this will match all such IP addresses, which is usually what you want. 
Apache doesn't care about the WAN address, it only needs to know which 
requests should be mapped to virtual hosts based on their local address.

Joshua.

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