httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matija Levec" <>
Subject [users@httpd] Apache strange(?) DNS problem
Date Tue, 11 May 2010 09:46:06 GMT
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. 

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

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 (that has /etc/hosts entry), proxy retrieves the
data. Apache resolves name by using hosts file an not DNS.

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 (that has /etc/hosts entry), Apache always tries to
resolve it using DNS and (of course) returns error "DNS lookup failure for:
I tested resolver configuration by pinging and confirmed address is resolved
and working.

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


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message