[Zope] RE: accessing REMOTE_ADDR
Chris Keyes
chrisk@nipltd.com
Tue, 2 Oct 2001 15:02:39 +0100
You can use apache rewrite rules when virtual hosting Zope instances and as
far as I know, it works just the same as having a direct conection to the
Zope Instance... Unlike proxying, the zope instance should reply directly to
the client so it must have access to their ip address....
There is some documentation about, but this is an extract of what we use...
The Zope instance has a Virtual Host Monster in its root to enable all this
to work properly.
Apache rewrite rule:
<VirtualHost localzopehost>
ServerName server.nipltd.com
ServerAdmin adminemail@yourdomain.com
RewriteEngine On
RewriteRule ^/error/(.*)$ /error/$1 [L])
RewriteRule ^(.*)$
http://localhost:8080/VirtualHostBase/http/server.nipltd.com:80/VirtualHostR
oot$1 [P]
ProxyPassReverse /
http://localhost:8080/VirtualHostBase/http/server.niptld.com:80/VirtualHostR
oot/
ErrorDocument 502 /yourerrordocument
CustomLog /yourlogs/access_log combined
ErrorLog /yourlogs/error_log
</VirtualHost>
I think you should just be able to fill that in and off you go...
Good luck!
ChrisK