[Phpwm] virtual hosts in apache
Ben Francis
lists at hippygeek.co.uk
Wed Apr 26 21:47:03 BST 2006
sukh virdee wrote:
> I've set up a virtual host on my dedicated server with a dummy domain
> name.
>
> How can I access webpages that i have created for the virtual host
> through my browser. I've heard that when using windows and IE you can
> make an addition to the host file and then you can access the dummy
> site through the IP address...?
Just to add the the string of confusing emails...
By the fact that you say "dummy domain" I get the impression that you're
just trying to do something internally that won't work from the rest of
the Internet, just so you can test things out.
If this is the case you do indeed want to set up a name based virtual
host (as demonstrated by Dave Brothers) *and* set an alias in the hosts
file (as demonsrated by Jake Stride) on your computer for the internal
IP address of your server and the "dummy domain" you want to access it as.
This has the effect that your desktop machine (client) knows to point
that dummy domain at the IP address of your web server on your internal
network and the web server knows to point all http requests mentioning
that domain to the directory you specify in your virtual host.
The hosts file is:
c:\windows\system32\drivers\etc\hosts on Windows
/etc/hosts on Linux
Hope that's a bit clearer than mud!
Ben
--
Ben "tola" Francis
http://hippygeek.co.uk
More information about the Phpwm
mailing list