[Zope] REMOTE_ADDR unavailable when using Virtual host

robert robert@redcor.ch
Mon, 2 Jun 2003 07:02:10 +0200


Good morning Dieter,
thanks for your tip.
I had tried your patch allredy. However it did not work. Somehow the condit=
ion
+            if stack and stack[-1] =3D=3D 'VirtualHostRemoteAddr':
was never true (I checked by having the stack printed).
My solution is patching ZServer/HTTPServer.py to add "REMOTE_ADDR_X" to its=
=20
list of variables which I then check.
This works but seems ugly and akward.

Robert

Am Sonntag, 1. Juni 2003 22:53 schrieb Dieter Maurer:
> robert wrote at 2003-6-1 15:32 +0200:
>  > I am using a Zope installation on a windows 200 server behind an Apache
>  > 2.
>  >
>  > Accessing the site trough ZMI i get the correct REQUEST.REMOTE_ADDR.
>  >
>  > When I do the same in a product, request.REMOTE_ADDR contains the serv=
er
>  > IP address.
>
> On my Zope page, you will find a VHM patch that allows Apache
> to pass in the correct remote addr.
>
>
>   <http://www.dieter.handshake.de/pyprojects/zope>
>
>
>
> Dieter
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )

=2D-=20
mit freundlichen Gr=FCssen

Robert Rottermann
www.redCOR.ch