add a comment about using AddModule to the WIN section
[mod_fastcgi.git] / INSTALL
blob067eb781aa0233a45b22f9d99031f7614ec00600
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), and QNX (Inet
18   sockets only).  If you're successful in using this module on other
19   platforms, please email fastcgi-developers @ fastcgi.com.
21   This module is maintained at http://www.fastcgi.com.  
22   
23   See the web page for mailing list information.
24   
25   
26 Introduction
27 ============
29   There are three approaches to configure, compile, and install Apache.
31     o APACI - (Apache 1.3+) described in <apache_dir>/INSTALL
33     o manual - (original) described in <apache_dir>/src/INSTALL
34     
35     o DSO (Dynamic Shared Object) - described in 
36       <apache_dir>/htdocs/manual/dso.html
37     
38   If you have a binary Apache distribution, such as Red Hat's Secure
39   Server (or prefer a DSO based Apache), you have to build mod_fastcgi 
40   as a Dynamic Shared Object (DSO) - see Section 3.
42   If your on Windows NT, see Section 4.
45 1) Installing mod_fastcgi with APACI
46 ====================================
48   1. Copy or move the mod_fastcgi distribution directory to
49      <apache_dir>/src/modules/fastcgi.
51   2. Specify "--activate-module=src/modules/fastcgi/libfastcgi.a" as an
52      argument to ./configure from the <apache_dir> directory.  If you've
53      previously used APACI to configure Apache, you can also specify this
54      as an argument to ./config.status (Apache 1.3.1+) in order to
55      preserve the existing configuration.
57        <apache_dir>$ ./configure  \
58                   --activate-module=src/modules/fastcgi/libfastcgi.a
60      or
62        <apache_dir>$ ./config.status  \
63                   --activate-module=src/modules/fastcgi/libfastcgi.a
65   3. Rebuild and reinstall Apache.
67        <apache_dir>$ make
68        <apache_dir>$ make install
70   4. Edit the httpd configuration files to enable your FastCGI
71      application(s).  See docs/mod_fastcgi.html for details.
73   5. Stop and start the server.
75        <apache_dir>$ /usr/local/apache/sbin/apachectl stop
76        <apache_dir>$ /usr/local/apache/sbin/apachectl start
79 2) Installing mod_fastcgi manually
80 ==================================
82   1. Copy or move the mod_fastcgi distribution directory to
83      <apache_dir>/src/modules/fastcgi.
85   2. Add the FastCGI module to <apache_dir>/src/Configuration.  Note
86      that modules are listed in reverse priority order --- the ones that
87      come later can override the behavior of those that come earlier.  I
88      put mine just after the mod_cgi entry.
90        AddModule modules/fastcgi/libfastcgi.a
92   3. From the <apache_dir>/src directory, reconfigure and rebuild Apache.
94        <apache_dir>/src$ ./Configure
95        <apache_dir>/src$ make
96     
97      Install the new httpd.
99   4. Edit the httpd configuration files to enable your FastCGI
100      application(s).  See docs/mod_fastcgi.html for details.
102   5. Stop and start the server.
104        $ kill -TERM `cat <run_dir>/logs/httpd.pid`
105        $ <run_dir>/bin/httpd -f <run_dir>/conf/httpd.conf
108 3) Installing mod_fastcgi as a DSO
109 ==================================
111   NOTE: If you use FastCgiSuexec, mod_fastcgi cannot reliably 
112   determine the suexec path when built as a DSO.  To workaround
113   this, provide the full path in the FastCgiSuexec directive.
114   
115   1. From the mod_fastcgi directory, compile the module.
116   
117        $ cd <mod_fastcgi_dir>
118        <mod_fastcgi_dir>$ apxs -o mod_fastcgi.so -c *.c
119     
120   2. Install the module.
121   
122        <mod_fastcgi_dir>$ apxs -i -a -n fastcgi mod_fastcgi.so
123     
124      This should create an entry in httpd.conf that looks like this: 
126        LoadModule fastcgi_module  <some_path>/mod_fastcgi.so
127     
128      Note that if there's a ClearModuleList directive after new entry,
129      you'll have to either move the LoadModule after the ClearModuleList
130      or add (have a look at how the other modules are handled):
132        AddModule mod_fastcgi.c
134   3. Edit the httpd configuration file(s) to enable your FastCGI
135      application(s).  See docs/mod_fastcgi.html for details.
137      If you want to wrap the mod_fastcgi directives, use:
139        <IfModule mod_fastcgi.c>
140        .
141        .
142        </IfModule>
144   4. Stop and start the server.
146        $ <run_dir>/bin/apachectl stop
147        $ <run_dir>/bin/apachectl start
150 4) Windows NT
151 =============
153   To build mod_fastcgi from the command line:
155     1. Edit the APACHE_SRC_DIR variable in Makefile.nt.
157     2. Build the module
159          > nmake -f Makefile.nt CFG=[debug | release]
161   To build mod_fastcgi as a project you'll need M$ VC++ 6.0:
163     1. Open the mod_fastcgi project file with the VC++.
165     2. Edit the Project for your configuration.
166     
167       a) Select Project->Settings or press <ALT+F7>.
169       b) Select "All Configurations" from "Settings For" drop-down menu.
171       c) Select the "C/C++" tab.
172       
173       d) Select "Preprocessor" from the "Category" drop-down menu.
175       e) Edit the path in "Additional include directories" to include your
176          Apache source header files (e.g. C:\apache_1.3.12\src\include).
178       f) Select the "Link" tab.
179       
180       g) Select "General" from the "Category" drop-down menu.
181       
182       h) Select "Win32 Release" from "Settings For" drop-down menu.
184       i) Edit the path in "Object/library modules" to include your Apache
185          Release library (e.g. C:\apache_1.3.12\src\CoreR\ApacheCore.lib).
187       j) Select "Win32 Debug" from "Settings For" drop-down menu.
189       k) Edit the path in "Object/library modules" to include your Apache
190          Debug library (e.g. C:\apache_1.3.12\src\CoreD\ApacheCore.lib).
192       l) Select OK.
194     3. Select "Set Active Configuration" from the "Build" menu and choose
195        either a release or debug build.
196        
197     4. Select "Build mod_fastcgi.dll" from the "Build" menu.
199   To install mod_fastcgi (built above or retrieved from 
200   http://fastcgi.com/dist/):
202     1. Copy the mod_fastcgi.dll to the Apache modules directory 
203        (e.g. C:\Apache\modules)
204       
205     2. Edit the httpd configurion file (e.g. C:\Apache\conf\httpd.conf)
206        and add a line like:
208          LoadModule fastcgi_module modules/mod_fastcgi.dll
210        Note that if there's a ClearModuleList directive after new entry,
211        you'll have to either move the LoadModule after the ClearModuleList
212        or add (have a look at how the other modules are handled):
214          AddModule mod_fastcgi.c
216     3. Edit the httpd configuration file(s) to enable your FastCGI
217        application(s).  See docs/mod_fastcgi.html for details.