This is G o o g l e's cache of http://www.debianclub.com/node/21 as retrieved on 17 Feb 2007 19:14:31 GMT.
G o o g l e's cache is the snapshot that we took of the page as we crawled the web.
The page may have changed since that time. Click here for the current page without highlighting.
This cached page may reference images which are no longer available. Click here for the cached text only.
To link to or bookmark this page, use the following url: http://www.google.com/search?hl=en&q=cache%3Ahttp%3A%2F%2Fwww.debianclub.com%2Fnode%2F21&btnG=Search


Google is neither affiliated with the authors of this page nor responsible for its content.

User login

Links

debianclub.com
debian.org
ubuntuclub.com
blognone.com

Syndicate

Syndicate content

# DNS Server หลาย zone ในเครื่องเดียวกัน

ไม่รู้ตั้งคำถาม ถูกปล่าว
ระบบ sarge, apache2, bind9
IP: 1.2.3.4 (IP สมมติ)
ใน Hosting นี้จะมี เว็บไซต์อยู่ สามเว็บ ใช้ IP เดียวกัน(1.2.3.4)
1. exam.com
2. sample.com
3. demo.com
เราจะ set ตัว DNS Server(bind9) คุมโซนทั้งสาม อย่างไรครับ
งมมานานแล้ว
ขอบคุณครับ

Examples..

/etc/bind/named.conf.local

//
// Do any local configuration here
//
zone "exam.com" {
        type master;
        file "/etc/bind/db.exam.com";
};

zone "sample.com" {
        type master;
        file "/etc/bind/db.sample.com";
};

zone "demo.com" {
        type master;
        file "/etc/bind/db.demo.com";
};

/etc/bind/db.exam.com

;
; BIND data file for exam.com
;
$TTL    604800
@       IN      SOA     exam.com. root.exam.com. (
                              1         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
@       IN      NS      ns
@       IN      A       1.2.3.4

www     IN      A       1.2.3.4
ftp             CNAME   www

/etc/bind/db.sample.com

;
; BIND data file for sample.com
;
$TTL    604800
@       IN      SOA     sample.com. root.sample.com. (
.
.
.

/etc/bind/db.demo.com

;
; BIND data file for demo.com
;
$TTL    604800
@       IN      SOA     demo.com. root.demo.com. (
.
.
.

หลังจากนั้นลองทดสอบว่า config ใหม่ถูกต้องหรือเปล่า

# named-checkconf -z

zone localhost/IN: loaded serial 1
zone 127.in-addr.arpa/IN: loaded serial 1
zone 0.in-addr.arpa/IN: loaded serial 1
zone 255.in-addr.arpa/IN: loaded serial 1
zone exam.com/IN: loaded serial 1
zone sample.com/IN: loaded serial 1
zone demo.com/IN: loaded serial 1

ตรวจสอบ zone (ถ้าำคำสั่งข้างบน ไม่มี Error ก็ข้ามขั้นตอนนี้ได้)

# named-checkzone exam.com /etc/bind/db.exam.com

zone exam.com/IN: loaded serial 1
OK

# named-checkzone sample.com /etc/bind/db.sample.com
# named-checkzone demo.com /etc/bind/db.demo.com

ถ้าถูกต้องหมด สั่งให้ bind9 เริ่มทำงานใหม่อีกครั้ง

# /etc/init.d/bind9 restart

ตอบมาซะยืดยาว ... ไม่รู้ถูกต้องตามจุดประสงค์คนถามหรือเปล่าครับ อิอิ :P

ส่วนเรื่องที่จะ เป็น Web Host ให้ทั้่ง 3 Domain นี้ ต้องไปตั้งค่าใน Apache config อีกทีครับ


**********************
Key ID: D4CEFD37
Fingerprint: 1ED3 27F6 48C8 5C9D 4285 F24D D64E C0AF D4CE FD37
**********************

ตรงเป๊ะคร

ตรงเป๊ะครับ
ตอนแรกคิดว่าต้องทำ reverse file ด้วย
ไฟล์ named.conf เราก็ไม่ต้องไปยุ่ง ใช่ปล่าวครับ
ขอบคุณครับ

reverse zone..

ผมก็นั่งพิจารณาอยู่พอสมควรครับ ก็เลยไม่เซ็ต Reverse Zone
แต่จริง ๆ ถ้าเราดูแล Reverse Zone ด้วยก็ต้องเซ็ตครับ
ในกรณี้อาจจะชี้ไปที่ domain ใดซักตัวก็ได้ครับ

เพราะเท่าที่เห็นถ้าเป็น Reverse จะจับคู่แบบ 1 ต่อ 1
ผมไม่แน่ใจว่ามีแบบอื่นหรือเปล่าครับ :)


**********************
Key ID: D4CEFD37
Fingerprint: 1ED3 27F6 48C8 5C9D 4285 F24D D64E C0AF D4CE FD37
**********************