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 want to to serve a web application at app-name.local.dev

Currently I have the configuration ready to serve it at app-name.local

name.conf

zone "davinci.local" IN {
    type master;
    file "davinci.local";
};

davinci.local

davinci.local. 7200    IN       SOA     davinci.local. root.davinci.local. (
          20100601 ;    Serial (a date in this case)
          15      ; Refresh every 15 minutes
            3600    ; Retry every hour
            3000000 ; Expire after a month+
            86400 ) ; Minimum ttl of 1 day
              IN      NS      davinci.local.
              IN      A       127.0.0.1
*.davinci.local.        IN      A       127.0.0.1      

What changes do I have to do in order to serve davinci.local.dev ?

I try this: name.conf

zone "davinci.local.dev" IN {
   type master;
   file "davinci.local.dev";
};

/var/named/davinci.local.dev

davinci.local.dev 7200    IN       SOA     davinci.local.dev. root.davinci.local.dev. (
          20100601 ;    Serial (a date in this case)
          15      ; Refresh every 15 minutes
            3600    ; Retry every hour
            3000000 ; Expire after a month+
            86400 ) ; Minimum ttl of 1 day
              IN      NS      davinci.local.dev
              IN      A       127.0.0.1
*.davinci.local.dev        IN      A       127.0.0.1 

But I get this error:

named-checkzone davinci.local.dev /var/named/davinci.local.dev 
/var/named/davinci.local.dev:1: SOA record not at top of zone (davinci.local.dev.davinci.local.dev)
/var/named/davinci.local.dev:8: using RFC1035 TTL semantics
zone davinci.local.dev/IN: loading from master file /var/named/davinci.local.dev failed: not at top of zone

In nginx.conf:

server {
      listen 8080;
      server_name .davinci.local;
      root /Users/Nerian/NetBeansProjects/DaVinci/DaVinci/public;
      passenger_enabled on;
   }      

server {
      listen 8080;
      server_name .davinci.local.dev;
      root /Users/Nerian/NetBeansProjects/DaVinci/DaVinci/public;
      passenger_enabled on;
   }
share|improve this question

1 Answer 1

up vote 2 down vote accepted

You need to add another section to named.conf:-

zone "davinci.local.dev" IN {
    type master;
    file "davinci.local.dev";
};

Then, take a copy of the zonefile for davinci.local, change all references to davinci.local. to davinci.local.dev., and save as davinci.local.dev. You'll then need to tell bind to reload its config - rndc reload, service bind reload or /etc/init.d/bind reload should work, depending on the operating system.

You'll also need to make changes to your webserver - presumably another virtualhost.

share|improve this answer
    
I try doing that. But I get an error. I added the error message to the Question. –  Nerian Dec 18 '10 at 17:08
    
Try adding a period to the end of the zone line, so it reads zone "davinci.local.dev." IN {. You're also missing a . after davinci.local.dev at the very beginning of the zone file. –  Andy Smith Dec 18 '10 at 17:09
    
...oops, and *.davinci.local.dev should read *.davinci.local.dev. - with a period at the end. –  Andy Smith Dec 18 '10 at 17:11

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.