How to setup local web development network

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
markmontereal
Forum Newbie
Posts: 2
Joined: Mon Jul 07, 2008 8:08 pm

How to setup local web development network

Post 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 1309 times
User avatar
VladSun
DevNet Master
Posts: 4313
Joined: Wed Jun 27, 2007 9:44 am
Location: Sofia, Bulgaria

Re: How to setup local web development network

Post 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.
There are 10 types of people in this world, those who understand binary and those who don't
Post Reply