Local Network web site access with multiple computers

1

I have a local site running through my server computer located at 192.168.2.111 (port 80) on my network. I'm currently running the site using XAMPP. In order for the site to be accessed, I have created an alias which the users would use to type in the URL.

In order for this alias to be resolved, I needed to modify the Windows hosts file and append the following (on the server computer running Apache etc.):

127.0.0.1 www.mysite.com

Now, the problem starts when other local computers need to access this site. I had modify the host file for each computer on the network to point to the server in order for the address to be resolved:

192.168.2.111 www.mysite.com

This works like a charm and everyone can access the site. This, however, becomes problematic and tedious when there are 30 computers involved.

Is there a way to get the same results WITHOUT having to do this for thirty computers? If the Server's IP address were to change, I would need to change it for all computers and want to avoid that.

Any suggestions would be great!

Thanks.

Dimitri

Posted 2014-03-31T18:37:54.483

Reputation: 113

1Have you added the A records on your server for the fqdn? – Pretzel – 2014-03-31T18:40:31.940

Answers

2

Editing hosts files is a bad way of doing this, for exactly the reason you are encountering. You'll have to setup a DNS server and configure each machine to use your DNS server for domain name lookup. If all of these systems are already on a domain, then you can use your domain controller as the DNS server as well.

You can read a little about creating a DNS alias record on Windows here.

Adam

Posted 2014-03-31T18:37:54.483

Reputation: 1 510

I think I'll do a bit more research on setting up a DNS server. Not a clue where to start! But thanks though! – Dimitri – 2014-03-31T18:56:15.173