This is really for Web Admins, but someone may be interested…
This is kinda in response to a posting on Jenn's site, but if anyone out there works at all with Apache, do yourself a favor and learn how to use the Virtual Host tags in the httpd.conf file. You can avoid so many "low level" network issues if
I use the following VH tags to set up name based virtual hosts to tie different names into different IP addresses:
<VirtualHost *>
ServerName netstat.wpsweb.net
DocumentRoot /var/www/htdocs/phpBB2
</VirtualHost>
This lets me set up a host on my server, and any request to netstat.wpsweb.net is resolved to the given DocumentRoot, and others are passed on to other VHs. (Its not a bad idea to set up a default VH to point to your default DocRoot) This name based hosting is very useful. Other directives can be placed in the VH tags (say different logging options) and only have them effect my test site. Lots more information in the Apache Docs.
I put this under "Lessons learned", mainly because I spent quite a bit of time running around the httpd.conf file until I learned to harness the VH tags. Anything put in the rest of the httpd.conf file globally effects your sites, but with VH you can fine tune a small portion of your web deployment, then if you like the changes you can roll them out to the entire server.
I make a lot of logging changes in VH tags, so when I debug site problems I can access lots of info, but when the site is deployed I can cut back the logging to a standard format.
I have not run a server with lots of Virtual Hosts, and if you were doing any web site hosting I could see VHs getting out of hand, esp. if you are making customizations to each…
In the end, I find them useful for keeping IPs unlinked from a specific site, and a great way to debug web server issues for a site without globally affecting all your other sites.