William Noon wrote:
Last week I was setting up an Apache VirtualHost to point to a Zope object tree using the ProxyPass directive and SiteAccess to get all the urls right (great stuff!).
However, I noticed that the REMOTE_ADDR was always set to the proxy host. This makes sense because Zope just gets the host/port from the socket connection. But I needed the real remote_addr for logging and user admin. Adding 'Header's wouldn't pass the info to Zope.
The Zope mail archives mentioned the problem a couple of times without a configuration fix.
A simple fix to the proxy module (in proxy_http.c) will create a new header called 'Original-Addr' to contain the client's ip address.
Also, take a look at mod_proxy_add_forward for Apache, and these other resources: http://www.zope.org/Members/stephen/ApacheProxyPatch http://modules.apache.org/search?id=124 ftp://ftp.netcetera.dk/pub/apache/mod_proxy_add_forward.c I believe there is some code in mod_proxy_add_forward to deal with getting the client's IP address from chains of proxies. -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net