For Programmers: Free Programming Magazines  


Home > Archive > PHP Language > September 2004 > development setup with virtual hosting for Windows









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author development setup with virtual hosting for Windows
Michael

2004-09-24, 3:56 am

Hi - I want to set up Apache, PHP and MySQL to work on my home pc so that I
can test and make changes to sites before I upload them. I've noticed that
there are a number of packages out there designed to make the installation
easier. I don't really have a problem with this part (although I would
appreciate any recommendations anyone has as to good packages that also
include PHPMyAdmin). My problem is this - I want to be able to run all of my
sites (a couple of dozen) with apache set so that each site is on a virtual
server, but when I do this with my current seup by
adding lines to
\Apache\conf\httpd.conf
along the lines of:
<VirtualHost 127.0.0.1>
DocumentRoot "C:\sites\site1"
ServerName legui
</VirtualHost>

<VirtualHost 127.0.0.1>
DocumentRoot "C:\sites\site2"
ServerName hamblys
</VirtualHost>



and adding lines to
\WINDOWS\system32\drivers\etc\hosts

along the lines of
127.0.0.1 site1.local
127.0.0.1 site2.local

Windows insists on trying to dial up before allowing me to see the sites on
my own machine, which rather defeats the point. Any advice on how to set
this up so that windows will acccess these sites offline, or any packages
that include built in facilities to modify the server set up that would
achieve the same result would be very gratefully appreciated.
Michael


Andy Hassall

2004-09-26, 3:55 pm

On Fri, 24 Sep 2004 04:16:33 +0000 (UTC), "Michael"
<letters@britishlibrary.net> wrote:

> My problem is this - I want to be able to run all of my
>sites (a couple of dozen) with apache set so that each site is on a virtual
>server, but when I do this with my current seup by
>adding lines to
>\Apache\conf\httpd.conf
>along the lines of:
><VirtualHost 127.0.0.1>
>DocumentRoot "C:\sites\site1"
>ServerName legui
></VirtualHost>

[...]
>
>and adding lines to
>\WINDOWS\system32\drivers\etc\hosts
>
>along the lines of
>127.0.0.1 site1.local
>127.0.0.1 site2.local
>
>Windows insists on trying to dial up before allowing me to see the sites on
>my own machine, which rather defeats the point. Any advice on how to set
>this up so that windows will acccess these sites offline, or any packages
>that include built in facilities to modify the server set up that would
>achieve the same result would be very gratefully appreciated.


Can't vouch for the results of this as I've not used a machine without a
network card in years, but the following is how to install a loopback device so
you can have local network access without it trying to open a real network
device... which if all you have is a modem could cause a dialup.

http://support.microsoft.com/?kbid=236869

--
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com