[Zope] getting Apache's UNIQUE_ID into Zope?

Tom Cameron tom@cameron.to
Tue, 3 Jul 2001 20:56:52 +1000


I use the Mod_Rewrite rule with [QSA] Query String Append, to pass the
HTTP_HOST through like this...

RewriteRule ^/(.*)
http://localhost:8080/zopefolder/$1?REAL_HOST=%{HTTP_HOST} [QSA,P]

In this case I am using the proxy function of Mod_Rewrite, You can also do
this for cgi. I can then pick up the value as I do with any query string
value.

I expect you can do the same with any ENV variable. Look at the rewrite
rules in apache for more info.

Tom

=> -----Original Message-----
=> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Oleg
=> Broytmann
=> Sent: Tuesday, 3 July 2001 6:14 PM
=> To: Kevin L
=> Cc: zope@zope.org
=> Subject: Re: [Zope] getting Apache's UNIQUE_ID into Zope?
=>
=>
=> On Mon, 2 Jul 2001, Kevin L wrote:
=> > I'm currently converting an application from php to Zope. My app
=> > uses Apache's UNIQUE_ID env variable.
=> >
=> > Zope is running behind Apache with mod_rewrite and mod_proxy. Is
=> > it possible to pass the UNIQUE_ID variable in the rewrite rule
=> > so I can do <dtml-var UNIQUE_ID> in zope?
=>
=>    I am not sure. Probably mod_proxy is not the best thing to pass
=> environment variables. Try mod_pcgi2 or mod_fastcgi - they are a
=> little bit
=> faster, can pass entire environment and are more configurable.
=>
=>    http://www.zope.org/Members/phd/mod_pcgi2/
=>          http://www.fastcgi.com/
=>
=> Oleg.
=> ----
=>      Oleg Broytmann     http://www.zope.org/Members/phd/
=> phd@phd.pp.ru
=>            Programmers don't die, they just GOSUB without RETURN.
=>
=>
=> _______________________________________________
=> Zope maillist  -  Zope@zope.org
=> http://lists.zope.org/mailman/listinfo/zope
=> **   No cross posts or HTML encoding!  **
=> (Related lists -
=>  http://lists.zope.org/mailman/listinfo/zope-announce
=>  http://lists.zope.org/mailman/listinfo/zope-dev )
=>