[Phpwm] virtual hosts in apache

Phil Beynon phil at infolinkelectronics.co.uk
Wed Apr 26 22:09:49 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

One point to add. If your desktop is a machine that was upgraded from '98 to
XP then you will also have the original hosts file from '98 which will be
ignored by IE under XP as it is a different location, I once got caught out
like that.
You also have to close IE as it only reads the hosts file when it initially
loads.

Regards,

Phil Beynon
Sales director

** http://www.diygear.com THE Online DIY Toolstore For DIY & Business
** Infolink Electronic Systems Ltd. http://www.infolinkelectronics.co.uk
** Professional Web Design & Cobalt Hosting Solutions
** Contact: Sales at infolinkelectronics.co.uk
** Tel / Fax 0121 458 4894 (office) 0121 441 3558 (home) 07801 548464
(mobile)





More information about the Phpwm mailing list