Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm using Mac OS X Lion's BIND to set up a local domain "webapp.local". I've already set up a VirtualHost in Apache and added "webapp.local" to the host file, which works.

But wanted others on my network to access it.

So I got as far as creating the file /var/named/webapp.zone

webapp.local.         IN      SOA     webapp.local. root.webapp.local.    (
        20100601
        15
        3600
        3000000
        86400 )
        IN      NS      webapp.local.
        IN      A       127.0.0.1
*.webapp.local.       IN      A       127.0.0.1

but running # named-checkconf /var/named/webapp.zone in Terminal brings up some errors

/var/named/webapp.zone:1: unknown option 'webapp.local.'
/var/named/webapp.zone:10: unexpected token near end of file

Using nano keeps adding a new line to the end of the file, which might explain the second error message, though I'm not certain.

Also, adding any comments with ; would return the error message unknown option 'comment'

share|improve this question
    
ps. I realise that this question might be more suitable on ServerFault rather than SuperUser –  Adam-E Mar 22 '12 at 16:26
add comment

2 Answers

up vote 0 down vote accepted

I think you want to check that with named-checkzone, which checks zone files. Named-checkconf is expecting named.conf (by default), which has different syntax.

http://linux.die.net/man/8/named-checkconf

http://linux.die.net/man/8/named-checkzone

share|improve this answer
add comment

I like your joke with 127.0.0.1 for remote clients

Did you try to use search for format of Bind zone-files?

; BIND db file for webapp.local

$ORIGIN webapp.local.

$TTL 86400

@       IN      SOA     webapp.local.      root.webapp.local. (
                        2012032301  ; serial number YYMMDDNN
                        28800           ; Refresh
                        7200            ; Retry
                        864000          ; Expire
                        86400           ; Min TTL
            )

            NS      webapp.local.     
webapp.local.   IN  A   127.0.0.1
share|improve this answer
    
Yeah as this is the first time I've ever touch BIND, my configuration provides a good laugh for everyone else. Thanks for the links, I was following some really badly documented guide, I'm closer to correcting the problem. –  Adam-E Mar 23 '12 at 12:51
add comment

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.