Fix stderr handling again
[mod_fastcgi.git] / INSTALL
blobe34c2977f5a19795ceb88b6370f3c12c0a463d69
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   The FastCGI Module has not been tested on all of the Apache supported
15   platforms.  These are known to work: SunOS, Solaris, SCO, Linux, Digital
16   Unix, IRIX, FreeBSD and QNX (Inet sockets only).  Windows is not currently
17   supported.  If your successful in using this module on other platforms, 
18   please email fastcgi-developers@idle.com.
20   This module is maintained at http://www.FastCGI.com.  
21   
22   To receive FastCGI related announcements and notifications of module
23   updates, send mail to fastcgi-announce-request@idle.com with "subscribe"
24   in the Subject field.  
25   
26   To participate in the discussion of mod_fastcgi and FastCGI application
27   development, send mail to fastcgi-developers-request@idle.com with
28   "subscribe" in the Subject field.
29   
30   
31 Introduction
32 ============
34   There are three approaches to configure, compile, and install Apache.
36     o APACI - (Apache 1.3+) described in <apache_dir>/INSTALL
38     o manual - (original) described in <apache_dir>/src/INSTALL
39     
40     o DSO (Dynamic Shared Object) - described in 
41       <apache_dir>/htdocs/manual/dso.html
42     
43   If you have a binary Apache distribution, such as Red Hat's Secure
44   Server (or prefer a DSO based Apache), you have to build mod_fastcgi as a
45   Dynamic Shared Object (DSO) - see Section 3.
48 1) Installing mod_fastcgi with APACI
49 ====================================
51   1. Copy or move the mod_fastcgi distribution directory to
52   <apache_dir>/src/modules/fastcgi.
54   2. Specify "--activate-module=src/modules/fastcgi/libfastcgi.a" as an
55   argument to ./configure from the <apache_dir> directory.  If you've
56   previously used APACI to configure Apache, you can also specify this
57   as an argument to ./config.status (Apache 1.3.1+) in order to
58   preserve the existing configuration.
60     <apache_dir>$ ./configure  \
61                   --activate-module=src/modules/fastcgi/libfastcgi.a
63     or
65     <apache_dir>$ ./config.status  \
66                   --activate-module=src/modules/fastcgi/libfastcgi.a
68   3. Rebuild and reinstall Apache.
70     <apache_dir>$ make
71     <apache_dir>$ make install
73   4. Edit the httpd configuration files to enable your FastCGI
74   application(s).  See docs/mod_fastcgi.html for details.
76   5. Stop and start the server.
78     <apache_dir>$ /usr/local/apache/sbin/apachectl stop
79     <apache_dir>$ /usr/local/apache/sbin/apachectl start
82 2) Installing mod_fastcgi manually
83 ==================================
85   1. Copy or move the mod_fastcgi distribution directory to
86   <apache_dir>/src/modules/fastcgi.
88   2. Add the FastCGI module to <apache_dir>/src/Configuration.  Note that
89   modules are listed in reverse priority order --- the ones that come
90   later can override the behavior of those that come earlier.  I put mine
91   just after mod_cgi entry.
93     AddModule modules/fastcgi/libfastcgi.a
95   3. Copy the Makefile.sample to Makefile and edit if/as appropriate.
97     <apache_dir>/src$ cd modules/fastcgi
98     <apache_dir>/src$ cp Makefile.sample Makefile
100   4. From the <apache_dir>/src directory, reconfigure and rebuild Apache.
102     <apache_dir>/src$ ./Configure
103     <apache_dir>/src$ make
104     
105   Install the new httpd.
107   5. Edit the httpd configuration files to enable your FastCGI
108   application(s).  See docs/mod_fastcgi.html for details.
110   6. Stop and start the server.
112     $ kill -TERM `cat <run_dir>/logs/httpd.pid`
113     $ <run_dir>/bin/httpd -f <run_dir>/conf/httpd.conf
116 3) Installing mod_fastcgi as a DSO
117 ==================================
118   
119   1. From the mod_fastcgi directory, compile the module.
120   
121     $ cd <mod_fastcgi_dir>
122         <mod_fastcgi_dir>$ apxs -o mod_fastcgi.so -c *.c
123     
124   2. Install the module.
125   
126         <mod_fastcgi_dir>$ apxs -i -a -n fastcgi mod_fastcgi.so
127     
128   This should create an entry in httpd.conf that looks like this: 
130     LoadModule fastcgi_module  <some_path>/mod_fastcgi.so
131     
132   Note that if there's a ClearModuleList directive after new entry, you'll
133   have to either move the LoadModule after the ClearModuleList or add:
135         AddModule mod_fastcgi.c
137   3. Edit the httpd configuration file(s) to enable your FastCGI
138   application(s).  See docs/mod_fastcgi.html for details.
140   If you want to wrap the mod_fastcgi directives, use:
142         <IfModule mod_fastcgi.c>
143       .
144       .
145     </IfModule>
147   6. Stop and start the server.
149     $ <run_dir>/bin/apachectl stop
150     $ <run_dir>/bin/apachectl start