[Zope] Serving multiple Zope domains on Apache?
Joshua Brauer
joshua@brauer.org
Wed, 21 Jul 1999 15:33:28 -0600
Alexander,
If you're looking for one admin setup and several different sites you can do this:
Set it up as I mentioned.
BUT use this rewrite rule for the "other (non-admin)" servers:
> >RewriteRule ^/(.*) /websites/example/Zope.cgi/folder/$1
> >[e=HTTP_CGI_AUTHORIZATION:%1,E=ZOPE_RAW_URI:SCRIPT_URI,t=applic
> >ation/x-httpd-cgi,l]
/folder is a folder in your main ZOPE setup. It has no problems inheriting things from the / level even though you can't see it.
for example
www.example.com
www2.example.com <-- admin server
www.jones.com
The Zope install has two folders one called jones and one called www.
Jones:
> >RewriteRule ^/(.*) /websites/example/Zope.cgi/jones/$1
> >[e=HTTP_CGI_AUTHORIZATION:%1,E=ZOPE_RAW_URI:SCRIPT_URI,t=applic
> >ation/x-httpd-cgi,l]
You can administer all of the site through www2.example.com/manage or www2.example.com/www/manage
The downside is that (at least I can't get it to work) you can't use www.jones.com/manage to manage the site.
Josh
PS separate installs aren't entirely against the usefulness of ZOPE in all instances (web hosting for example where you WANT people to have a higher level of control and yet only destroy their own setup.)
At 11:16 PM +0200 7/21/99, Alexander Staubo wrote:
>Thanks for your answer. Unfortunately, I _don't_ want a separate Zope
>installation for each domain. That goes very much against the useful of
>Zope. I need one point of administration.
>
>[...]
>Thanks anyway.
>
>--
>Alexander Staubo http://www.mop.no/~alex/
>"Reality is that which, when you stop believing in it, doesn't go
>away."
>--Philip K. Dick
>
> >-----Original Message-----
> >From: Joshua Brauer [mailto:joshua@brauer.org]
> >Sent: 21. juli 1999 23:09
> >To: Alexander Staubo
> >Subject: Re: [Zope] Serving multiple Zope domains on Apache?
> >
> >
> >I agree this could be MUCH better documented. I spent several
> >days on it only to find it was fairly simple....
> >
> >Here's what I do....
> >
> >1) Roll your own Apache ( I don't think this is necessary, it
> >is just the way I did it. Either way you need mod_rewrite).
> >
> >2) Make a copy of your ZOPE folder for each domain. (tar my
> >own with all of the contributed software I want in it then
> >it's easy to add a new site.)
> >
> >3) Run ./install in your new directory.
> >
> >4) Here's the relevant part of my config files....
> >
> >httpd.conf:
> >
> ><VirtualHost 10.0.0.1:80>
> >ServerName www.example.org
> >Options FollowSymLinks IncludesNoExec
> >ServerPath /www.example.org
> >DocumentRoot /websites/example.org
> >ErrorLog logs/example_Errors.log
> >TransferLog logs/example_access.log
> >RewriteEngine on
> >RewriteLog logs/example_zap_log
> >RewriteLogLevel 0
> >RewriteCond %{HTTP:Authorization} ^(.*)
> >RewriteRule ^/(.*) /websites/example/Zope.cgi/$1
> >[e=HTTP_CGI_AUTHORIZATION:%1,E=ZOPE_RAW_URI:SCRIPT_URI,t=applic
> >ation/x-httpd-cgi,l]
> ></VirtualHost>
> >
> >access.conf
> >
> ><Directory /websites/example>
> >Options All
> ></Directory>
> >
> >5) restart the web server and have fun.
> >
> >
> >BTW I've also used:
> >
> >RewriteRule ^/(.*) /websites/example/Zope.cgi/folder/$1
> >[e=HTTP_CGI_AUTHORIZATION:%1,E=ZOPE_RAW_URI:SCRIPT_URI,t=applic
> >ation/x-httpd-cgi,l]
> >
> >which works fine for browsing the site at /folder as a
> >"seperate" server, however I can't get permissions set right
> >to allow anybody but the Zope server superuser to access
> >/folder/manage on that server. If they access the "main"
> >server which has a different address and points to / instead
> >of /folder it works... Ideas?
> >
> >Josh
> >
> >BTW this works without patching anything with Zope 1.x
> >
> >At 1:56 PM +0200 7/21/99, Alexander Staubo wrote:
> >
> >>This issue has been discussed before, and at length, but I could find
> >>nothing conclusive in the archives. The problem seems to be Zope's
> >>handling of SCRIPT_NAME et al, and how you have to patch ZPublisher
> >>somehow to get URL rewriting working correctly.
> >>
> >>What's the status on this?
> >>
> >>I think the community -- including myself -- needs a
> >definitive HOWTO on
> >>setting up serving of multiple domains with Apache, Zope, mod_rewrite,
> >>and mod_pcgi.
> >>
> >>How are the Zope hosting providers doing it?
> >>
> >>Is there a way to do it without patching Apache or Zope?
> >>
> >>And so on.
> >
> >___________________________________________
> > Joshua Brauer
> > joshua@brauer.org
> > http://www.brauer.org
> >___________________________________________
> >
___________________________________________
Joshua Brauer
joshua@brauer.org
http://www.brauer.org
___________________________________________