Serving Zope and non-Zope Content
I have researched the Web pretty extensively on this question and think I know how to proceed. Thought I would check with the mailing list to see if anyone has any other suggestions. I have a replacement site developed in Zope (www.foo.com). A portion of the site being replaced will need to continue to be used (www.foo.com/bar) - on a different, non-local server running behind Apache. The HTML pages and content of this site contain numerous literal URL references to internal pages / content (e.g. www.foo.com/bar/candy). Based on what I have found thus far, it sounds like the best approach would be to use Apache ProxyPass to send every URL beginning with /bar to the remote server and everything else to Zope. Should this work? What potential problems should I be looking out for? Are there other approaches that may work more effectively? BTW - this is a temporary situation as the '/bar' site will be replaced with a new Plone/Zope site in the near future. Thanks, Bill Etheredge
Bill Etheredge wrote:
Should this work? What potential problems should I be looking out for? Are there other approaches that may work more effectively?
rewrite rules are better than proxypass for their flexibilty # assumes a VHM and: # LoadModule rewrite_module ... # LoadModule proxy_module ... # ProxyVia on RewriteEngine on RewriteCond %{REQUEST_URI} /foo RewriteRule .* - [L] RewriteRule ^/(.*) http://127.0.0.1:<zp>/VirtualHostBase/http/<host>:80/VirtualHostRoot/$1 [P,L] # where <zp> is the port zserver is listenting on and <host> is the # canonical hostname for the site -- Jamie Heilman http://audible.transient.net/~jamie/ "...thats the metaphorical equivalent of flopping your wedding tackle into a lion's mouth and flicking his lovespuds with a wet towel, pure insanity..." -Rimmer
On Mon, Jan 05, 2004 at 02:54:23PM -0600, Bill Etheredge wrote:
Based on what I have found thus far, it sounds like the best approach would be to use Apache ProxyPass to send every URL beginning with /bar to the remote server and everything else to Zope.
Should this work? What potential problems should I be looking out for?
it should work just fine. -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's HIEROPHANT MAN-CHUCKER! (random hero from isometric.spaceninja.com)
Quoting Bill Etheredge <betheredge@mesa-grp.com>:
I have a replacement site developed in Zope (www.foo.com). A portion of the site being replaced will need to continue to be used (www.foo.com/bar) - on a different, non-local server running behind Apache. The HTML pages and content of this site contain numerous literal URL references to internal pages / content (e.g. www.foo.com/bar/candy).
Based on what I have found thus far, it sounds like the best approach would be to use Apache ProxyPass to send every URL beginning with /bar to the remote server and everything else to Zope.
I am doing something similar and just wanted to check with the list about a couple of other cases. I see how full references to http://www.foo.com/bar/candy would continue to work with that set up. But what if the html pages had links to "../bar/candy" or "/bar/candy" or simply "candy"? would those all continue to work correctly? or would they resolve directly to the non-local server? And Apache question I realize, but is there a way to write the proxy statements so that everything EXCEPT /mydir gets proxied to Zope and /mydir content gets served directly from Apache? For example, serving your images directory from the file system via Apache and everything else from Zope. Thanks, -- Cynthia Kiser
On Mon, 2004-01-05 at 14:02, Cynthia Kiser wrote:
And Apache question I realize, but is there a way to write the proxy statements so that everything EXCEPT /mydir gets proxied to Zope and /mydir content gets served directly from Apache?
Sure... but you'll probably want to use rewriterule for this instead of proxypass. Put any specific rules first and the fall-through rule last. HTH, Dylan
participants (5)
-
Bill Etheredge -
Cynthia Kiser -
Dylan Reinhardt -
Jamie Heilman -
Paul Winkler