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 2013/12/15 14:54:21 UTC

[Bug 55886] New: Apache 2.4 - incorrect (proxy, but not user) IP on server-status page

https://issues.apache.org/bugzilla/show_bug.cgi?id=55886

            Bug ID: 55886
           Summary: Apache 2.4 - incorrect (proxy, but not user) IP on
                    server-status page
           Product: Apache httpd-2
           Version: 2.4.7
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_status
          Assignee: bugs@httpd.apache.org
          Reporter: _lek@inbox.ru

I use Apache 2.4 with mod_realip and it works fine for custom_log - with
LogFormat modifier %a i get user IP in access_log from nginx X-Real-IP HTTP
header. But on status page i see nginx proxy address 127.0.0.1

In config i have:
RemoteIPHeader X-Real-IP
RemoteIPInternalProxy 127.0.0.0/8 ::1 
<Location /server-status>
    SetHandler server-status
    Require host 127.0.0.1
</Location>

I spent about half of a day to find a solution but with no success. Some people
tried to use ported mod_praf for 2.4, some did not find any solution.

http://www.gossamer-threads.com/lists/apache/users/426859

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 55886] Apache 2.4 - incorrect (proxy, but not user) IP on server-status page

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55886

Yann Ylavic <yl...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #6 from Yann Ylavic <yl...@gmail.com> ---
Reopening until backported to 2.4.x.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 55886] Apache 2.4 - incorrect (proxy, but not user) IP on server-status page

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55886

phpfpm1@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|2.4.7                       |2.4.9

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 55886] Apache 2.4 - incorrect (proxy, but not user) IP on server-status page

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55886

--- Comment #1 from Mike Rumph <mi...@oracle.com> ---
Okay, I did some research on this.

First of all, I get the same results in httpd trunk.

The timing between logging and mod_status appears to be okay.
But the two modules are taking information from two different locations.

mod_status is getting the client information from the "client" field in the
scoreboard record.
The "client" field in the scoreboard record is updated in
update_child_status_internal() in server/scoreboard.c by calling
ap_get_remote_host().

But as for the logging format fields:
%a comes from request->useragent_ip
%{c}a comes from request->connection->client_ip
%h comes from ap_get_remote_host()

So according to the code what you see in the %h field in the log is what you
will see in the client fields in the server_status page.

But this disagrees with what I see in the mod_remoteip documentation:
- http://httpd.apache.org/docs/trunk/mod/mod_remoteip.html
"Once replaced as instructed, this overridden useragent IP address is then used
for the mod_authz_host <Require ip> feature, is reported by mod_status, and is
recorded by mod_log_config %a and core %a format strings. The underlying client
IP of the connection is available in the %{c}a format string."

So either the documentation should be changed or update_child_status_internal()
should be using request->useragent_ip to update the "client" field.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 55886] Apache 2.4 - incorrect (proxy, but not user) IP on server-status page

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55886

--- Comment #4 from Dave <da...@alfar.co.uk> ---
I've also noticed this - a simple solution is to record the useragent instead
of connection IP in the scoreboard, although it may not be the behaviour
expected or desired by everyone.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 55886] Apache 2.4 - incorrect (proxy, but not user) IP on server-status page

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55886

phpfpm1@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |phpfpm1@gmail.com
            Version|2.4.9                       |2.4.10
           Severity|normal                      |major

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 55886] Apache 2.4 - incorrect (proxy, but not user) IP on server-status page

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55886

--- Comment #2 from phpfpm1@gmail.com ---
Any news about the issue?

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 55886] Apache 2.4 - incorrect (proxy, but not user) IP on server-status page

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55886

--- Comment #3 from Dave <da...@alfar.co.uk> ---
Created attachment 31706
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=31706&action=edit
Record useragent IP in scoreboard

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 55886] Apache 2.4 - incorrect (proxy, but not user) IP on server-status page

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55886

Yann Ylavic <yl...@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #7 from Yann Ylavic <yl...@gmail.com> ---
Backported to 2.4.11 in r1627744.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 55886] Apache 2.4 - incorrect (proxy, but not user) IP on server-status page

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=55886

phpfpm1@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from phpfpm1@gmail.com ---
It's fixed in trunk now:
https://github.com/apache/httpd/commit/4587109ba9396e5581c66f8fa8db2fd80a809313#diff-4daad1c6042697da3da10556cbc8615f

-- 
You are receiving this mail because:
You are the assignee for the bug.

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