I'm fairly familiar with the workings of apache on Linux.
Enviroment: Hosted VPS (full access)
Windows Server 2003 Datacentre x64 edition, Apache 2.2
I have 2 straight forward websites I want to host.
example1.com and example2.org
This server was originally set up by someone else and example1.com works as expected.
So my task is to add example2.org to the server.
I create a basic index.html test page in C:\www\example2
add a virtual host record to httpd-vhosts.conf
and for test purposes add a 127.0.0.1 example2.org to my hosts file so I can test locally.
This all worked as expected and I can view example2.org which shows my test html file.
The problem is... when the DNS propagated it shows the example1.com site when I go to example2.org from anywhere but the local windows server.
I'm completely baffled as to why this is happening? Any ideas?
At what point does apache read in outside connections differently to local ones?
Allow from all
CustomLog "logs/example2-access.log" common
Allow from all
CustomLog "logs/example1-access.log" common
Above is what I have in my httpd-vhosts.conf file.. bare in mind example1.com works fine.
Did you update your hosts file with the IP address for the WAN? Yes, 127.0.0.1 is fine for viewing by localhost but NOT from the LAN (192.168.x.x) or WAN (123.321.x.x). On a production machine, that would be taken care of by your control panel which would modify your DNS A record on the server (your hosts file is mimicking that).