You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2003/06/22 17:36:44 UTC

DO NOT REPLY [Bug 21000] New: - HostnameLookups do not work with Apache 2.0

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21000>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21000

HostnameLookups do not work with Apache 2.0

           Summary: HostnameLookups do not work with Apache 2.0
           Product: Apache httpd-2.0
           Version: 2.0.46
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: web@bernd-feucht.de


Though I've set "HostnameLookups On" in my httpd.conf configuration file, DNS
lookups seem not to be performed by the Apache-2.0 server.
The "%h" field in the access_log file contains the IP of the client, not the
desired host name. And the REMOTE_HOST environment variable ist not set for CGI
scripts, only REMOTE_ADDR.
Also limiting access to a domain name (e.g. "Allow from mydomain.de") fails
(this should even work independently of the HostnameLookups setting).

To reproduce:
1) Build a default Apache/2.0.46 on a Unix/Linux system (./configure
--prefix=/some/path ; make ; make install).
2) In httpd.conf, change "HostnameLookups Off" to "HostnameLookups On".
3) Start the httpd server.
4) Get some document (e.g. /) from this server.

In access_log, only the client IP will be recorded in the "%h"-field of the
"common" log format used by default. There should be the client hostname instead.

In addition, by setting "chmod a+x cgi-bin/test-cgi" and getting
/cgi-bin/test-cgi from the server, the REMOTE_HOST variable is empty, only the
REMOTE_ADDR variable contains the correct client IP. It should contain the
client hostname.

Also, by setting "Order Deny,Allow", "Deny from all", "Allow from mydomain.de"
for some directory (with mydomain.de replaced by my own client domain), this
directory gets completely inaccessible. Here, Apache should make a reverse DNS
lookup for the client hostname (independently of the HostnameLookups setting)
and grant access if it matches mydomain.de.

I made default builts of Apache/2.0.46 on Linux kernel 2.4.18-4GB (SuSE 8.0,
using gcc 2.95.3) and Linux kernel 2.4.19-4GB (SuSE 8.1, using gcc 3.2).
I also tried the worker MPM instead of prefork (--with-mpm=worker).

In contrast, this problem does not exist for Apache/1.3.27: I've installed a
default Apache/1.3.27 server on the same machine with "HostnameLookups On", and
here everything works properly.

Regards,
Bernd Feucht

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org