PDA

View Full Version : Apache Question, Host Headers and URLs


robbo38
12-11-2006, 11:55 AM
Hi - cant find the correct place for this so here goes!!!

Running Apache at home, added virtual hosts .. so far so good, and as far as I'm aware it relies on the host header to differentiate between the websites to serve.

Using my home network, I can get pages from ONE of the sites only, because I only use the ip address in the URL .. 192.168.xxx.xxx/testpage.html etc to get to it from another PC.

Same if I address it using the net , but I have dynamic IP address so I can for a while get to it using 81.xx.xxx.xx/testpage.html etc.

Without setting up a DNS etc, what can I do to test each virtual host is working correctly. I believe I need to get the browser to do a request to the IP address but also it must add the host header in the call.
So can I type the IP address with 'something' added to achieve this?

i.e. 81.xx.xx.xx ( site1 ) /testpage.html
and 81.xx.xx.xx ( site 2) /testpage.html

Can it be done this way? ( I assume using a DNS it will happen automatically )

Thanks