Re: [Zope] Apache in front of ZServer
* "Phil Harris" [EMAIL PROTECTED] | Jorn, | | I'm no Apache GrandMaster but couldn't you use the [p] option of a | RewriteRule to make it proxy if the url matches a pattern: | | RewriteEngine on | RewriteRule !^(/static/.*) http://myserver.com:8080$1 [p,l] | | Or something along those lines. Looks promising. I will come back to the results later, when I have tested it. Thanks again. -- Jørn Helge B. Dahl http://falch.net ___ Zope maillist - [EMAIL PROTECTED] 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 )
Re: [Zope] Apache in front of ZServer
Jorn, It's perfectly possible, you just need to do a little work ;) Your proxy pass will be something like this: ProxyPass / http://myserver.com:8080/ ProxyPassReverse http://myserver.com:8080/ / for the other part of serving static content, it really depends what you want but here are two ways to do it. 1.use the LocalFileSystem product, http://www.zope.org/Products/Members/jfarr/Products/LocalFS/LocalFS-0.9.6.tg z 2.use Apache to intercept calls to a specific dir before passing it onto Zope, e.g. use a RewriteRule. hth Phil - Original Message - From: "Jørn Helge B. Dahl" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, October 24, 2000 9:39 AM Subject: [Zope] Apache in front of ZServer Hi all! I am aware of URL: http://www.zope.org/Members/anser/apache_zserver, but I am looking for at way to make Apache serve Zope from the root URL. It is possible to make the apache front end http://machine.domain.com/Zope be served by zope backend http://machine.domain.com:8080, but what really want is to make apache frontend http://machine.domain.com be served by Zope, and still be able to serve static content from selected locations. Example: http://machine.domain.com/- Zope w/Apache frontend http://machine.domain.com/static - Apache static Am I clear? Is it possible to do that without NameVirtualHost? -- Jørn Helge B. Dahl System Administrator http://falch.net ___ Zope maillist - [EMAIL PROTECTED] 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 ) ___ Zope maillist - [EMAIL PROTECTED] 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 )
Re: [Zope] Apache in front of ZServer
* "Phil Harris" [EMAIL PROTECTED] | Jorn, | | It's perfectly possible, you just need to do a little work ;) That's OK, that way it'll be more fun :-) | Your proxy pass will be something like this: | | ProxyPass / http://myserver.com:8080/ | ProxyPassReverse http://myserver.com:8080/ / I had that one already figured out. but I thought the ProxyPassReverse directive was to be the other way around: To be exactly like the ProxyPass directive? | for the other part of serving static content, it really depends what you | want but here are two ways to do it. | | 1.use the LocalFileSystem product, | http://www.zope.org/Products/Members/jfarr/Products/LocalFS/LocalFS-0.9.6.tg | z That I already do, so that one is okay. | 2.use Apache to intercept calls to a specific dir before passing it onto | Zope, e.g. use a RewriteRule. Yup, this is what I need. I think was being unclear about what I really -wanted: I want to still be able to use php and such thing, even if I serve Zope from root. So the RewriteRule does the trick? Thanks Phil, -- Jørn Helge B. Dahl System Administrator http://falch.net ___ Zope maillist - [EMAIL PROTECTED] 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 )
Re: [Zope] Apache in front of ZServer
* [EMAIL PROTECTED] (JXrn Helge B. Dahl) | | for the other part of serving static content, it really depends what you | | want but here are two ways to do it. | | | | 1.use the LocalFileSystem product, | | http://www.zope.org/Products/Members/jfarr/Products/LocalFS/LocalFS-0.9.6.tg | | z | | That I already do, so that one is okay. | | | 2.use Apache to intercept calls to a specific dir before passing it onto | | Zope, e.g. use a RewriteRule. | | Yup, this is what I need. I think was being unclear about what I really | -wanted: I want to still be able to use php and such thing, even if I | serve Zope from root. So the RewriteRule does the trick? On a second thought: What I _really_ want (I think, unless someone tells me differently :-) ) is a conditional ProxyPass, to tell apache to redirect everything _unless_ the URI is /static (or something). But this is probably something for apache geeks. Thanks anyway. -- Jørn Helge B. Dahl http://falch.net ___ Zope maillist - [EMAIL PROTECTED] 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 )
Re: [Zope] Apache in front of ZServer
Jorn, I'm no Apache GrandMaster but couldn't you use the [p] option of a RewriteRule to make it proxy if the url matches a pattern: RewriteEngine on RewriteRule !^(/static/.*) http://myserver.com:8080$1 [p,l] Or something along those lines. hth Phil [EMAIL PROTECTED] - Original Message - From: "Jørn Helge B. Dahl" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, October 24, 2000 1:40 PM Subject: Re: [Zope] Apache in front of ZServer * [EMAIL PROTECTED] (JXrn Helge B. Dahl) | | for the other part of serving static content, it really depends what you | | want but here are two ways to do it. | | | | 1.use the LocalFileSystem product, | | http://www.zope.org/Products/Members/jfarr/Products/LocalFS/LocalFS-0.9.6.tg | | z | | That I already do, so that one is okay. | | | 2.use Apache to intercept calls to a specific dir before passing it onto | | Zope, e.g. use a RewriteRule. | | Yup, this is what I need. I think was being unclear about what I really | -wanted: I want to still be able to use php and such thing, even if I | serve Zope from root. So the RewriteRule does the trick? On a second thought: What I _really_ want (I think, unless someone tells me differently :-) ) is a conditional ProxyPass, to tell apache to redirect everything _unless_ the URI is /static (or something). But this is probably something for apache geeks. Thanks anyway. -- Jørn Helge B. Dahl http://falch.net ___ Zope maillist - [EMAIL PROTECTED] 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 ) ___ Zope maillist - [EMAIL PROTECTED] 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 )
Re: [Zope] Apache in front of ZServer
"JHBD" == JXrn Helge B Dahl [EMAIL PROTECTED] writes: JHBD On a second thought: What I _really_ want (I think, unless JHBD someone tells me differently :-) ) is a conditional JHBD ProxyPass, to tell apache to redirect everything _unless_ JHBD the URI is /static (or something). The ugly solution, until you find a clean one, is to have a second apache process :-), and the first proxy-forwards to either Zope or the second Apache. (I'm doing something like that for our home server, so I'm intrigued as to whether you can provide a clean solution...). best, -tony -- A.J. RossiniRsrch. Asst. Prof. of Biostatistics BlindGlobe Networks (home/default) [EMAIL PROTECTED] UW Biostat/Center for AIDS Research [EMAIL PROTECTED] FHCRC/SCHARP/HIV Vaccine Trials Net [EMAIL PROTECTED] FHCRC: M/Tu: 206-667-7025 (fax=4812) | Voicemail is pretty sketchy CFAR: W/F: 206-731-3647 (fax=3694) | Email is far better than phone UW:Th/F: 206-543-1044 (fax=3286) | Change last 4 digits of phone for fax ___ Zope maillist - [EMAIL PROTECTED] 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 )
Re: [Zope] Apache in front of ZServer
* [EMAIL PROTECTED] (JXrn Helge B. Dahl) On a second thought: What I _really_ want (I think, unless someone tells me differently :-) ) is a conditional ProxyPass, to tell apache to redirect everything _unless_ the URI is /static (or something). But this is probably something for apache geeks. Jørn, I ain't no apache geek, but I took a look at two nice how-tos on zope.org. The first one http://www.zope.org/Members/anser/apache_zserver/ describes how to get apache to work with zope via proxypass etc., and the second one describes how to achieve what you describe above ... and I don't find it anymore on zope.org :( Anyway, this is what you want: RewriteEngine On RewriteRule ^/local/ - [L] RewriteRule ^/(.*) http://localhost:10080/my_host/$1 [P] The [L] stops the rewriting-process if and only if the uri is of the form http://yourhostname/local/ If not it goes on and passes the request to localhost port 10080, directory my_host, where zope resides (at least on my server). Combine that with virtual-host directive of apache and you are as flexibel as one can get. Naturally /local need not to be the only folder which isn't proxied to zope. The only problem is that apache doesn't care for zope's authentication machinery, I would love to have a module for apache which could enable that (nice dream...). But it may be solvable by using mysql/postgres as a userdatabase for zope apache... cheers, oliver ___ Zope maillist - [EMAIL PROTECTED] 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 )