Xin chỉ giúp hiện tượng ping được nhưng không truy cập web được (trên localhost) mặc dù Apache được start .
/var/named/chroot/etc/named.conf
Trích:
options {
directory "/var/named";
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
//The DNS server's internal use only
allow-query{
127.0.0.1;
192.168.1.0/24;
};
// The DNS server cache server to be used as the only internal
allow-recursion{
127.0.0.1;
192.168.1.0/24;
};
//The DNS server is inside the zone where only data transfer
allow-transfer{
127.0.0.1;
192.168.1.0/24;
};
//If the environment is connected via a router's IP address Routers
forwarders{
203.162.4.190;203.162.4.191;
};
};
//
// a caching only nameserver config
//
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
logging {
category lame-servers { null; };
};
include "/etc/rndc.key";
zone "home.local" IN {
type master;
file "home.local.db";
allow-update { none; };
};
zone "1.168.192.in-addr.arpa" IN {
type master;
file "1.168.192.in-addr.arpa.db";
allow-update { none; };
};
|
/var/named/chroot/var/named/home.local.db
Trích:
$TTL 86400
@ IN SOA home.local. root.home.local.(
2005120201 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS home.local.
IN MX 10 mail.home.local.
@ IN A 192.168.1.100
mail A 192.168.1.100
$ORIGIN home.local.
@ IN A 192.168.1.100
www IN A 192.168.1.100
ftp IN A 192.168.1.100
mail IN A 192.168.1.100
|
Trích:
/var/named/chroot/var/named/1.168.192.in-addr.arpa.db
$TTL 86400
@ IN SOA mail.home.local. root.home.local.(
2004031901 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS mail.home.local.
4 IN PTR mail.home.local.
|
echo "nameserver 192.168.1.100" > /etc/resolv.conf
apache
ServerName hostname.local:80
Mở trình duyệt gõ hostname.local hoặc mail.hostname.local đều không truy cập được web chạy trên localhost, gõ IP của thì truy cập được .