From 6305033db4990e991b66751fbb3c9eddddd319ec Mon Sep 17 00:00:00 2001 From: Dmitry Morozovsky Date: Sun, 25 Jun 2006 07:08:13 +0000 Subject: [PATCH] CNAME'ing www to localhost seems to be useless, reCNAME it to '@' and describe specifically. tags do not grok tabs. Fix this at least in zone files where they look especially ugly. --- .../handbook/network-servers/chapter.sgml | 81 ++++++++++--------- 1 file changed, 44 insertions(+), 37 deletions(-) diff --git a/en_US.ISO8859-1/books/handbook/network-servers/chapter.sgml b/en_US.ISO8859-1/books/handbook/network-servers/chapter.sgml index 330ca7007e..2013b83364 100644 --- a/en_US.ISO8859-1/books/handbook/network-servers/chapter.sgml +++ b/en_US.ISO8859-1/books/handbook/network-servers/chapter.sgml @@ -3440,34 +3440,34 @@ zone "1.168.192.in-addr.arpa" { /etc/namedb/master/example.org) is as follows: - $TTL 3600 ; 1 hour -example.org. IN SOA ns1.example.org. admin.example.org. ( - 2006051501 ; Serial - 10800 ; Refresh - 3600 ; Retry - 604800 ; Expire - 86400 ; Minimum TTL - ) + $TTL 3600 ; 1 hour +example.org. IN SOA ns1.example.org. admin.example.org. ( + 2006051501 ; Serial + 10800 ; Refresh + 3600 ; Retry + 604800 ; Expire + 86400 ; Minimum TTL + ) ; DNS Servers - IN NS ns1.example.org. - IN NS ns2.example.org. + IN NS ns1.example.org. + IN NS ns2.example.org. ; MX Records - IN MX 10 mx.example.org. - IN MX 20 mail.example.org. + IN MX 10 mx.example.org. + IN MX 20 mail.example.org. - IN A 192.168.1.1 + IN A 192.168.1.1 ; Machine Names -localhost IN A 127.0.0.1 -ns1 IN A 192.168.1.2 -ns2 IN A 192.168.1.3 -mx IN A 192.168.1.4 -mail IN A 192.168.1.5 +localhost IN A 127.0.0.1 +ns1 IN A 192.168.1.2 +ns2 IN A 192.168.1.3 +mx IN A 192.168.1.4 +mail IN A 192.168.1.5 ; Aliases -www IN CNAME localhost +www IN CNAME @ Note that every hostname ending in a . is an @@ -3534,7 +3534,7 @@ www IN CNAME localhost example.org. IN SOA ns1.example.org. admin.example.org. ( - 2006051501 ; Serial + 2006051501 ; Serial 10800 ; Refresh after 3 hours 3600 ; Retry after 1 hour 604800 ; Expire after 1 week @@ -3593,11 +3593,11 @@ example.org. IN SOA ns1.example.org. admin.example.org. ( -localhost IN A 127.0.0.1 -ns1 IN A 192.168.1.2 -ns2 IN A 192.168.1.3 -mx IN A 192.168.1.4 -mail IN A 192.168.1.5 +localhost IN A 127.0.0.1 +ns1 IN A 192.168.1.2 +ns2 IN A 192.168.1.3 +mx IN A 192.168.1.4 +mail IN A 192.168.1.5 The A record indicates machine names. As seen above, @@ -3606,14 +3606,21 @@ mail IN A 192.168.1.5 -www IN CNAME localhost + IN A 192.168.1.1 + + This line assigns IP address + 192.168.1.1 to the current origin, + in this case example.org. + + +www IN CNAME @ The canonical name record is usually used for giving aliases to a machine. In the example, www is - aliased to the machine known as - localhost.example.org - (127.0.0.1). + aliased to the master machine which name equals + to domain name example.org + (192.168.1.1). CNAMEs can be used to provide alias hostnames, or round robin one hostname among multiple machines. @@ -3652,20 +3659,20 @@ www IN CNAME localhost $TTL 3600 1.168.192.in-addr.arpa. IN SOA ns1.example.org. admin.example.org. ( - 2006051501 ; Serial + 2006051501 ; Serial 10800 ; Refresh 3600 ; Retry 604800 ; Expire 3600 ) ; Minimum - IN NS ns1.example.org. - IN NS ns2.example.org. + IN NS ns1.example.org. + IN NS ns2.example.org. -1 IN PTR example.org. -2 IN PTR ns1.example.org. -3 IN PTR ns2.example.org. -4 IN PTR mx.example.org. -5 IN PTR mail.example.org. +1 IN PTR example.org. +2 IN PTR ns1.example.org. +3 IN PTR ns2.example.org. +4 IN PTR mx.example.org. +5 IN PTR mail.example.org. This file gives the proper IP address to hostname mappings of our above fictitious domain.