Apache strange(?) DNS problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux