----- Original Message ----- From: "Oliver Hookins" <[EMAIL PROTECTED]>
To: <zope@zope.org>
Sent: Wednesday, August 16, 2006 10:26 AM
Subject: [Zope] Logging client IPs to Z2.log

Hi there,

First up:
Python 2.4.2
Zope 2.9.4

I'm a relative Zope newbie so please forgive my ignorance but I have not been able to find an answer anywhere else. AFAIK there are a couple of options for
running Zope behind Apache - PCGI/FCGI or mod_proxy. It seems PCGI/FCGI is
deprecated in later versions and mod_proxy is recommended.

However, when running Zope behind mod_proxy all of the requests to Zope
naturally come from the webserver (in this case running on the same machine)
hence all entries in Z2.log are prefixed by a client address of

I have the following options turned on:
trusted-proxy  (in zope/etc/zope.conf)

ProxyPass /
ProxyPassReverse /
ProxyPreserveHost On
ProxyVia On
(in the vhost config in apache)

The trusted-proxy parameter seems to related to the X-Forwarded-For header which doesn't appear to be dealt with by Apache. It would seem that neither Apache nor Zope can communicate the client's IP by the methods I have used, as Z2.log still
contains for every request.

So... is it at all possible to log the real client IPs in Z2.log using
mod_proxy? If not what is going to happen when (and if) PCGI/FCGI support is

It may be that you need to reconfigure apache, have a look at the apache docs:


Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to