- Can I get the real URL info into the Zope server?
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
On Tue, 22 Dec 1998 skip@calendar.com wrote:
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'
You have to provide the ZopeHTTPServer with the location. I haven't done it with ZHS yet, and I'm still using my options-based BHS, but you basically have to set: SERVER_NAME SERT_PORT HTTPS SCRIPT_NAME I probably have forgotten some of the variables. Basically you have more less to set all standard CGI variables to the expected frontend values. Andreas -- Win95: n., A huge annoying boot virus that causes random spontaneous system crashes, usually just before saving a massive project. Easily cured by UNIX. See also MS-DOS, IBM-DOS, DR-DOS, Win 3.x, Win98.
participants (2)
-
Andreas Kostyrka -
skip@calendar.com