httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Smith <>
Subject Original IP address through a proxy?
Date Wed, 16 Sep 1998 17:12:23 GMT
Hi Chaps (Chapesses?),

Long time since I've asked a stupid question (I usually reserve them for
the mod_perl list), so here goes.

I'm using mod_proxy as a reverse proxy server such that certain requests
are processed on a different apache server to that visible to the
outside world, so it looks something like this:

Client ------> HTTP server 1 ------> HTTP server 2

So the request is actually processed on HTTP server 2.  Now I'd like
HTTP server 2 to be able to know the IP address of the Client, for
logging and so forth.  In my setup, REMOTE_ADDR contains the IP address
of HTTP server 1, and there aren't any environment variables which
contain the IP address of the Client.

I can think of a few ways of doing this, but they're pretty messy.  HTTP
server 1 could add the IP address at the front of the URI, and then HTTP
server 2 could take it off again and stick it in to an environment
variable, but this seems *really* nasty (even by the standards of some
of the nasty things I do).

So, I feel there ought to be a clean way of being able to do this kind
of thing.  Any of you people-that-know-what-you're-doing have any

Much appreciated, as ever


View raw message