Forum Moderators: phranque

Message Too Old, No Replies

Send forwarded client's IP as request IP?

Send client's IP address to request data from a server

         

FormosaKing

12:58 am on Jun 22, 2009 (gmt 0)

10+ Year Member



So here's my set up:

Server A - Load balancer set up using Pound. Forwards HTTP requests to one of two back-end non-local servers (B,C).

Servers B,C - Running apache 2, and hosting websites with advertisements.

But since Server A is connecting to Servers B and C, the clients' IPs aren't shown, and thus the traffic does not generate me any income for certain advertisers. Also, Awstats shows a single host.

How do I get around this? Don't know what the solution is called and couldn't look for it.

Thanks!

jdMorgan

1:04 am on Jun 22, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



See HTTP X-Forwarded-For request header. You must configure your front end to send this header to your back-end servers, configure your back-end servers to log X-Forwarded-For instead of Remote-Addr or Remote-Host, and tweak your "stats" software to use that header as well.

Jim

FormosaKing

9:30 am on Jun 22, 2009 (gmt 0)

10+ Year Member



Thanks! By the way, for anyone else seeking an answer to this problem, look up mod_rpaf. It appears to do the trick fine.