Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to set up a domain on my own web server. I had it working yesterday however now I am receiving 504 errors whenever I visit the website. The website is www.emotorcyclefairings.com . The A record is coming up correctly and is configured by ddclient. Also, I am using namecheap so I am able to configure the DNS servers and host records. I am also using Google's Public DNS with Bind9 so my server doesn't have to handle all the load. What am I doing wrong here because I do not believe the DNS is resolving correctly?

named.conf.local

    # This is the zone definition. replace example.com with your domain name
zone "emotorcyclefairings.com" {
        type master;
        file "/etc/bind/zones/example.com.db";
        };

# This is the zone definition for reverse DNS. replace 0.168.192 with your network address in reverse notation - e.g my network address is 192.168.0
zone "0.168.192.in-addr.arpa" {
     type master;
     file "/etc/bind/zones/rev.1.168.192.in-addr.arpa";
};

named.conf.options

forwarders {
  # Replace the address below with the address of your provider's DNS server
  8.8.8.8;
  8.8.4.4;

};

emotorcyclefarings.com.db

    // replace example.com with your domain name. do not forget the . after the domain name!
// Also, replace ns1 with the name of your DNS server
example.com.      IN      SOA     ns1.emotorcyclefairings.com. ns2.emotorcyclefairings.com. (
// Do not modify the following lines!
                                                        2006081401
                                                        28800
                                                        3600
                                                        604800
                                                        38400
 )

// Replace the following line as necessary:
// ns1 = DNS Server name
// mta = mail server name
// example.com = domain name
emotorcyclefairings.com.      IN      NS              ns1.emotorcyclefairings.com.
emotorcyclefairings.com.      IN      NS              ns2.emotorcyclefairings.com.

// Replace the IP address with the right IP addresses.
www              IN      A       192.168.1.8
@                IN      A       192.168.1.8
ns1              IN      A       8.8.8.8
ns2      IN  A   8.8.4.4

rev.1.168.192.in-addr.arpa

   //replace example.com with yoour domain name, ns1 with your DNS server name.
// The number before IN PTR example.com is the machine address of the DNS server. in my case, it's 1, as my IP address is 192.168.0.1.
@ IN SOA ns1.emotorcyclefairings.com. ns2.emotorcyclefairings.com. (
                        2006081401;
                        28800; 
                        604800;
                        604800;
                        86400 
)

                     IN    NS     ns1.emotorcyclefairings.com.
             IN    NS     ns2.emotorcyclefairings.com.
8                IN    PTR    emotorcyclefairings.com
share|improve this question

migrated from stackoverflow.com Jul 13 '11 at 21:23

This question came from our site for professional and enthusiast programmers.

1  
504 errors come from your web server, not your DNS server. But this belongs on Serverfault. –  derobert Jul 13 '11 at 18:45
    
add comment

1 Answer

First, you need to delete the example information and start over. Second, if that sounds too daunting, step back, reread DNS & BIND again, and come back at it.

  • To start with, you've listed the example db file under your zone definition, and then listed the contents of the emotorcycle file.
  • Your SOA record is wrong.
  • You've listed private IP addresses, which is fine for internal zones, but incorrect for publicly facing DNS.
  • You've listed Google's DNS as your ns1. This will not serve you well.
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.