3 Apache FastCGI Module Installation
7 !!! See the INSTALL.AP2 document for information on how to build
8 !!! mod_fastcgi for the Apache 2.X series.
15 See docs/mod_fastcgi.html for configuration information.
17 This module supports Apache 1.3+. If your server is 1.2 based, either
18 upgrade or use mod_fastcgi v2.0.18.
20 mod_fastcgi has not been tested on all of the Apache supported
21 platforms. These are known to work: SunOS, Solaris, SCO, Linux,
22 NetBSD (see http://www.netbsd.org/packages/www/ap-fastcgi/), FreeBSD,
23 Digital Unix, AIX, IRIX, FreeBSD, Windows (NT4 and NT2K), MacOSX
24 (10.1.4), and QNX (Inet sockets only). If you're successful in using
25 this module on other platforms, please email
26 fastcgi-developers @ fastcgi.com.
28 This module is maintained at http://www.fastcgi.com.
30 See the web page for mailing list information.
36 There are three approaches to configure, compile, and install Apache.
38 o APACI - (Apache 1.3+) described in <apache_dir>/INSTALL
40 o manual - (original) described in <apache_dir>/src/INSTALL
42 o DSO (Dynamic Shared Object) - described in
43 <apache_dir>/htdocs/manual/dso.html
45 If you have a binary Apache distribution, such as Red Hat's Secure
46 Server (or prefer a DSO based Apache), you have to build mod_fastcgi
47 as a Dynamic Shared Object (DSO) - see Section 3.
49 If your on Windows NT, see Section 4.
52 1) Installing mod_fastcgi with APACI
53 ====================================
55 1. Copy or move the mod_fastcgi distribution directory to
56 <apache_dir>/src/modules/fastcgi.
58 2. Specify "--activate-module=src/modules/fastcgi/libfastcgi.a" as an
59 argument to ./configure from the <apache_dir> directory. If you've
60 previously used APACI to configure Apache, you can also specify this
61 as an argument to ./config.status (Apache 1.3.1+) in order to
62 preserve the existing configuration.
64 <apache_dir>$ ./configure \
65 --activate-module=src/modules/fastcgi/libfastcgi.a
69 <apache_dir>$ ./config.status \
70 --activate-module=src/modules/fastcgi/libfastcgi.a
72 3. Rebuild and reinstall Apache.
75 <apache_dir>$ make install
77 4. Edit the httpd configuration files to enable your FastCGI
78 application(s). See docs/mod_fastcgi.html for details.
80 5. Stop and start the server.
82 <apache_dir>$ /usr/local/apache/sbin/apachectl stop
83 <apache_dir>$ /usr/local/apache/sbin/apachectl start
86 2) Installing mod_fastcgi manually
87 ==================================
89 1. Copy or move the mod_fastcgi distribution directory to
90 <apache_dir>/src/modules/fastcgi.
92 2. Add the FastCGI module to <apache_dir>/src/Configuration. Note
93 that modules are listed in reverse priority order --- the ones that
94 come later can override the behavior of those that come earlier. I
95 put mine just after the mod_cgi entry.
97 AddModule modules/fastcgi/libfastcgi.a
99 3. From the <apache_dir>/src directory, reconfigure and rebuild Apache.
101 <apache_dir>/src$ ./Configure
102 <apache_dir>/src$ make
104 Install the new httpd.
106 4. Edit the httpd configuration files to enable your FastCGI
107 application(s). See docs/mod_fastcgi.html for details.
109 5. Stop and start the server.
111 $ kill -TERM `cat <run_dir>/logs/httpd.pid`
112 $ <run_dir>/bin/httpd -f <run_dir>/conf/httpd.conf
115 3) Installing mod_fastcgi as a DSO
116 ==================================
118 NOTE: If you use FastCgiSuexec, mod_fastcgi cannot reliably
119 determine the suexec path when built as a DSO. To workaround
120 this, provide the full path in the FastCgiSuexec directive.
122 1. From the mod_fastcgi directory, compile the module.
124 $ cd <mod_fastcgi_dir>
125 <mod_fastcgi_dir>$ apxs -o mod_fastcgi.so -c *.c
127 2. Install the module.
129 <mod_fastcgi_dir>$ apxs -i -a -n fastcgi mod_fastcgi.so
131 This should create an entry in httpd.conf that looks like this:
133 LoadModule fastcgi_module <some_path>/mod_fastcgi.so
135 Note that if there's a ClearModuleList directive after new entry,
136 you'll have to either move the LoadModule after the ClearModuleList
137 or add (have a look at how the other modules are handled):
139 AddModule mod_fastcgi.c
141 3. Edit the httpd configuration file(s) to enable your FastCGI
142 application(s). See docs/mod_fastcgi.html for details.
144 If you want to wrap the mod_fastcgi directives, use:
146 <IfModule mod_fastcgi.c>
151 4. Stop and start the server.
153 $ <run_dir>/bin/apachectl stop
154 $ <run_dir>/bin/apachectl start
160 To build mod_fastcgi from the command line:
162 1. Edit the APACHE_SRC_DIR variable in Makefile.nt.
166 > nmake -f Makefile.nt CFG=[debug | release]
168 To build mod_fastcgi as a project you'll need M$ VC++ 6.0:
170 1. Open the mod_fastcgi project file with the VC++.
172 2. Edit the Project for your configuration.
174 a) Select Project->Settings or press <ALT+F7>.
176 b) Select "All Configurations" from "Settings For" drop-down menu.
178 c) Select the "C/C++" tab.
180 d) Select "Preprocessor" from the "Category" drop-down menu.
182 e) Edit the path in "Additional include directories" to include your
183 Apache source header files (e.g. C:\apache_1.3.12\src\include).
185 f) Select the "Link" tab.
187 g) Select "General" from the "Category" drop-down menu.
189 h) Select "Win32 Release" from "Settings For" drop-down menu.
191 i) Edit the path in "Object/library modules" to include your Apache
192 Release library (e.g. C:\apache_1.3.12\src\CoreR\ApacheCore.lib).
194 j) Select "Win32 Debug" from "Settings For" drop-down menu.
196 k) Edit the path in "Object/library modules" to include your Apache
197 Debug library (e.g. C:\apache_1.3.12\src\CoreD\ApacheCore.lib).
201 3. Select "Set Active Configuration" from the "Build" menu and choose
202 either a release or debug build.
204 4. Select "Build mod_fastcgi.dll" from the "Build" menu.
206 To install mod_fastcgi (built above or retrieved from
207 http://fastcgi.com/dist/):
209 1. Copy the mod_fastcgi.dll to the Apache modules directory
210 (e.g. C:\Apache\modules)
212 2. Edit the httpd configurion file (e.g. C:\Apache\conf\httpd.conf)
215 LoadModule fastcgi_module modules/mod_fastcgi.dll
217 Note that if there's a ClearModuleList directive after new entry,
218 you'll have to either move the LoadModule after the ClearModuleList
219 or add (have a look at how the other modules are handled):
221 AddModule mod_fastcgi.c
223 3. Edit the httpd configuration file(s) to enable your FastCGI
224 application(s). See docs/mod_fastcgi.html for details.