Hi there,
I'm trying to set up ip-based virtual hosting on my box, and am having a strange issue.
I have two sites, site1.com and site2.com, each with its own IP 123.123.123.123 and 456.456.456.456 (as examples).
This is what my httpd.conf looks like:
Listen 80
<VirtualHost 123.123.123.123:80>
DocumentRoot /home/.sites/_default/web
ServerName www.site1.com
</VirtualHost>
<VirtualHost 456.456.456.456>
DocumentRoot /home/.sites/site2/web
ServerName www.site2.com
</VirtualHost>
# END
It all seems pretty basic! But this is what happens:
http://site1.com --> resolves properly to site 1
http://www.site1.com --> resolves perperly to site 1
http://www.site2.com --> resolves properly to site 2
http://site2.com --> resolves erroneously to site 1
Do I need to make changes to other files to make this work properly? Or am I missing somethign in my conf file?
DNS info:
My domain at my registrar is using The Planet's DNS servers.
The Planet has set its DNS to point site1.com to 123.123.123.123 and site2.com to 456.456.456.456.
Thanks a lot for the help!
Matt.