top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

Apache not recording client addresses correctly

+1 vote

I'm investigating a problem on an older server, and something strange is going on. Instead of the correct client address being logged in /var/httpd/*log, an apparently random address is logged instead.

Every client is logged as the same address. If I restart httpd, this address changes.

This is httpd-2.0.63 with php-4.3.9 running on CentOS 4.6. The RPMs for httpd and PHP verify OK, with the exception of httpd.conf and php.ini - i.e., the httpd server and libraries (and also all the dynamic libraries httpd is linked with) appear to be intact.

The address of open connections is returned correctly with netstat.

posted Sep 30, 2013 by Meenal Mishra

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button
Any chance someone is accessing your web site from a cell phone instant  messaging service?
That seems very unlikely.

If I connect from two different machines here, with 142.90/16 addresses,  both connections are logged as, or etc. Which are subnet addresses, not host addresses.

huh! wtf? - if I enable /server-status, the correct address for the  client asking for /server-status, is not just logged, but resolved, even though HostnameLookups is off. But other requests still get the 98.32  address.
This reverse resolution will almost certainly be because you are restricting access to that location (/server-status) by name rather than by IP address (perhaps inadvertently).

It doesn't explain what you are seeing for other locations, unfortunately. Are you using any third-party modules?

Similar Questions
+2 votes

My Apache server host few applications something like :


I would like to trace access for a specific application, eg. A. Is it possible?

Or should I use 'LogLevel info' and so log all applications into access.log file (then parsing for specific web page) ?

My config for logging is :

ErrorLog /var/log/apache2/error.log
LogLevel info
CustomLog /var/log/apache2/access.log combined
+2 votes

I'm trying to use the new If directive present from Apache 2.4, to configure an htaccess based authentication for a specific Location based to the client IP address. If a client hasn't an IP address related to the internal VLAN, I would set the password access.

What is the correct syntax to have this configuration? I noticed on the documentation that there is the "-ipmatch" condition, but I don't understand well this feature.

+4 votes

I have an application which sets up logging after parsing the args in the main() funktion. It needs to be setup after parsing the args because I can set the loglevel via commandline flags.

I have tried many variants on how to do that but every time with an weird result. What I want is logging in from all libs and really understand that doing this should be enough there:

from logging import getLogger

logger = getLogger(__name__)

But, I need to setup the logger in the main() function to log only to a file and not to console because my application has an own shell interface which should not be spammed with log messages - never a message should show up there.

I think it should be only some few lines of code but I can't figure that out. The logger should be configured to have a max file size and rotate logfiles. Can someone help me with this?

+2 votes

I am using the below appenders in my domain.xml file to point all the logs from my application to app.log. I see the file is getting created but there are no logging happening.

 <periodic-rotating-file-handler name="CACHE-FILE" autoflush="true">
            <level name="DEBUG"/>
               <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
            <file relative-to="jboss.server.log.dir" path="app.log"/>
            <suffix value=".yyyy-MM-dd"/>
            <append value="true"/>

           <logger category="" use-parent-handlers="false">
               <level name="DEBUG"/>
                  <handler name="CACHE-FILE"/>
0 votes

Running Apache 2.4.7 and current configuration limiting access to a directory to only clients that can provide a trusted client certificate. Server is SSL host. Would like to modify configuration to allow "local" clients (, etc. as defined by Require local auth provider) to access the directory without authenticating with a client certificate. So the local host may access the directory without SSL client auth, but all others must authenticate with a client certificate or access is forbidden. What is the best/proper way to do this?

I would like to use modern directives (avoiding Allow, Deny, Order etc. from mod_access_compat) but I am not clear how to combine Require related directives with mod_ssl options like SSLVerifyClient.

Thanks in advance?

Contact Us
+91 9880187415
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Karnataka INDIA.