1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

DNS resolution of fully qualified domain names

Discussion in 'Apache' started by tizak, May 5, 2016.

  1. #1
    I am stumped, study and integrating typical network services on a private network I have spent hours trying to properly set up the DNS records for Apache Web server to resolve a fully qualified domain name, (xxxx .local) on a private network,(10.10.10.x). I am using bind9 on an Ubuntu server that's running through GNS3. Googling around I have not been able to find any tutorial which directly addresses an internal private network that's not connected to the Internet, but needs to resolve a fully qualified domain name to the Apache Web server host.

    For my bind9 foreword zone file the relevant entries are:
    ; Webserver
    xxxx .local. IN A 10.10.10.2
    www. xxxx. local. IN A 10.10.10.2

    My bind9 reverse lookup zones:
    2.10 IN PTR www .xxxx .local. ; 10.10.10.2
    2.10 IN PTR xxxx .local. ; 10.10.10.2

    For my xxxx .local domain, I created virtual host files on my webserver in Apache using this command:
    cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/xxxx.local.conf

    And then altering the file:
    <VirtualHost *:80>
    ServerAdmin
    ServerName xxxx .local
    ServerAlias www .xxxx .local
    DocumentRoot /var/www/xxxx .local
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
    </VirtualHost>

    then using the command:
    sudo a2ensite xxxx.local.conf

    I can serve pages to a different hosts on the internal network by resolving to IP address of the Apache server and hostname downloading index.html using wget, but try as I might I cannot resolve to the fqdn, (xxxx.local).

    Any any pointers as to what I'm doing wrong, (I suspect it's a simple bind9 DNS issue). Troubleshooting suggestions would be appreciated.
     
    tizak, May 5, 2016 IP
  2. gexacor

    gexacor Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #2
    Hey
    If you need to serve only local Apache requests then you can add you .local domain names to your /etc/hosts file
     
    gexacor, Jul 3, 2016 IP
  3. Roger S

    Roger S Active Member

    Messages:
    46
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    58
    #3
    Hello,

    I believe it is not an issue with DNS rather the internal network. The computers there may be contacting google nameservers to resolve the domain. Make sure the Internal computers use the DNS server IP in the /etc/resolve.conf file.

    Something like

    search localhost
    nameserver 127.0.0.1
    nameserver <local DNS server IP>
     
    Roger S, Jul 10, 2016 IP