Weirdness... I've almost got mod_pcgi2 setup to serve my entire site fronted by Apache but I've run into one final snag. When I access the home page of the site I notice that the BASE HREF returned by Zope is saying its http://XXX/index.html/ Apparently Apache is appending the Index name for the folder? I tried Options -Indexes but this didn't solve it. Anyone have a valid configuration for this situation that I can take a look at? Thanks, ------- Jordan Baker -- jbb@spyderlab.com
On Fri, 3 Mar 2000, Jordan B. Baker wrote:
When I access the home page of the site I notice that the BASE HREF returned by Zope is saying its http://XXX/index.html/
Apparently Apache is appending the Index name for the folder?
This has nothing with mod_pcgi2 or Apache - it is Zope who adds BASE. May be you can eliminate it with SiteAccess. It seems you are trying to do virtual hosting with Apache, and Zope is not capable yet of virtual hosting, but SiteAccess is one method to helps. Oleg. ---- Oleg Broytmann Foundation for Effective Policies phd@phd.russ.ru Programmers don't die, they just GOSUB without RETURN.
On Fri, 3 Mar 2000, Oleg Broytmann wrote:
This has nothing with mod_pcgi2 or Apache - it is Zope who adds BASE. May be you can eliminate it with SiteAccess. It seems you are trying to do virtual hosting with Apache, and Zope is not capable yet of virtual hosting, but SiteAccess is one method to helps.
Well, I am doing Virtual Hosting via Apache, but I'm only running one site per instance of Zope. Isn't this possible with pure mod_pcgi2? BTW, the weird thing is that if I change the Location to /z it works fine (ie. no index.html is appended). Here's the relevant section of my httpd.conf: <VirtualHost 216.13.28.170> ServerAdmin webmaster@torontoorganics.com ServerName torontoorganics.com DocumentRoot /home/torontoorganics/html ErrorLog /tmp/logs/error_log CustomLog /tmp/logs/access_log combined # DUH -- try to get rid of index.html -- doesn't work <Directory /> Options -Indexes </Directory> <IfModule mod_pcgi2.c> PCGI_MODULE_PATH /usr/local/zope/lib/python/Zope PCGI_PUBLISHER /usr/local/zope/pcgi/pcgi_publisher.py # Site specific mod_pcgi2 configuration PCGI_SOFTWARE_NAME Zope PCGI_SOCKET_FILE /home/bobweber/zope/var/pcgi.soc PCGI_PID_FILE /home/bobweber/zope/var/pcgi.pid PCGI_ERROR_LOG /home/bobweber/zope/var/pcgi.log PCGI_DISPLAY_ERRORS 1 <Location /> SetHandler pcgi-handler PCGI_ROOT / PCGI_SetEnv SiteRootPATH / </Location> </IfModule> </VirtualHost> Thanks, -jordan. ------- Jordan Baker -- jbb@spyderlab.com
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.
Jordan B. Baker writes:
Weirdness...
I've almost got mod_pcgi2 setup to serve my entire site fronted by Apache but I've run into one final snag.
When I access the home page of the site I notice that the BASE HREF returned by Zope is saying its http://XXX/index.html/
Ran into this one myself - the solution is to remove the DocumentRoot directive, then just use the SetHandler and similar tags in the body of the config file, though you can put them in a location container if you like.
Anyone have a valid configuration for this situation that I can take a look at?
Here's a couple of files I'm using. They should give you some idea of the modules you need to have loaded, too: # Apache HTTPD Configuration file automatically generated # by hand :-) Include /etc/httpd/conf-include/zope-site-modules BindAddress nova.kaos.org.nz ServerName nova.kaos.org.nz ServerRoot /etc/httpd PidFile /var/log/httpd/nova.kaos.org.nz/httpd-pid ServerType standalone Port 80 User kaoswww Group kaoswww ServerAdmin jwm@plain.co.nz TransferLog /var/log/httpd/nova.kaos.org.nz/httpd-log ErrorLog /var/log/httpd/nova.kaos.org.nz/httpd-errors LogLevel notice HostNameLookups off # Setup for a stand alone zope site Timeout 400 MinSpareServers 2 MaxSpareServers 4 StartServers 2 MaxClients 256 MaxRequestsPerChild 1000 LogFormat "%h %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-agent}i\"" ResourceConfig /dev/null AccessConfig /dev/null TypesConfig /etc/httpd/conf/mime.types # mod_pcgi2 settings for Jeff Rush's Zope 2.1.2 RPMs PCGI_NAME Zope PCGI_SOFTWARE_HOME /var/zope/ PCGI_MODULE_PATH /usr/share/zope/lib/python/Zope # Zope is run as user zope while this server is kaoswww, so # we can't really spawn new publishers. PCGI_PUBLISHER /var/zope/pcgi_nullpublisher.py PCGI_EXE /usr/bin/python PCGI_SOCKET_FILE /var/run/pcgi.soc PCGI_PID_FILE /var/run/zserver.pid # I doubt anything will actually be written here now that # the RPM versions use syslog PCGI_ERROR_LOG /etc/httpd/log/nova.kaos.org.nz/kaos-pcgi.log PCGI_DISPLAY_ERRORS 0 ### Important! Don't set a DocumentRoot so that mod_pcgi will ### be used to handle any URL request from the root directory up! SetHandler pcgi-handler PCGI_ROOT / PCGI_SetEnv SiteRootPATH / # You can define special locations with special properties. I # expect that Alias will work, too, if you want to server up # documents or images direct from the file system. <Location /debug> SetHandler pcgi-handler PCGI_ROOT / PCGI_SetEnv SiteRootPATH / PCGI_DISPLAY_ERRORS 1 </Location> # This is a minmal set of modules to Apache/mod_pcgi2 going. # By default, my apache has mod_log_config complied in. You'll probably # want it, seeing as that's one of the main things apache does more # conveniently that Medusa. # You must have these modules to access the management screens - # headers sets the authorization header and env sets the # HTTP_CGI_AUTHORIZATION variable that Zope needs. LoadModule headers_module modules/mod_headers.so LoadModule env_module modules/mod_env.so # You'll want these if you want to serve a few static documents or # images outside of Zope. LoadModule mime_module modules/mod_mime.so LoadModule alias_module modules/mod_alias.so # I used mod_access to control who got access to the site # while I was building it. It's optional LoadModule access_module modules/mod_access.so # mod_pcgi2 is necessary to access Zope without all that tedious # mucking about with CGI scripts and mod_rewrite rules. LoadModule pcgi2_module modules/libpcgi2.so # Reconstruction of the complete module list from all available modules # (static and shared ones) to achieve correct module execution order. # [WHENEVER YOU CHANGE THE LOADMODULE SECTION ABOVE UPDATE THIS, TOO] ClearModuleList AddModule mod_pcgi2.c AddModule mod_log_config.c AddModule mod_mime.c AddModule mod_alias.c AddModule mod_access.c AddModule mod_so.c AddModule mod_env.c AddModule mod_headers.c John.
participants (3)
-
John Morton -
Jordan B. Baker -
Oleg Broytmann