Warning

This document hasn't been checked for compatibility with current versions of Plone. Use at your own risk.

FastCGI for Apache2

by Christian 'Tiran' Heimes last modified Jan 09, 2010 11:54 PM
How to compile mod_fastcgi for Apache 2 under Debian.

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.


Contribute

Something wrong or out of date? Anybody can edit or create a new article in the knowledge base. Simply create an account on this site, log in, and click the Edit button to contribute.