httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 56094] New: mod_rewrite doesn't expose client_addr
Date Fri, 31 Jan 2014 11:15:56 GMT

            Bug ID: 56094
           Summary: mod_rewrite doesn't expose client_addr
           Product: Apache httpd-2
           Version: 2.4.7
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: mod_rewrite

quote from the httpd-devl-list:

> It looks to me like it is not exposed in mod_rewrite.
> I'd suggest opening a bug "mod_rewrite doesn't expose client_addr".
> For consistency, I'd suggest CONN_REMOTE_ADDR as in the expression parser

mod_rewrite can't distinguish between %a and %{c}a currently

the idea is that the proxy has and does SSL-termination
so it should use unecrypted connections to httpd, but in case
the connection comes from a different IP mod_rewrite is supposed
to redirect the request as shown below to https

without mod_remoteip the mod_rewrite snipped works as expected
so only a replacement for %{REMOTE_ADDR} would be needed that
uses the underlying peer IP address of the connection

<IfModule mod_remoteip.c>
 RemoteIPHeader X-Forwarded-For
<IfModule mod_rewrite.c>
 RewriteEngine on
 RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.1
 RewriteCond %{HTTPS} off
 RewriteRule (.*){REQUEST_URI}
%a     Client IP address of the request (see the mod_remoteip module).
%{c}a     Underlying peer IP address of the connection (see the mod_remoteip

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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message