[Zope] - Can I get the real URL info into the Zope server?
skip@calendar.com (Skip Montanaro)
skip@calendar.com (Skip Montanaro)
Tue, 22 Dec 1998 09:05:11 -0500
I'm using Andreas' technique of running ZopeHTTPServer behind an Apache
server and using mod_rewrite and mod_proxy to pump requests to it.
Unfortunately, within the Zope environment I lose all indication of what the
original URL was. For instance, if you access
http://concerts.dolphin.calendar.com/z/check_request
you'll see a number of URL- and host-related fields:
BASE0: 'http://127.0.0.2:8043'
HTTP_HOST: '127.0.0.2:8043'
PARENT_URL: 'http://127.0.0.2:8043'
SERVER_NAME: 'concerts.dolphin.calendar.com'
URL: 'http://127.0.0.2:8043/check_request'
Only SERVER_NAME indicates the front-end server, and that only because I
started the server with SERVER_NAME=concerts.dolphin.calendar.com.
Is there a way to pump the real URL information across the boundary between
the proxy and Zope servers? In output pages I can't simply generate
server-relative URLs, because the PATH_INFO (or SCRIPT_NAME) is different
between the two servers. The Zope server doesn't know that /z/... in the
proxy server maps to /... in the Zope server. Ideally, this would be
something I'd pass in from the rewrite rule, since the mapping between proxy
and Zope servers is established on a per rewrite rule basis. Apache's
mod_rewrite still has a bit more black magic than I comprehend yet.
Skip