If you have your own DNS server, then
name-based virtual hosting should be very easy. You just need to setup your
DNS names to “point” to the same IP address (where Apache is
running), then setup your httpd.conf file like this: # required to allow
name-based virtual hosting; can replace * with your Apache host’s IP NameVirtualHost * # first virtual
host (siteone) <VirtualHost
*> ServerName
www.siteone.com DocumentRoot
"c:/websites/siteone/htdocs" TransferLog
"c:/websites/siteone/logs/access.log" ErrorLog
"c:/websites/siteone/logs/error.log" </VirtualHost> # redirect,
incase client leaves off “www.” <VirtualHost
*> ServerName
siteone.com Redirect
/ http://www.siteone.com/ </VirtualHost> # second virtual host
(sitetwo) <VirtualHost
*> ServerName
www.sitetwo.com DocumentRoot
"c:/websites/sitetwo/htdocs" TransferLog
"c:/websites/sitetwo/logs/access.log" ErrorLog
"c:/websites/sitetwo/logs/error.log" </VirtualHost> # redirect,
incase client leaves off “www.” <VirtualHost
*> ServerName
sitetwo.com Redirect
/ http://www.sitetwo.com/ </VirtualHost> I’ve been using this type of
configuration for a couple years now to host multiple web sites on one Apache server,
and it hasn’t failed me yet. I hope this helps. James From: Joshua Kogut
[mailto:jmkogut@xxxxxxxxx] I have wanted to set up a small Internet-like environment on my local
LAN for testing purposes. The only problem is that none of my servers are happy
with name-based virtual hosting. So, I figured out how to add an IP address
in |