0

I am wanting to setup a internal development server (LAMP), I need the web team to be able to access different developments sites ie:

example1.local example2.local example3.local etc

from within the network.

I believe it would be something to do with DNS?

HopelessN00b
  • 53,795
  • 33
  • 135
  • 209
Kyle Hudson
  • 202
  • 2
  • 11

4 Answers4

1

Solution 1: create a "hosts" file containing:

yourip  example1.local 
yourip  example2.local 
yourip  example3.local

then copy this hosts file to every workstations that need to access ".local" fake-domain

Solution 2: set a closed-view name system (only your network could query).

Solution 3: try ns delegations on sub-domains.

Ta Coen
  • 240
  • 4
  • 15
0

I've done this in my last few significant development servers.

I use dbdns to setup a DNS server under my control on the server, with the 'tinydns' and 'dnscache' programs running.

In tinydns, I setup a custom/local top-level DNS space (/service/dnscache/root/data):

# Nameservers for the local TLDs
.virtual::ns.virtual
# an address for the machine
=virtual:192.168.1.100
=ns.virtual::192.168.1.100
# TLD and a second level DNS wildcard
+virtual:192.168.1.95:
+*.virtual:192.168.1.95:
# some have specific addresses
+fred.virtual:192.168.1.97

Then, I tell dnscache where to look for *.virtual domain names car of the file: /service/dnscache/root/servers/virtual

 # which IP address tinyDNS runs on
 127.0.0.1

Now, going to bill.virtual (or anything else not specifically give) will return 192.168.1.95.

Set the address of the dnscache server as the local name servers and you too should be able to ping the address of bill.virtual - and then you can have those names picked up with Apache to serve websites.

Alister Bulman
  • 1,624
  • 13
  • 13
0

You need to use name based virtualhosts in your apache config to make the httpd server serve the correct websites according to the dns correponding name.

For the name resolution to work, if you don't own a dns server you can adjust the hosts file on the client workstations.

Hope this helps.

Maxwell
  • 5,076
  • 1
  • 26
  • 31
0

While there are a number of ways to go about this DNS is the best, as it will give you an open-ended system that does not require any changes on the clients. If you already have an internal DNS server simply create a new zone with the appropriate settings and records.

If you don't already have an internal DNS server you'll find BIND is very easy to install and configure on Linux. If you have a Windows server you could use the Windows DNS on that.

John Gardeniers
  • 27,458
  • 12
  • 55
  • 109