[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ssi on apache & virtual hosting




On Sat, 11 Mar 2000, Tamas TEVESZ wrote:

> On Sat, 11 Mar 2000, Robert Varga wrote:
> 
>  > By the way, if you are using apache 1.3+ then the VirtualHost line should
>  > contain the numeric ip of the machine. And of course you need the
>  > NameVirtualHost line with the numberic ip of the machine (outside the
>  > VirtualHost block). 
> 
> definitely not. ip address in the namevirtualhost clause, fqdn in the
> virtualhost definitions, in case of namebased vhosting.
> 
> -- 
> [-]
> kazmer at any cost !
> 
> 

Tamas, would you mind reading the manual 
(/doc/apache/manual/vhosts/name-based.html). I quote it from there:

Example configuration: 

    NameVirtualHost 111.22.33.44

    <VirtualHost 111.22.33.44>
    ServerName www.domain.tld
    DocumentRoot /www/domain
    </VirtualHost>

    <VirtualHost 111.22.33.44>
    ServerName www.otherdomain.tld
    DocumentRoot /www/otherdomain
    </VirtualHost>

What you tell may also work, but needs an additional dns lookup which
takes time, and also may not be successful because of network connectivity
error. With a large site with a couple of hundred virtual hosts, it
can take quite a lot of time at every reload/restart of apache. Not to
mention the case when the router is not working and the dns information is
not cached, then a single DNS lookup will last about a half minute, and
multiply that by 100. About an hour. I know it is an extreme case, but it
could have been avoided anyway, if you put the numeric ip in the
VirtualHost tag as it is stated in the manual.


Robert Varga



Reply to: