Main Stories
Slash Boxes

Slash Open Source Project

Slashcode Log In

Log In

[ Create a new account ]

Article Poll

Poll I found this article to be
Very Helpful
Helpful
Not Helpful
Not Very Helpful
[ Results | Polls ]
Comments:0 | Votes:0

mod_perl and mod_proxy revisited

posted by Krow on 09:28 AM March 12th, 2002   Printer-friendly   Email story
Many of us have chosen the mod_proxy route to effeciently serve plain html and mod_perl content. The one problem I've come across is Slashcodes IPIDs and SubnetIDs, they are all the same! This is caused by the IP address of the proxy server, rather than the user requesting the page. I've searched through perl.apache and found a startup.pl which is suppose to grab the X-Forwarded-For header, but haven't gotten it to work. I'd like to know what others have done to fix this problem.
This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login
Loading... please wait.
  • Same problem, yet I haven't bothered to chase down a quick solution. Same problem is occuring when using webalizer.

    --
    One future, two choices. Oppose them or let them destroy us.
  • After some research and testing, here is the solution. This applies to Mandrake 8.0 + distributions which proxies mod_perl to a seperate server by default. Assuming apache is configured and running with DSO support:

    Download the proxy IP handler from
    http://freshmeat.net/projects/mod_proxy_add_ forwar d.c/

    /usr/sbin/apxs mod_proxy_add_forward.c

    Make sure httpd.conf contains the following lines:

    -----
    AddModule mod_proxy_add_forward.c

    <IfDefine PERLPROXIED>
    RewriteEngine on
    RewriteRule