Mac Os Server, how to make bind point www.mydomain.com to the same machine bind is installed on?

Solution 1:

You need to edit you named.conf to add a zone like:

zone "myproject.com" IN {
    type master;
    file "myproject.com.zone";
    allow-update { none; };
}

Then create a zone file in /opt/local/var/named named myproject.com.zone. That file should look like:

$ORIGIN myproject.com.
$TTL 21600 
@                      3600 SOA   <your ns A record>. (
                              sysadmins.stackoverflow.com.    ; address of responsible party
                              2011072601                          ; serial number
                              3600                       ; refresh period
                              600                        ; retry period
                              604800                     ; expire time
                              60                       ) ; minimum ttl
                                NS    <YOUR_NS_A_RECORD>.

                                A     <YOUR_IP>
*               IN      A     <YOUR_IP>

Wildcarding it is you best options since you then don't have to worry about it again.

I highly recommend getting a copy of DNS and BIND