[Zope] ADVICE needed: multi-site Zope installations, PCGI and
ZServer
Tony McDonald
tony.mcdonald@ncl.ac.uk
Wed, 15 Sep 1999 13:52:33 +0100
Steve,
Thanks for the reply, I delayed replying as I wanted to check my
virtual hosts setup;
At 8:54 am -0500 14/9/99, Steve Spicklemire wrote:
>Hi Tony,
>
>>>>>> "Tony" == Tony McDonald <tony.mcdonald@ncl.ac.uk> writes:
>
>I do this all the time with no mangled screens. I've mailed
>the zope list... but I rarely see a comment about this approach.
>Have you tried anything like this?:
>
><VirtualHost www.sample.com>
>Port 80
>ServerAdmin steve@spvi.com
>DocumentRoot /webroot/sites/sample
>ServerName www.sample.com
>ErrorLog /var/log/sample_error.log
>TransferLog /var/log/sample_access.log
>RewriteEngine on
>RewriteRule ^/sample/(.*) /$1
>RewriteCond %{HTTP:Authorization} ^(.*)
>RewriteRule ^/(.*) /usr/local/etc/zope/Zope.cgi/sample/$1
>[e=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l]
></VirtualHost>
>
My *main* virtual setup is
<VirtualHost nle.ncl.ac.uk>
ServerAdmin Tony.McDonald@ncl.ac.uk
DocumentRoot /home/nnle/public_html/
ServerName nle.ncl.ac.uk
ScriptAlias /cgi-bin/ /home/nnle/cgi-bin/
RewriteEngine on
RewriteRule ^/web_logs - [L]
RewriteRule ^/website/handbooks - [L]
RewriteRule ^/img - [L]
RewriteRule ^/images - [L]
RewriteRule ^/include - [L]
RewriteRule ^/site_web_resources - [L]
RewriteRule ^/testing - [L]
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule ^/(.*) /home/nnle/cgi-bin/Zope.cgi/$1
[e=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l]
<Location /test>
ForceType application/x-httpd-php3
</Location>
ErrorLog "/home/nnle/wwwserver/logs/error_log"
TransferLog "/home/nnle/wwwserver/logs/access_log"
UserDir disabled
<Directory /home/nnle/public_html>
AllowOverride AuthConfig fileInfo Indexes Limit Options
</Directory>
</VirtualHost>
Apart from your
RewriteRule ^/sample/(.*) /$1
line, they appear to do the same thing. I don't *believe* the blank
line before the RewriteCond line is important.
For one of my 'subsites' I have
<VirtualHost mf.ncl.ac.uk>
ServerAdmin a.n.other@ncl.ac.uk
DocumentRoot /home/dnle/public_html/
ServerName mf.ncl.ac.uk
ScriptAlias /cgi-bin/ /home/dnle/cgi-bin/
RewriteEngine on
RewriteRule ^/icons - [L]
RewriteRule ^/dur_cmc - [L]
RewriteRule ^/mcq - [L]
RewriteRule ^/res_upload - [L]
RewriteRule ^/site_web_resources - [L]
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule ^/(.*) /home/nnle/cgi-bin/Zope.cgi/nle/dnle/$1
[e=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l]
ErrorLog "/home/dnle/wwwserver/logs/error_log"
TransferLog "/home/dnle/wwwserver/logs/access_log"
UserDir disabled
<Directory /home/dnle/public_html>
AllowOverride AuthConfig fileInfo Indexes Limit Options
</Directory>
</VirtualHost>
As you can see this virtual host is pointed into a subfolder of the
main Zope site (dnle to be specific).
The problem is that once the manager logs into that site they get the
following on the right hand screen (after some traversing in their
'neck of the woods')
Folder at /nle / dnle / nle / dnle / nle / dnle / nle / dnle
Which, although the site appears to work ok, is an additional bit of
confusion for the manager.
Additionally, some people on the list have recommended using;
RewriteRule ^(.*) /home/nnle/cgi-bin/Zope.cgi/nle/dnle/$1
[e=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l]
rather than
RewriteRule ^/(.*) /home/nnle/cgi-bin/Zope.cgi/nle/dnle/$1
[e=HTTP_CGI_AUTHORIZATION:%1,t=application/x-httpd-cgi,l]
although the latter does (almost) work (the almost being this issue
with repeating folder names).
Cheers
tone.
------
Dr Tony McDonald, FMCC, Networked Learning Environments Project
http://nle.ncl.ac.uk/
The Medical School, Newcastle University Tel: +44 191 222 5888
Fingerprint: 3450 876D FA41 B926 D3DD F8C3 F2D0 C3B9 8B38 18A2