09-21-05 07:51 AM
Is there a way of forwarding the IP address that the request has come
from?
I have a setup where I am using Apache and IIS on the same box.
In my httpd.conf I have a ProxyPass and ProxyReverse directive as
follows:
ProxyPass /dummy/ http://192.168.1.0:8080/dummy/
ProxyPassReverse /dummy/ http://192.168.1.0:8080/dummy/
I am using Apache 1.3.27 for Windows, IIS 6.0
Apache does the ProxyPass, but, attaches the IP address of the server
to the request, not that of the client.
As a result, in my log, all I'm ending up with is the server's IP
address, not the originating (client) IP address.
E.g. IIS Log (generated via .aspx):
ActionA, 192.168.1.0, 01/09/2005 15:33:02
ActionB, 192.168.1.0, 01/09/2005 15:33:03
ActionC, 192.168.1.0, 01/09/2005 15:33:07
ActionD, 192.168.1.0, 01/09/2005 15:33:34
ActionE, 192.168.1.0, 01/09/2005 15:33:40
The problem is, I wish to log the requests on IIS in my aspx pages,
doing a Request.UserHostAddress.ToString(); which results in the
server's ip address.
I've also tried: Request.UrlReferrer.Host.ToString(); which returns
null, probably meaning that apache is not putting a value in the
referrer portion of the forwarded request.
Is there a way to tell Apache to do this ProxyPass, but, somehow attach
the original request's IP address, not that of its own?
Thanks for any help anyone can offer.
[ Post a follow-up to this message ]
|