httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Evans <tevans...@googlemail.com>
Subject Re: [users@httpd] mod_status ans X-Real-IP?
Date Mon, 22 Mar 2010 15:32:03 GMT
On Mon, Mar 22, 2010 at 2:38 PM, Vladimir Dvorak - mailinglists
<vladimir.dvorak@vdsoft.org> wrote:
> Tom Evans wrote:
>>
>> 2010/3/22 Vladimir Dvorak - mailinglists <vladimir.dvorak@vdsoft.org>:
>>
>>>
>>> Hello to all,
>>>
>>> i need to view /server-status;  problem is that my Apache is behind the
>>> http
>>> proxy (nginx) and status page shows only IP of proxy, not the IP of
>>> original
>>> host.
>>>
>>> Is there any possibility to "patch" mod_status.c (or anything else?) to
>>> be
>>> able to show X-Real-IP variable? (I pass X-Real-IP in HTTP header to
>>> Apache).
>>>
>>> Thank you in advance for your suggestions.
>>>
>>> Vladimir
>>>
>>>
>>
>> mod_rpaf2 or mod_remoteip can be configured to do this. It won't patch
>> mod_status, it will make the request appear to come from the client IP
>> in all cases.
>>
>> Cheers
>>
>> Tom
>>
>> ---------------------------------------------------------------------
>>
>
> Thank you Tom for your hint. mod_rpaf2 works excellent!
>
> Note: We use Debian Lenny with its Apache 2.2.x and mod_remoteip is just for
> 2.3.x branch.
>
> Vladimir
>

No probs. mod_remoteip is for 2.3, but it will compile cleanly for
2.2.x as well (any chance of a backport for 2.2.16 devs?).

tom@ethan '15:28:31' '~/mod_remoteip'
> $ svn cat http://svn.apache.org/repos/asf/httpd/httpd/trunk/modules/metadata/mod_remoteip.c
> mod_remoteip.c
tom@ethan '15:30:03' '~/mod_remoteip'
> $ apxs -c mod_remoteip.c
/usr/local/share/apr/build-1/libtool --silent --mode=compile cc
-prefer-pic -O2 -pipe -I/usr/include -fno-strict-aliasing   -O2 -pipe
-I/usr/include -fno-strict-aliasing -I/usr/local/include
-I/usr/local/include/apache22  -I/usr/local/include/apr-1
-I/usr/local/include/apr-1 -I/usr/local/include
-I/usr/local/include/db42  -c -o mod_remoteip.lo mod_remoteip.c &&
touch mod_remoteip.slo
/usr/local/share/apr/build-1/libtool --silent --mode=link cc -o
mod_remoteip.la  -rpath /usr/local/libexec/apache22 -module
-avoid-version    mod_remoteip.lo


Cheers

Tom

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


Mime
View raw message