Hi! I've been wondering how to serve more than one site from one Zope installation. (Why? 1. Resources. 2. Sites are sometime linked on an organization level that make this kind of sharing sensible.) At the moment I have done the following: http://www.mtg.co.at/ is the real root of the Zope installation http://www.mtg.co.at/sites/photoderm.at/ is one subsite. http://www.photoderm.at/ points in the Apache RewriteRule to mtg.cgi/sites/photoderm.at/$1. Now this basically works ok, but there are certain problems: When accessing http://www.photoderm.at/, Z adds a BASE tag with href http://www.photoderm.at/sites/photoderm.at/ In this case this works ok, as Z finds the correct stuff via acquisition, but in the more general case (when one of the subsites has a sites object itself), this would break. I've fixed it the quick and dirty way by adding the following to the standard_html_header of the site, but this is not perfect, nor clean. ... <!--#if expr="BASE0=='http://www.photoderm.at'"--> <!--#call expr="REQUEST.set('rbase', _.string.join(_.string.split(URL0,'/')[0:3]+ _.string.split(URL0,'/')[5:-1]+['',],'/'))"--> <BASE HREF="<!--#var rbase-->"> <!--#else--> <!--#call expr="REQUEST.set('rbase',URL1)"--> <!--#/if--> ... It seems that this should be doable somehow better, as codeit (http://codeit.com/zsetup.html) offers to do this. Andreas -- Win95: n., A huge annoying boot virus that causes random spontaneous system crashes, usually just before saving a massive project. Easily cured by UNIX. See also MS-DOS, IBM-DOS, DR-DOS, Win 3.x, Win98.
On Sun, 27 Jun 1999, Andreas Kostyrka wrote: ........
It seems that this should be doable somehow better, as codeit (http://codeit.com/zsetup.html) offers to do this.
Andreas
<sigh> That's a problem we've been having. Currently our customers are using similar tricks to the one you've posted to get around it. It's related to the way mod_rewrite works, we think anyways. Some one has posted a fix that patches ZPublisher, haven't had a chance yet to try it though. Has anyone setup virtual zope hosting in something other than apache? --------------------------------------------------- - Scott Robertson Phone: 714.972.2299 - - CodeIt Computing Fax: 714.972.2399 - - http://codeit.com - ---------------------------------------------------
On Sun, 27 Jun 1999, Scott Robertson wrote:
That's a problem we've been having. Currently our customers are using similar tricks to the one you've posted to get around it. It's related to the way mod_rewrite works, we think anyways. Some one has posted a fix that patches ZPublisher, haven't had a chance yet to try it though. Nope, I actually think this is a logical problem. When redirecting to Zope.cgi/path/path/$1 path/path/ gets added by Apache to the request URL, as it needs to communicate that fact to the CGI program.
Now Zope takes the servername, which is reported correctly as www.subdomain.com, and sticks it together with the full path, /path/path/someurl. I'll hunt for the ZPublisher patch and try it, because it sounds as a good place to help this problem.
Has anyone setup virtual zope hosting in something other than apache? I'm not sure if any publishing method supports virtual hosts directly at all. pcgi does support it only because of Apache supporting it.
Andreas -- Win95: n., A huge annoying boot virus that causes random spontaneous system crashes, usually just before saving a massive project. Easily cured by UNIX. See also MS-DOS, IBM-DOS, DR-DOS, Win 3.x, Win98.
participants (2)
-
Andreas Kostyrka -
Scott Robertson