You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Octavian Rasnita <or...@gmail.com> on 2007/01/24 21:56:27 UTC
mod_proxy
Hi all,
Does anyone have an example of setting Apache2 that use a reverse proxy with
mod_proxy?
I have set my own, but I receive some errors in the error log and I don't
know how to solve them, and I also don't know how to make the IP of the
visitor appear in the back-end server's access log.
Thank you for any help.
Octavian
Re: mod_proxy
Posted by Jonathan Vanasco <jv...@2xlp.com>.
On Jan 24, 2007, at 3:56 PM, Octavian Rasnita wrote:
> Hi all,
>
> Does anyone have an example of setting Apache2 that use a reverse
> proxy with mod_proxy?
>
> I have set my own, but I receive some errors in the error log and I
> don't know how to solve them, and I also don't know how to make the
> IP of the visitor appear in the back-end server's access log.
>
> Thank you for any help.
>
> Octavian
On the backend proxy, you can use this:
http://search.cpan.org/~jvanasco/Apache2-xForwardedFor-0.04/lib/
Apache2/xForwardedFor.pm
On the front end , you'll have to do some munging to get the ip in
the x-forwarded-for header. I use nginx on the front, not apache, so
can't help.
Some people prefer using x-real-ip , i don't.
// Jonathan Vanasco
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
| SyndiClick.com
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
| FindMeOn.com - The cure for Multiple Web Personality Disorder
| Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
| RoadSound.com - Tools For Bands, Stuff For Fans
| Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - -
Re: mod_proxy
Posted by Perrin Harkins <ph...@gmail.com>.
On 1/24/07, Octavian Rasnita <or...@gmail.com> wrote:
> Does anyone have an example of setting Apache2 that use a reverse proxy with
> mod_proxy?
There's no trick to it. The examples in the mod_proxy documentation
should work. You will need to turn ProxyPreserveHost on if you want
to use NameVirtualHost on the back-end server.
> I have set my own, but I receive some errors in the error log and I don't
> know how to solve them
It would help to see the errors.
> and I also don't know how to make the IP of the
> visitor appear in the back-end server's access log.
Usually people just use the access log from the proxy server instead.
- Perrin