[PLUG] apache virtual host setups

Josh Orchard josh at emediatedesigns.com
Wed Apr 6 01:21:28 UTC 2005


> Josh Orchard wrote:
>
>
> Josh, I don't agree with your interpretation of the Apache docs.
>
>
> Maybe we're not reading the same page?
> http://httpd.apache.org/docs/vhosts/name-based.html
>
>
> Your first example with the IP addresses in the virutal host
> directive is a method to support older browsers that do not send the
> required data for the name-based virtual hosts to work properly.
>
> The, I believe, preferred way of setting up name based virtual hosts
> is like:
>
>
> NameVirtualHost *
>
>
> <VirtualHost *>
> ServerName www.patch.com
> DocumentRoot /var/www/patch
> </VirtualHost>
>
>
> <VirtualHost *>
> ServerName www.slugvelo.org
> DocumentRoot /var/www/slugs
> </VirtualHost>
>
>
>> With this second one, if I need to change my IP's or want to use
>> the config file on another machine I just need to modify the Listen
>> and NameVirtualHost IP's.
>>
>
> You don't even need to do that.  If you specify
> Listen 80
> Apache will glom onto all bound IP addresses on the server.  You only
> need to specify IP addresses if you want to prevent that from
> happening.
>
> No IP addresses are needed in the config at all.  They are available
> for use if you need them - for instance binding a https server to a
> particular address.
>
>

Ok, just getting back to this.  I guess what I didn't understand was
how the IP worked in the Virtual Host.  Now I did read the link but
then I also read all these warnings from Apache here:

http://httpd.apache.org/docs-2.0/dns-caveats.html

Now these are dated 1997 and not updated for the 2.0 release.  I can't
tell if they are a big deal anymore.  This was my concern.  I now have
removed all IP's from my httpd.conf file with the recommendations on
the list just not sure if any of the DNS warnings are still valid.

If someone knows let me know. If not I'll assume all is fine.  The
sites are working now.

thanks all,

Josh






More information about the PLUG mailing list