FastCGI for Apache2
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.

Author: