Clarify FastCgiExternalServer filename use
[mod_fastcgi.git] / INSTALL
blob8cdb7d960f37125483ac84810447ee1a56dd741d
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   Digital Unix, IRIX, FreeBSD and QNX (Inet sockets only).  The Windows
17   NT port is available for beta testing.  If you're successful in using
18   this module on other platforms, please email
19   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. Copy the Makefile.sample to Makefile and edit if/as appropriate.
94        <apache_dir>/src$ cd modules/fastcgi
95        <apache_dir>/src$ cp Makefile.sample Makefile
97   4. From the <apache_dir>/src directory, reconfigure and rebuild Apache.
99        <apache_dir>/src$ ./Configure
100        <apache_dir>/src$ make
101     
102      Install the new httpd.
104   5. Edit the httpd configuration files to enable your FastCGI
105      application(s).  See docs/mod_fastcgi.html for details.
107   6. Stop and start the server.
109        $ kill -TERM `cat <run_dir>/logs/httpd.pid`
110        $ <run_dir>/bin/httpd -f <run_dir>/conf/httpd.conf
113 3) Installing mod_fastcgi as a DSO
114 ==================================
116   NOTE: If you use FastCgiSuexec, mod_fastcgi cannot reliably 
117   determine the suexec path when built as a DSO.  To workaround
118   this, provide the full path in the FastCgiSuexec directive.
119   
120   1. From the mod_fastcgi directory, compile the module.
121   
122        $ cd <mod_fastcgi_dir>
123            <mod_fastcgi_dir>$ apxs -o mod_fastcgi.so -c *.c
124     
125   2. Install the module.
126   
127            <mod_fastcgi_dir>$ apxs -i -a -n fastcgi mod_fastcgi.so
128     
129      This should create an entry in httpd.conf that looks like this: 
131        LoadModule fastcgi_module  <some_path>/mod_fastcgi.so
132     
133      Note that if there's a ClearModuleList directive after new entry,
134      you'll have to either move the LoadModule after the ClearModuleList
135      or add:
137            AddModule mod_fastcgi.c
139   3. Edit the httpd configuration file(s) to enable your FastCGI
140      application(s).  See docs/mod_fastcgi.html for details.
142      If you want to wrap the mod_fastcgi directives, use:
144            <IfModule mod_fastcgi.c>
145        .
146        .
147        </IfModule>
149   4. Stop and start the server.
151        $ <run_dir>/bin/apachectl stop
152        $ <run_dir>/bin/apachectl start
155 4) Windows NT
156 =============
158   To build mod_fastcgi from the command line:
160     1. Edit the APACHE_SRC_DIR variable in Makefile.nt.
162     2. Build the module
164          > nmake -f Makefile.nt CFG=[debug | release]
166   To build mod_fastcgi as a project you'll need M$ VC++ 6.0:
168     1. Open the mod_fastcgi project file with the VC++.
170     2. Edit the Project for your configuration.
171     
172       a) Select Project->Settings or press <ALT+F7>.
174       b) Select "All Configurations" from "Settings For" drop-down menu.
176       c) Select the "C/C++" tab.
177       
178       d) Select "Preprocessor" from the "Category" drop-down menu.
180       e) Edit the path in "Additional include directories" to include your
181          Apache source header files (e.g. C:\apache_1.3.12\src\include).
183       f) Select the "Link" tab.
184       
185       g) Select "General" from the "Category" drop-down menu.
186       
187       h) Select "Win32 Release" from "Settings For" drop-down menu.
189       i) Edit the path in "Object/library modules" to include your Apache
190          Release library (e.g. C:\apache_1.3.12\src\CoreR\ApacheCore.lib).
192       j) Select "Win32 Debug" from "Settings For" drop-down menu.
194       k) Edit the path in "Object/library modules" to include your Apache
195          Debug library (e.g. C:\apache_1.3.12\src\CoreD\ApacheCore.lib).
197       l) Select OK.
199     3. Select "Set Active Configuration" from the "Build" menu and choose
200        either a release or debug build.
201        
202     4. Select "Build mod_fastcgi.dll" from the "Build" menu.
204   To install mod_fastcgi:
206     1. Copy the mod_fastcgi.dll (from either the Debug or Release 
207        directory, as appropriate) to the Apache modules directory 
208        (e.g. C:\Apache\modules)
209       
210     2. Edit the httpd configurion file (e.g. C:\Apache\conf\httpd.conf)
211        and add a line like:
213          LoadModule fastcgi_module modules/mod_fastcgi.dll
215     3. Edit the httpd configuration file(s) to enable your FastCGI
216        application(s).  See docs/mod_fastcgi.html for details.