Halderen v AW wrote:
> I don't understand your complete setup, you might want post a more
> complete bind configuration file and the VirtualHost snippet of the
> Apache server you have a problem with (or mail them to me).
> If you do a "host name.testdomain.com" on the server running the Apache,
> having cleared its /etc/hosts, does it resolve to an IP number?
> If so Apache should run, and we need a little more info on the config
> files.
The bind setup on 192.168.1.3 (my DNS testing host):
"/etc/bind/named.conf" contains (in addition to general standard zones
and stuff):
zone "testdomain.com" in {
type master;
file "db.testdomain.com";
};
zone "1.168.192.in-addr.arpa" in {
type master;
file "db.1.168.192";
};
"db.testdomain.com" contains:
$TTL 3h
@ IN SOA dns.testdomain.com. my.email.com. (
2005100102 ; Serial
3h ; Refresh after 3 hours
1h ; Retry after 1 hour
1w ; Expire after 1 week
1h ) ; Negative caching TTL of 1 hour
; Nameservers
IN NS dns.testdomain.com.
; Host addresses
IN A 192.168.1.1
dns IN A 192.168.1.3
; Aliases
* IN CNAME @
"db.1.168.192" contains:
$TTL 3h
@ IN SOA dns.testdomain.com. my.email.com.(
2005100101 ; Serial
3h ; Refresh after 3 hours
1h ; Retry after 1 hour
1w ; Expire after 1 week
1h ) ; Negative caching TTL of 1 hour
; Name servers
IN NS dns.testdomain.com.
; Address PTR
1 IN PTR testdomain.com.
3 IN PTR dns.testdomain.com.
My Apache config at 192.168.1.1:
"/etc/apache/httpd.conf" contains:
NameVirtualHost 192.168.1.1
<VirtualHost test.testdomain.com>
ServerAdmin
my@email.com
DocumentRoot /var/wwwdata/test.testdomain.com
ServerName test.testdomain.com
ErrorLog /var/log/apache/host.test.testdomain.com-error.log
TransferLog /var/log/apache/host.test.testdomain.com-access.log
</VirtualHost>
<VirtualHost anothertest.testdomain.com>
ServerAdmin
my@email.com
DocumentRoot /var/wwwdata/anothertest.testdomain.com
ServerName anothertest.testdomain.com
ErrorLog /var/log/apache/host.anothertest.testdomain.com-error.log
TransferLog
/var/log/apache/host.anothertest.testdomain.com-access.log
</VirtualHost>
....
Other config files on 192.168.1.1:
"/etc/resolv.conf" contains:
search testdomain.com
nameserver 192.168.1.3
nameserver xxx.xxx.xxx.xxx (my ISP's DNS servers)
nameserver yyy.yyy.yyy.yyy
"/etc/nsswitch.conf" contains:
hosts: files dns
"/etc/hosts" contains (only non-IPv6 content):
127.0.0.1 testserver localhost
Doing "host test.testdomain.com" with this setup returns the correct IP
number (192.168.1.1). Doing "host 192.168.1.1" returns "testdomain.com"
which is what i expected.
Restarting Apache results in "Cannot resolve host name
test.testdomain.com -- Ignoring!" errors in my syslog for all my
VirtualHosts.
Is there other tools that use the exact same resolving as Apache that I
can use to get more debugging information?
Let me know if you see anything in my setup that may cause the errors.
I appreciate your help!
--
Svein Arild Bergset