[Zope-Annce] [Ann] VHM RemoteAddr patch

Dieter Maurer dieter@handshake.de
Tue, 7 May 2002 19:56:13 +0200


VirtualHostMonster, or short VHM, is usually used together with
Apache's rewrite rules and proxy mode to implement virtual
hosting. Unfortunately, when used in this way, Zope's REMOTE_ADDR is
the (usually uninteresting) IP address of the Apache server and not
the one of the browser/its proxy. There is an Apache patch that passes
this IP address via an VIA header, but this is against the HTTP 1.1
spec.

This VHM patch enables VHM to take the remote address from the URL. If
the URL segments following the VirtualHostBase/protocol/host are
VirtualHostRemoteAddr/remote_addr, then VHM sets Zope's REMOTE_ADDR to
remote_addr. This feature is used together with Apache rewrite rules
of the form:

RewriteRule pattern
http://localhost:8080/VirtualHostBase/proto/host/VirtualHostRemoteAddr/%{REMOTE_ADDR}/something [P].


For download see

  <http://www.dieter.handshake.de/pyprojects/zope>



Dieter