Debian + Apache + DNS

ben chi(f4)

2[H]4U
Joined
Mar 4, 2008
Messages
2,339
Hi all. I'm trying to wrap my head around this one and I just can't seem to get pointed in the right direction.

So, I have a VM with my website on it. It's backend is Debian using apache. I can get to the website using the IP address (it's all internal) but I can't get to it using DNS. Any recommendations as to where I should look to get this pointed to where I need to go?
 
Assuming a close to default config for apache, it seems your issue is with your DNS server/zones.

Let's assume a domain name of example.local. So were you trying to reach www.example.local, your dns server will need to have a zone file for example.local, which points www to your web server ( let's assume 10.0.0.10 for now ).

bind might look something like this:

Code:
$TTL	86400 ; 24 hours 
$ORIGIN example.local.
@  1D  IN	 SOA ns1.example.local.	youremailaddress.example.local. (
			      2012013001; serial
			      6H ; refresh
			      30 ; retry
			      1w ; expire
			      6h ; minimum
			     )
      
IN  NS     ns1.example.com.

www    IN  A      10.0.0.10

There are usually sample configs somewhere on your system that you can take and rework ( not sure where they'd be stored in debian )
 
Scenarios:
1) If the webserver is public-facing, and you're attempting to access it via the real URL while on your home network (assuming it is in your home network as well), your router is stopping you.

Linksys and DD-WRT call this "loopback" or NAT redirection.

2) everything is internal, there's no real DNS service for the 'website' and no one from the outside will see it.

Edit your hosts file on the local PC to point the 'domain name' at the IP address of your server or set up the local DNS to have an entry for it, as XOR != OR suggested.
 
be sure that the workstation your attempting to access the site on is using the correct dns server.
 
Back
Top