Apache with Zope and mod_pcgi2 handling a whole site
Hello, mod_pcgi2 users. Most of you know already that my module has a problem being installed onto root location. Some sressed that even installing it onto locations started with common prefix (<Location /a/b> and <Location /a/c>, e.g.) lead to a problem. I think these are the same problem, actually - it is just that root is common prefix for all locations. I am not sure where is the bug - in my module or in Apache. May be I am doing something wrong, but I don't know what is wrong and how to fix it. Well, a user of the module prepare some information and workaraound. Thanks, Thomas! But the actual workaround looks very suspicious to me. Anyone who want to resolve the problem - please look into it; we'll discuss the problem and the slutions here... Oleg. (All opinions are mine and not of my employer) ---- Oleg Broytmann Foundation for Effective Policies phd@phd.russ.ru Programmers don't die, they just GOSUB without RETURN. ---------- Forwarded message ---------- Date: Mon, 3 Apr 2000 10:55:19 +0200 (CEST) From: Thomas Viehmann <tv@beamnet.de> To: phd2@earthling.net Subject: Apache with Zope and mod_pcgi2 handling a whole site Hi Oleg Broytmann, I have had some trouble figuring out how to server a whole site with Apache/mod_pcgi2/Zope. I think this is the same problem you described as open in your mail below. If it is still open I think I have a workaround (involving the patching of Zope's ZServer/PCGIServer.py, though...) and a description of the problems at http://www.zope.org/Members/viehmann/zope_mod_pcgi2_apache_trouble I have not submitted this as a bug or for review for a tip yet as I am not sure whether this solution is acceptable. Greetings Thomas --- This is your mail from the zope mailing list from March 4, 2000 --- On Fri, 3 Mar 2000, Jordan B. Baker wrote:
<Location /> SetHandler pcgi-handler </Location>
I already got few bug reports about this. I suspect it is a problem with Apache. When installing the handler onto / location Apache passes wrong PATH_INFO to my module. Currently the only way to overcome is to use non-/ location... Oleg. ---- Oleg Broytmann Foundation for Effective Policies phd@phd.russ.ru Programmers don't die, they just GOSUB without RETURN.
Oleg Broytmann writes:
Hello, mod_pcgi2 users.
Most of you know already that my module has a problem being installed onto root location. Some sressed that even installing it onto locations started with common prefix (<Location /a/b> and <Location /a/c>, e.g.) lead to a problem. I think these are the same problem, actually - it is just that root is common prefix for all locations. I am not sure where is the bug - in my module or in Apache. May be I am doing something wrong, but I don't know what is wrong and how to fix it.
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 - at least for sites without any other kind of static content. I haven't experimented trying to get a site with static content under (say) /static working without a document root, but it might work with an Alias directive. John.
On Tue, 4 Apr 2000, John Morton wrote:
Most of you know already that my module has a problem being installed onto root location. Some sressed that even installing it onto locations started with common prefix (<Location /a/b> and <Location /a/c>, e.g.) lead to a problem. I think these are the same problem, actually - it is just that root is common prefix for all locations. I am not sure where is the bug - in my module or in Apache. May be I am doing something wrong, but I don't know what is wrong and how to fix it.
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
Most people (including me myself) can't do that - they use Apache to handle many VirtualServers and Locations... Oleg. (All opinions are mine and not of my employer) ---- Oleg Broytmann Foundation for Effective Policies phd@phd.russ.ru Programmers don't die, they just GOSUB without RETURN.
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.
Thanks. I'll test all these and report all failures... On Wed, 5 Apr 2000, John Morton wrote:
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>
Oleg. (All opinions are mine and not of my employer) ---- Oleg Broytmann Foundation for Effective Policies phd@phd.russ.ru Programmers don't die, they just GOSUB without RETURN.
participants (2)
-
John Morton -
Oleg Broytmann