Page 1 of 1

How to setup local web development network

Posted: Wed Jul 30, 2008 1:10 am
by markmontereal
I'm wondering how can I setup a network for web development just like a local version of the internet. I've attached an image file describing the network. What I want to do is to host a number of websites in a local web server and all the workstations can visit the websites resided in the local web server by typing a domain e.g. http://clientwebsite1.local, http://clientwebsite2.local, http://clientwebsite3.local, and so forth. I did the same by using virtual host but it only works on a local pc (computer running apache)
Local Web Development Network
Local Web Development Network
Drawing1.jpg (22.96 KiB) Viewed 1308 times

Re: How to setup local web development network

Posted: Wed Jul 30, 2008 1:35 am
by VladSun
Edit the workstations hosts file and include these lines:

Code: Select all

SERVER_IP http://clientwebsite1.local
SERVER_IP http://clientwebsite2.local
SERVER_IP http://clientwebsite3.local
Win: C:\WINDOWS\system32\drivers\etc\hosts
Linux: /etc/hosts

I will work if you have configured the virtual hosts properly (domain name based, not IP based)

Another approach would be to assign several local IPs to server nic and to use IP based virtual hosts. Then you'll have to access each local "domain" by using its IP.