Windows 7: Local Domain

1

I'm setting up a local(LAN) web server using Windows 7 ULTIMATE and XAMPP. Is it possible to setup a local domain where the computers in my network can access the server on visiting http://serverdomain.com ?

Aaron Alfonso

Posted 2015-08-22T06:37:07.537

Reputation: 121

Answers

2

You will have to use a DNS server for this, and make sure that whoever does DHCP sets the DNS server to be the ip address of the computer that has the DNS server installed.

From the DNS server, you can configure any domain name to point to any local ip address, and it will only work within your network.

You can google for any dns server to find one that suits your needs.

One example of a DHCP/DNS server that is free and for windows/linux is this one: http://sourceforge.net/projects/dhcp-dns-server/

LPChip

Posted 2015-08-22T06:37:07.537

Reputation: 42 190

1

One way that would do it without installing any extra software on the machines would be to edit the hosts file on each machine to have serverdomain.com point at the IP address of the machine running the server.

You'll need to run notepad (or your favourite text editor) as an administrator and then open c:\windows\system32\drivers\etc\hosts.

Then towards the bottom of the file you can add:

192.168.0.2    serverdomain.com

Replace the 192... With the IP of your server.

You'll need to do this on every machine, and change the IP address on them all if it changes. For this reason it might be simpler to set up a static IP on that machine.

Mokubai

Posted 2015-08-22T06:37:07.537

Reputation: 64 434

I'm thinkin' of that as a fix. But, some of the devices, or my visitor's devices can't access the server without configuring the hosts file. – Aaron Alfonso – 2015-08-22T06:54:26.440

In that case what you'd need to do is set up a DNS server on the same machine as your xammp server and have requests pass through it by giving your new DNS server the name servers your router has and then setting your router DNS to point at your local DNS machine. You'd need some software like http://www.simpledns.com/ which should be able to inject sites you want and forward the rest of the requests to the real servers on the internet. That software is payware, but is the first I found that would work, hopefully others are available but I don't have the time to look right now.

– Mokubai – 2015-08-22T07:09:14.860

@AaronAlfonso setting up your own DNS server in that fashion should mean that any machine that comes onto your network should be able to see your domain. When I get back to my main computer I'll try to add some more detail, but for the moment that should point you in the right direction. – Mokubai – 2015-08-22T07:12:44.043