[WIN] Use a permanent pool for allocating the SystemRoot
[mod_fastcgi.git] / INSTALL
blob6db996815abec287eb5f2221e93079697fc5e8b8
3              ***  Apache FastCGI Module Installation  ***
6 Notes
7 =====
9   See docs/mod_fastcgi.html for configuration information.
10   
11   This module supports Apache 1.3+.  If your server is 1.2 based, either
12   upgrade or use mod_fastcgi v2.0.18.
14   mod_fastcgi has not been tested on all of the Apache supported
15   platforms.  These are known to work: SunOS, Solaris, SCO, Linux,
16   NetBSD (see http://www.netbsd.org/packages/www/ap-fastcgi/), FreeBSD,
17   Digital Unix, AIX, IRIX, FreeBSD, Windows (NT4 and NT2K), MacOSX
18   (10.1.4), and QNX (Inet sockets only).  If you're successful in using
19   this module on other platforms, please email 
20   fastcgi-developers @ fastcgi.com.
22   This module is maintained at http://www.fastcgi.com.  
23   
24   See the web page for mailing list information.
25   
26   
27 Introduction
28 ============
30   There are three approaches to configure, compile, and install Apache.
32     o APACI - (Apache 1.3+) described in <apache_dir>/INSTALL
34     o manual - (original) described in <apache_dir>/src/INSTALL
35     
36     o DSO (Dynamic Shared Object) - described in 
37       <apache_dir>/htdocs/manual/dso.html
38     
39   If you have a binary Apache distribution, such as Red Hat's Secure
40   Server (or prefer a DSO based Apache), you have to build mod_fastcgi 
41   as a Dynamic Shared Object (DSO) - see Section 3.
43   If your on Windows NT, see Section 4.
46 1) Installing mod_fastcgi with APACI
47 ====================================
49   1. Copy or move the mod_fastcgi distribution directory to
50      <apache_dir>/src/modules/fastcgi.
52   2. Specify "--activate-module=src/modules/fastcgi/libfastcgi.a" as an
53      argument to ./configure from the <apache_dir> directory.  If you've
54      previously used APACI to configure Apache, you can also specify this
55      as an argument to ./config.status (Apache 1.3.1+) in order to
56      preserve the existing configuration.
58        <apache_dir>$ ./configure  \
59                   --activate-module=src/modules/fastcgi/libfastcgi.a
61      or
63        <apache_dir>$ ./config.status  \
64                   --activate-module=src/modules/fastcgi/libfastcgi.a
66   3. Rebuild and reinstall Apache.
68        <apache_dir>$ make
69        <apache_dir>$ make install
71   4. Edit the httpd configuration files to enable your FastCGI
72      application(s).  See docs/mod_fastcgi.html for details.
74   5. Stop and start the server.
76        <apache_dir>$ /usr/local/apache/sbin/apachectl stop
77        <apache_dir>$ /usr/local/apache/sbin/apachectl start
80 2) Installing mod_fastcgi manually
81 ==================================
83   1. Copy or move the mod_fastcgi distribution directory to
84      <apache_dir>/src/modules/fastcgi.
86   2. Add the FastCGI module to <apache_dir>/src/Configuration.  Note
87      that modules are listed in reverse priority order --- the ones that
88      come later can override the behavior of those that come earlier.  I
89      put mine just after the mod_cgi entry.
91        AddModule modules/fastcgi/libfastcgi.a
93   3. From the <apache_dir>/src directory, reconfigure and rebuild Apache.
95        <apache_dir>/src$ ./Configure
96        <apache_dir>/src$ make
97     
98      Install the new httpd.
100   4. Edit the httpd configuration files to enable your FastCGI
101      application(s).  See docs/mod_fastcgi.html for details.
103   5. Stop and start the server.
105        $ kill -TERM `cat <run_dir>/logs/httpd.pid`
106        $ <run_dir>/bin/httpd -f <run_dir>/conf/httpd.conf
109 3) Installing mod_fastcgi as a DSO
110 ==================================
112   NOTE: If you use FastCgiSuexec, mod_fastcgi cannot reliably 
113   determine the suexec path when built as a DSO.  To workaround
114   this, provide the full path in the FastCgiSuexec directive.
115   
116   1. From the mod_fastcgi directory, compile the module.
117   
118        $ cd <mod_fastcgi_dir>
119        <mod_fastcgi_dir>$ apxs -o mod_fastcgi.so -c *.c
120     
121   2. Install the module.
122   
123        <mod_fastcgi_dir>$ apxs -i -a -n fastcgi mod_fastcgi.so
124     
125      This should create an entry in httpd.conf that looks like this: 
127        LoadModule fastcgi_module  <some_path>/mod_fastcgi.so
128     
129      Note that if there's a ClearModuleList directive after new entry,
130      you'll have to either move the LoadModule after the ClearModuleList
131      or add (have a look at how the other modules are handled):
133        AddModule mod_fastcgi.c
135   3. Edit the httpd configuration file(s) to enable your FastCGI
136      application(s).  See docs/mod_fastcgi.html for details.
138      If you want to wrap the mod_fastcgi directives, use:
140        <IfModule mod_fastcgi.c>
141        .
142        .
143        </IfModule>
145   4. Stop and start the server.
147        $ <run_dir>/bin/apachectl stop
148        $ <run_dir>/bin/apachectl start
151 4) Windows NT
152 =============
154   To build mod_fastcgi from the command line:
156     1. Edit the APACHE_SRC_DIR variable in Makefile.nt.
158     2. Build the module
160          > nmake -f Makefile.nt CFG=[debug | release]
162   To build mod_fastcgi as a project you'll need M$ VC++ 6.0:
164     1. Open the mod_fastcgi project file with the VC++.
166     2. Edit the Project for your configuration.
167     
168       a) Select Project->Settings or press <ALT+F7>.
170       b) Select "All Configurations" from "Settings For" drop-down menu.
172       c) Select the "C/C++" tab.
173       
174       d) Select "Preprocessor" from the "Category" drop-down menu.
176       e) Edit the path in "Additional include directories" to include your
177          Apache source header files (e.g. C:\apache_1.3.12\src\include).
179       f) Select the "Link" tab.
180       
181       g) Select "General" from the "Category" drop-down menu.
182       
183       h) Select "Win32 Release" from "Settings For" drop-down menu.
185       i) Edit the path in "Object/library modules" to include your Apache
186          Release library (e.g. C:\apache_1.3.12\src\CoreR\ApacheCore.lib).
188       j) Select "Win32 Debug" from "Settings For" drop-down menu.
190       k) Edit the path in "Object/library modules" to include your Apache
191          Debug library (e.g. C:\apache_1.3.12\src\CoreD\ApacheCore.lib).
193       l) Select OK.
195     3. Select "Set Active Configuration" from the "Build" menu and choose
196        either a release or debug build.
197        
198     4. Select "Build mod_fastcgi.dll" from the "Build" menu.
200   To install mod_fastcgi (built above or retrieved from 
201   http://fastcgi.com/dist/):
203     1. Copy the mod_fastcgi.dll to the Apache modules directory 
204        (e.g. C:\Apache\modules)
205       
206     2. Edit the httpd configurion file (e.g. C:\Apache\conf\httpd.conf)
207        and add a line like:
209          LoadModule fastcgi_module modules/mod_fastcgi.dll
211        Note that if there's a ClearModuleList directive after new entry,
212        you'll have to either move the LoadModule after the ClearModuleList
213        or add (have a look at how the other modules are handled):
215          AddModule mod_fastcgi.c
217     3. Edit the httpd configuration file(s) to enable your FastCGI
218        application(s).  See docs/mod_fastcgi.html for details.