Configuring name service for intranet sites

burnedfaceless
burnedfaceless used Ask the Experts™
on
I have two servers right now that are set up on my local network.

I know using Apache on Ubuntu that I edit the /etc/hosts file to create hosts (i.e. phppatternsobjectsandpractice.local) - set it to 127.0.0.1, and I can visit it on my local computer.

I want to host intranet site on one of my servers, and allow people who are connected to my network to type in a site (phppatternsobjectsandpractice.localhost) and visit the site.

Do I edit the /etc/hosts file or do I set up Bind on my two servers?

Thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
You can do this with a host file entry on each network computer (least efficient method). entries would be. 192.168.X.X (IP of your hosting server and internal IP is fine) then the hostname you want.

More efficient way to do this would be to have your router or server that gives out DHCP push out a local DNS server to all devices on the network. Then set up an A record on your DNS server for the hostname you want.

Author

Commented:
Cool.

I read something that said I didn't need a DNS server, so I got confused.

Thanks man.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start Today