|
Instructional Technology Portfolio | Design and Development Tools | Lessons | Zope Lessons Login | Résumé | IT Portfolio | Home |
<VirtualHost *> ServerName www.favoritedeli.com ServerAdmin webmaster@cybrains.net DocumentRoot /home/apache/favdeli/docs ErrorLog /home/apache/favdeli/logs/error_log CustomLog /home/apache/favdeli/logs/access_log combined FastCgiExternalServer /home/apache/favdeli/docs/index2.html \ -host localhost:8182 \ -appConnTimeout 0 \ -pass-header Authorization FastCgiExternalServer /home/apache/favdeli/docs/html \ -host localhost:8182 \ -appConnTimeout 0 \ -pass-header Authorization <Location /html> SetHandler fastcgi-script </Location> <Location /index2.html> SetHandler fastcgi-script </Location> </VirtualHost>
The main drawback with FastCGI was that I could not figure out how to address the site at its root as www.favoritedeli.com. Instead, the Zope served pages actually start at www.favoritedeli.com/html.
While looking at upgrading to the Zope 2.6, I came across another little documented method of passing requests directly to Zope via Apache and that was with the Mod_Proxy plugin tool for Apache.
The first step is to make sure that your Apache build includes support for the proxy module (look for "mod_proxy.c" in the output of "httpd -l"). If it doesn't, you can recompile Apache by doing the following:
$ ./configure --enable-module=proxy $ make $ make install
Once you have done this, the above httpd.conf entry becomes much simpler with the following:
<VirtualHost *> ServerName www.favoritedeli.com ServerAdmin webmaster@cybrains.net DocumentRoot /home/apache/favdeli/docs ErrorLog /home/apache/favdeli/logs/error_log CustomLog /home/apache/favdeli/logs/access_log combined ProxyPass / http://localhost:8080/favdeli/ ProxyPassReverse / http://localhost:8080/sites/favdeli/ </VirtualHost>
Although I have not done any formal testing, the mod_proxy method seems to be an order of magnitude faster than the FastCGI method. At the very least, it appeals to my minimalist tendencies in having less code and configuration options to maintain and seems to be much easier to debug when things aren't connecting properly.
| mwlang@cybrains.net | Guest | Login | Home |