Personal tools
You are here: Home Documentation Tutorials Running Plone and Zope behind an Apache 2 web server FastCGI for Apache2
Support

Get Help

Join our chat rooms or support forums if you have more specific questions.

Plone Training
Learn how to design, build, and deploy a website in Plone through one of the numerous Plone training sessions around the world.
Find Plone training…
 
Document Actions

FastCGI for Apache2

How to compile mod_fastcgi for Apache 2 under Debian.

Christian 'Tiran' Heimes

How to set up an Apache 2 web server as proxy with disk caching and deflating.
Page 5 of 7.

Install the prerequisite packages to compile the module. Installing apache2-dev should do the job:

apt-get install apache2-dev

I had some problems with a missing libtool script so I had to link it:

cd /usr/share/apache2/build
ln -s /usr/lib/libtool .

Download the fastcgi extension from http://www.fastcgi.com/ and unpack the tar.gz:

wget http://www.fastcgi.com/dist/mod_fastcgi-X.X.X.tar.gz
tar -xzf mod_fastcgi-X.X.X.tar.gz
cd mod_fastcgi-X.X.X

Note: Due a bug in fastcgi you need at least snapshot from mid April 2004 or the upcoming 2.4.3 release.

Copy Makefile.AP2 to Makefile:

cp Makefile.AP2 Makefile

Modify Makefile for Apache 2 to reflect the system configuration:

#
#  Makefile for Apache2
#

builddir     = .

# XXX change this line
top_dir      = /usr/share/apache2


top_srcdir   = ${top_dir}
top_builddir = ${top_dir}

include ${top_builddir}/build/special.mk

APXS      = apxs
APACHECTL = apachectl

#DEFS=-Dmy_define=my_value
#INCLUDES=-Imy/include/dir
#LIBS=-Lmy/lib/dir -lmylib

# XXX add this line
INCLUDES=-I /usr/include/apache2 -I /usr/include/apr-0

all: local-shared-build

install: install-modules

clean:
        -rm -f *.o *.lo *.slo *.la

Run make and install the modules:

make
make install

Now you should have a module called mod_fastcgi.so in /usr/lib/apache2/modules.

 
by Christian 'Tiran' Heimes last modified December 10, 2005 - 21:35 All content is copyright Plone Foundation and the individual contributors.

what's the fastcgi module for?

Posted by Todd Mitchell at August 12, 2005 - 23:58

Great guide. Thanks alot. I'm not sure what the fastcgi module is for here and I'm not using much cgi so I haven't set it up. Here is my issue however. I followed everything up to the fastcgi section and have a working site with the ZMI nicely tucked behind SSL. However I am getting errors (The requested method POST is not allowed for the URL) in the ZMI on the secured site when I am on a page for a short period of time (if I take more than 30 seconds or so to submit). The secure site error log says "SSL Re-negotiation in conjunction with POST method not supported! hint: try SSLOptions +OptRenegotiate" but although I added this to the site configuration it isn't helping.

So in short the rewrite works great, but the ssl site is not playing nice with my ZMI. Any ideas?

fastcgi and mod_ssl

Posted by Daniel Schreckling at September 21, 2005 - 23:33

I propose you read a little further (especially the next chapter ;-)) You certainly find your answers ...

problem solved

Posted by Todd Mitchell at September 22, 2005 - 00:56

I did read the whole article prior to posting, I even set up fast_cgi. It does explain how to configure fastcgi, but is a bit light on why you'd want to do it (faster, better, more robust? - certainly not simpler). It didn't fix my POST timeout issue. I did eventually find the answer to my issue - there is a POST bug in mod_ssl in apache2 (debian sarge version anyway) which requires the line "SSLVerifyClient Optional" be outside the location stanza of the ssl site config file. That fixed it. So all is well in any case.

fastcgi and mod_ssl

Posted by Daniel Schreckling at September 21, 2005 - 23:36

I propose to read the next chapter and you will probably find the answers to your problem (if you don't have already)


For any issues with the web site functionality, please file a ticket.

Please consult the policy on plone.org content if you want your content published on this site.

Servers and hosting by