mod_status ans X-Real-IP?
mod_status ans X-Real-IP?
am 22.03.2010 07:27:59 von Vladimir Dvorak - mailinglists
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
--
Vladimir Dvorak
Linux/Unix geek
Web: http://www.vdsoft.org
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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
Re: mod_status ans X-Real-IP?
am 22.03.2010 10:39:59 von Tom Evans
2010/3/22 Vladimir Dvorak - mailinglists :
> 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 origi=
nal
> host.
>
> Is there any possibility to "patch" mod_status.c (or anything else?) to b=
e
> 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
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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
Re: mod_status ans X-Real-IP?
am 22.03.2010 15:38:45 von Vladimir Dvorak - mailinglists
Tom Evans wrote:
> 2010/3/22 Vladimir Dvorak - mailinglists :
>
>> 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
--
Vladimir Dvorak
Linux/Unix geek
Web: http://www.vdsoft.org
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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
Re: mod_status ans X-Real-IP?
am 22.03.2010 16:32:03 von Tom Evans
On Mon, Mar 22, 2010 at 2:38 PM, Vladimir Dvorak - mailinglists
wrote:
> Tom Evans wrote:
>>
>> 2010/3/22 Vladimir Dvorak - mailinglists :
>>
>>>
>>> Hello to all,
>>>
>>> i need to view /server-status; Â problem is that my Apache is behin=
d 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/me tad=
ata/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=3Dcompile 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=3Dlink 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 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