On Mon, 13 Sep 2004 07:32:06 +0200, Tino Wildenhain <tino@wildenhain.de> wrote:
Hi,
Am Mo, den 13.09.2004 schrieb Royce um 1:14:
Reposting as I didn't get any help on this and have a big ZPublisher app I need to convert. I am willing to pay someone for their time to help solve this.
I have the proxying kind of working, using ProxyPass directives from apache port 80 to ZServer port 9673. Running into the <base href=...> headache (what I was calling BaseLocation problem in prior message), and am not sure what to do about it. For the full zope setup, SiteRoot works fine, but for my ZPublisher app, I'm having trouble. I think I need to create an equivalent to a SiteRoot object for the ZPublisher app, and insert it in one or more places, so it patches up the URLs correctly. Stuck in the thick forest - help! :)
I discovered by reading publisher code that I could set <base href=""> in my standard page header and that stopped zope from writing its <base href> tag, but still anywhere I use REQUEST.URL1 or similar, I am in apache/zserver port hell.
Any thoughts appreciated on this. As I said, I am willing to pay someone for their help.
This is not so hard as you think. First of all, throw away your SiteRoot object, since you wont need it when you run with Apache.
Create one Virtual Host Monster object (any id will do) but dont configure anything there. The manage Page of VHM should tell you how your URLs should look like when they come from the proxy.
Thanks, Tino! But will this work for my own python modules? I have two URL paths: 1. /z -- standard managed zope area 2. /app -- my python module which is a ZPublisher-based app that doesn't have /manage or the other "managed zope" stuff I have #1 working with SiteRoot (will switch to VHM). No help needed here. For #2 I modified z2.py per Amos' write up: "How to Publish Your Own Python Modules" (http://www.zope.org/Members/Amos/ZPublisher) ... (thanks, Amos!). But I can't get the "base href" set properly for this. Changes to z2.py shown below. I really appreciate any light people can shed on this. Remain willing to pay for help. Thanks! Royce In z2.py I have: zh = zhttp_handler(MODULE, 'z', HTTP_ENV) hs.install_handler(zh) # royce 8/22/04 sys.path.insert(0,'/app') # add MyModule to the Python path # create a handler my_handler = zhttp_handler('webapp/sessionMgr', 'ex/sessionMgr', HTTP_ENV) hs.install_handler(my_handler) # install it in the http server