Changes

From Amahi Wiki
Jump to: navigation, search
no edit summary
Amahi uses "Bind" for its DNS, and Bind looks to the file /etc/named.conf for DNS-related configurations. You'll see in there some stuff that Amahi is in control of (eg the "zone" used by your network, et "home.com"). At the very bottom, you should see an include to "/etc/named.conf.local". This is where our magic will start. Basically, as su (or sudo) you need to open up this file and place an entry like this:
{{Code|<pre>CodeText=zone "test.mydomainname.com" {
type master;
file "/etc/bind/test.mydomainname.com";
allow-query {any;};
};
}}</pre>
What this does is tell Bind that, for the domain "test.mydomainname.com", you want to go to the file "/etc/bind/test.mydomainname.com" to look up the configuration.
<b>NOTE: </b> Notice that there's a "test." prefix on the domain. This is so that the test server can will be internal machine (ie wherever I'm we are going to point it to in the above-mentioned conf file) without affecting how other subdomains of the same domain. So "www.mydomainname.com" will still go to the live website (if that's what you wanted!).
Right, now create the following folder: "/etc/bind/". In here, you can store all the config files for each "zone" you want to configure. Once you've done that, you can create the config file "/etc/bind/test.mydomainname.com". The contents of this should be like this:
{{Code|<pre>CodeText=$TTL 604800
@ IN SOA ns.test.mydomainname.com. test.mydomainname.com. (
1 ; Serial
;
@ IN NS test.mydomainname.com.
test.mydomainname.com. IN A 192.168.0.40[</code]}}pre>
Here are some things to note about this:
3) Note also that all domain references have a final "." at the end!! This is important! So, instead of "test.mydomainname.com", it must be "test.mydomainname.com."
Right, once this is done, you'll need to restart your DNS server. I use the following command from the command line as a super user:
service named restart
Of course, you can also do this through the HDA control panel (go to HDA Setup, and then "Settings" from the tab bar, and then "Servers" from the sub tab bar. Expand the bit for "DNS Server" and click on "restart".
12,424

edits