Article:
  Location, Location, Location: Tips for Storing Web Site Files
Subject:   Name-based Virtual Hosts
Date:   2003-09-14 22:55:36
From:   empass
I found an easier way to do number 3 (above)


According to the Apache manual you can do the following; I did not modify the "hosts" file. Also see the documentation about mass virtual hosting. (see apache.org and search for terms)


# example


NameVirtualHost 111.22.33.44


<VirtualHost 111.22.33.44>
ServerName www.mysite1.com
ServerPath /web
DocumentRoot /web/mysite1
</VirtualHost>


<VirtualHost 111.22.33.44>
ServerName www.mysite2.com
ServerPath /web
DocumentRoot /web/mysite2
</VirtualHost>


<VirtualHost 111.22.33.44>
ServerName www.mysite3.com
ServerPath /web
DocumentRoot /web/mysite3
</VirtualHost>


# end example


It DOES work with the same IP for all three.


I also used a DNS Service (free for 5) to register the name servers @ http://www.zoneedit.com


Hope this helps.