ZServer/ZPublisher proxying, or move to "full zope"; need consultant
Hi all, I'm trying to get ZServer to serve a ZPublisher webapp. Previosly we used PCGI directly with apache (evolved from bobo days). Would like to move pieces into "full zope" land over time but have immediate need to get off the PCGI/apache solution as it has been hard to get/keep running on different Linux platforms. I have gotten it mostly running under ZServer fairly easily but resulted in a problem (#2) mentioned below. 1. Our website has html and img content (as well as dtml), which I understand ZServer won't serve. This seems to push me into either (a) apache proxying so that apache can serve html/imgs (results in problem #2 below), or (b) running full Zope via another URL path (having two zhttp_handler's in z2.py), and serving html/imgs from there (requiring me to change all refs to 'em). Suggestions? 2. Can SiteAccess fix the apache proxy BaseLocation URL problem for a ZPublisher/ZServer web app? I read the page (http://zope.org/Members/anser/apache_zserver) about using Evan Simpson's SiteAccess to fix the BaseLocation problem but it requires "full zope" and I'm running a ZPublisher webapp through ZServer. Any way to use this to hardwire a fix in ZServer? 3. Is there any way to pull a ZPublisher app into "full Zope" wholecloth as one big external method? I remember Amos mentioning this as possibility a while back. If not, would appreciate any pointers to docs or descriptions of how much work it is to bring it in a piece at a time. I have tried this route a little bit, but got pretty swamped in "import hell." 4. I would like to find a zope consultant to help us with problems like this on an hourly pay basis for a community website we run. Person should have several years zope-related programming experience, including experience with ZServer/ZPublisher. Please email me at mroyce AT gmail DOT com with a summary of your experience, availability, and hourly rate. Please put "Zope consultant" in message subject. Thanks! Royce
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. Thanks, Royce On Sun, 29 Aug 2004 19:18:10 -0700, Royce <mroyce@gmail.com> wrote:
Hi all,
I'm trying to get ZServer to serve a ZPublisher webapp. Previosly we used PCGI directly with apache (evolved from bobo days). Would like to move pieces into "full zope" land over time but have immediate need to get off the PCGI/apache solution as it has been hard to get/keep running on different Linux platforms. I have gotten it mostly running under ZServer fairly easily but resulted in a problem (#2) mentioned below.
1. Our website has html and img content (as well as dtml), which I understand ZServer won't serve. This seems to push me into either (a) apache proxying so that apache can serve html/imgs (results in problem #2 below), or (b) running full Zope via another URL path (having two zhttp_handler's in z2.py), and serving html/imgs from there (requiring me to change all refs to 'em). Suggestions?
2. Can SiteAccess fix the apache proxy BaseLocation URL problem for a ZPublisher/ZServer web app? I read the page (http://zope.org/Members/anser/apache_zserver) about using Evan Simpson's SiteAccess to fix the BaseLocation problem but it requires "full zope" and I'm running a ZPublisher webapp through ZServer. Any way to use this to hardwire a fix in ZServer?
3. Is there any way to pull a ZPublisher app into "full Zope" wholecloth as one big external method? I remember Amos mentioning this as possibility a while back. If not, would appreciate any pointers to docs or descriptions of how much work it is to bring it in a piece at a time. I have tried this route a little bit, but got pretty swamped in "import hell."
4. I would like to find a zope consultant to help us with problems like this on an hourly pay basis for a community website we run. Person should have several years zope-related programming experience, including experience with ZServer/ZPublisher. Please email me at mroyce AT gmail DOT com with a summary of your experience, availability, and hourly rate. Please put "Zope consultant" in message subject.
Thanks! Royce
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. With Apache mod_rewrite its like: RewriteEngine on RewriteRule ^/(.*) http://yourzopehost:zopeport/VirtualHostBase/http/%{HTTP_HOST}:80/VirtualHostRoot/$1 [P,L] Where %{HTTP_HOST} is replaced by apache with the hostname the client addressed. You can set a fixed name here too. HTH Tino Wildenhain
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
participants (2)
-
Royce -
Tino Wildenhain