[Zope] Apache with Zope and mod_pcgi2 handling a whole site

John Morton jwm@plain.co.nz
Wed, 5 Apr 2000 11:08:34 +1200 (NZST)


Oleg Broytmann writes:
 > > I'm pretty sure I mailed you a solution a while back. Just remove the
 > > DocumentRoot line from your http.conf and set mod_pcgi2 as a global
 > > handler, and the problem goes away
 
Worth noting that you need to disable DocumentIndex as well, or it
translates host.name/ to host.name/index.html everywhere.

 >    Most people (including me myself) can't do that - they use Apache to
 > handle many VirtualServers and Locations...

I don't see a problem here - you disable DocumentRoot and
DocumentIndex at the global level, and enable them for Locations,
ie:

<VirtualHost host.with.pcgi>
ServerName     host.with.pcgi2
# various modpcgi2 settings...
SetHandler pcgi-handler
PCGI_ROOT /
PCGI_SetEnv SiteRootPATH /
</VirtualHost>

<VirtualHost host.without.pcgi>
DocumentRoot    /home/httpd/etc/etc/etc
DocumentIndex index.html
# etc
</VirtualHost>

If you want to have various locations do different things, set them up 
to do it, ie;

To use static docs in an otherwise mod_pcgi2 site:
Alias /static /my/static/docs
<Location /static>
SetHandler default-handler
</Location>

John.