httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matija Levec" <Matija.Le...@astec.si>
Subject [users@httpd] Apache strange(?) DNS problem
Date Tue, 11 May 2010 09:46:06 GMT
Hi.
I've got working configuration with Apache 2.0.46 on RHEL3 described below.

Apache is configured as forwarding proxy and has no other unusual config. 

proxy.conf:
Listen 172.x.x.x:8080
<VirtualHost 172.x.x.x:8080>
        ServerName proxy.localdomain
        ProxyRequests On
        ProxyVia On
...
</VirtualHost>

For administrative reasons some sites that are accessed via proxy are not addressed by their
FQDN - there are /etc/hosts entries instead. 
In /etc/nsswitch.conf there's hosts: files dns
So when client requests www.somesite.com (that has /etc/hosts entry), proxy retrieves the
data. Apache resolves name by using hosts file an not DNS.

Problem:
I have exactly the same configuration (Apache proxy, nsswitch, hosts, resolv.conf) with Apache
2.0.63 (or 2.2.3) on CentOS 5.4 but result is quite different.
Apache seems to ignore nsswitch.conf (and consequently hosts file) when proxying!
When client  requests www.somesite.com (that has /etc/hosts entry), Apache always tries to
resolve it using DNS and (of course) returns error "DNS lookup failure for:  www.somesite.com
"
I tested resolver configuration by pinging www.somesite.com and confirmed address is resolved
and working.

Is this expected behavior? Is there any way to force Apache to use settings in nsswitch.conf?

Thanks.
Matija


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message