NameVirtualHost is used only if you want to host several web sites using the 
same IP/port combination as opposed to IP-based virtual hosting where exactly 
one site (server name) is hosted on each IP/port combination.

If you use Name-based virtual hosting, you may provide several VirtualHost 
sections for the IP/port combination declared as NameVirtualHost. In that case 
Apache will compare the Host-header of the request with the ServerName of the 
name-based virtual hosts. If one matches, the request will be processed in the 
context of that virtual host. If none match, the context of the first virtual 
host declared for that IP/port will be used.

You can very well mix name-based and IP-based virtual hosting in the same 
Apache server.

See http://httpd.apache.org/docs/2.2/vhosts/name-based.html.

-ascs
________________________________

De : Bryan Richardson [mailto:[EMAIL PROTECTED] 
Envoyé : lundi 17 décembre 2007 04:44
À : users@httpd.apache.org
Objet : [EMAIL PROTECTED] NameVirtualHost Directive


Hello all,

I'm curious as to why one would ever need to use the NameVirtualHost directive 
in site configuration files.  I just can't seem to get my head around why it's 
*sometimes* required.  I say sometimes only because I've seen instances where 
it isn't used at all.  If all VirtualHost arguments *must* match the IP address 
given with the NameVirtualHost directive, then what's the point? 

I learn best by example... can anyone give me an example of when it is needed?

Thanks! -- BTR


---------------------------------------------------------------------
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: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to