Blob Blame History Raw
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
  <meta name="ProgId" content="FrontPage.Editor.Document">
  <title>The mod_fcgid Home Page</title>
</head>
<body>
<p><b><a name="regular fastcgi"></a>This is a for regular fastcgi.&nbsp;</b></p>
<p>LoadModule fcgid_module modules/mod_fcgid.so</p>
<p>&lt;Location /fcgid&gt;<br>
&nbsp;&nbsp;&nbsp; SetHandler fcgid-script<br>
&nbsp;&nbsp;&nbsp; Options ExecCGI<br>
&nbsp;&nbsp;&nbsp; allow from all<br>
&lt;/Location&gt;</p>
<p>&nbsp;
</p>
<hr>
<p><b><a name="suEXEC"></a>This is for suEXEC. Please get more
information about suEXEC <a
 href="http://httpd.apache.org/docs-2.0/suexec.html">here</a>.&nbsp;</b></p>
<p>LoadModule fcgid_module modules/mod_fcgid.so</p>
<p>&lt;Location /fcgid&gt;<br>
&nbsp;&nbsp;&nbsp; SetHandler fcgid-script<br>
&nbsp;&nbsp;&nbsp; Options ExecCGI<br>
&nbsp;&nbsp;&nbsp; allow from all<br>
&lt;/Location&gt;</p>
<p>&lt;VirtualHost 192.168.1.89&gt;<br>
&nbsp;&nbsp;&nbsp; ServerAdmin <a href="mailto:webmaster@host.foo.com">webmaster@host.foo.com<br>
</a>&nbsp;&nbsp;&nbsp; DocumentRoot /usr/local/apache2/htdocs/<br>
&nbsp;&nbsp;&nbsp; ServerName host.foo.com<br>
&nbsp;&nbsp;&nbsp; SuexecUserGroup pqf pqf<br>
&lt;/VirtualHost&gt;</p>
<p> 
</p>
<hr>
<p><b><a name="PHP"></a>This is for fastcgi-mode PHP (UNIX)</b></p>
<p>LoadModule fcgid_module modules/mod_fcgid.so</p>
<p> &lt;Directory /usr/local/apache2/htdocs/php&gt;<br>
&nbsp;&nbsp;&nbsp; SetHandler fcgid-script<br>
&nbsp;&nbsp;&nbsp; FCGIWrapper /usr/local/bin/php .php
</p>
<p>&nbsp;&nbsp; <span style="font-weight: bold;"># You need mod_fcgid
version &gt;= 2.1 to support arguments in FCGIWrapper, if you want<br>
&nbsp;&nbsp; # FCGIWrapper "/usr/local/bin/php -c /etc/" .php</span></p>
&nbsp;&nbsp;&nbsp; Options ExecCGI<br>
<p> &nbsp;&nbsp;&nbsp; allow from all<br>
&lt;/Directory&gt;</p>
<p><b>This works too:</b></p>
<p>LoadModule fcgid_module modules/mod_fcgid.so&nbsp;</p>
<p>AddHandler fcgid-script .php<br>
&lt;Directory /usr/local/apache2/htdocs/php&gt;<br>
&nbsp;&nbsp;&nbsp; FCGIWrapper /usr/local/bin/php .php</p>
<p>&nbsp;&nbsp;&nbsp; <span style="font-weight: bold;">#</span> <span
 style="font-weight: bold;">You need mod_fcgid version &gt;= 2.1 to
support arguments in FCGIWrapper, if you want<br>
&nbsp;&nbsp; # FCGIWrapper "/usr/local/bin/php -c /etc/" .php</span></p>
<p>&nbsp;&nbsp;&nbsp; Options ExecCGI<br>
&nbsp;&nbsp;&nbsp; allow from all<br>
&lt;/Directory&gt;</p>
<p><b># Please make sure:<br>
# php is configured with --enable-fastcgi option<br>
# check error_log(with debug level), if any thing goes wrong</b> </p>
<p> </p>
<hr>
<p><b><a name="Ruby"></a>This is for fastcgi-mode </b><span
 style="font-weight: bold;">Ruby on Rails ( Thank Andre Nathan giving
me this demo configuration )<br>
</span><br>
LoadModule fcgid_module modules/mod_fcgid.so<br>
SocketPath /tmp/fcgidsock<br>
SharememPath /tmp/fcgidshm<br>
DefaultInitEnv RAILS_ENV production<br>
<br>
&lt;Directory /home/sneakymustard/tumble/public&gt;<br>
&nbsp;&nbsp;&nbsp; Options ExecCGI FollowSymLinks<br>
&nbsp;&nbsp;&nbsp; AllowOverride AuthConfig Indexes Limit<br>
&nbsp;&nbsp;&nbsp; Order allow,deny<br>
&nbsp;&nbsp;&nbsp; Allow from all<br>
<br>
&nbsp;&nbsp;&nbsp; AddHandler fcgid-script .fcgi</p>
<p><span style="font-weight: bold;">&nbsp;&nbsp;&nbsp; # You need
mod_fcgid version &gt;= 2.1 to support arguments "xxx/dispatch.fcgi" in
FCGIWrapper <br>
</span>&nbsp;&nbsp;&nbsp; FCGIWrapper "/usr/bin/ruby
/home/sneakymustard/tumble/public/dispatch.fcgi" .fcgi<br>
<br>
&nbsp;&nbsp;&nbsp; RewriteEngine On<br>
&nbsp;&nbsp;&nbsp; RewriteRule ^$ index.html [QSA]<br>
&nbsp;&nbsp;&nbsp; RewriteRule ^([^.]+)$ $1.html [QSA]<br>
&nbsp;&nbsp;&nbsp; RewriteCond %{REQUEST_FILENAME} !-f<br>
&nbsp;&nbsp;&nbsp; RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]<br>
&lt;/Directory&gt;<br>
<br>
</p>
<span style="font-weight: bold;"></span>
<p> </p>
<hr>
<p><b><a name="suPHP"></a>This is for suPHP&nbsp; ( UNIX )</b> </p>
<p>LoadModule fcgid_module modules/mod_fcgid.so<br>
<br>
&lt;VirtualHost *:80&gt;<br>
&nbsp;&nbsp;&nbsp; ServerName test2.example.com<br>
&nbsp;&nbsp;&nbsp; DocumentRoot
/usr/local/apache2/htdocs/test2.example.com/<br>
&nbsp;&nbsp;&nbsp; SuexecUserGroup pqf pqf<br>
&lt;/VirtualHost&gt;<br>
<br>
&lt;Directory /usr/local/apache2/htdocs/test2.example.com/&gt;<br>
&nbsp;&nbsp;&nbsp; AddHandler fcgid-script .php<br>
&nbsp;&nbsp;&nbsp; Options ExecCGI<br>
&nbsp;&nbsp;&nbsp; allow from all<br>
&nbsp;&nbsp;&nbsp; FCGIWrapper
/usr/local/apache2/htdocs/test2.example.com/php .php</p>
<p></p>
<p>&nbsp;&nbsp;&nbsp; <span style="font-weight: bold;">#</span> <span
 style="font-weight: bold;">You need mod_fcgid version &gt;= 2.1 to
support arguments in FCGIWrapper, if you want<br>
&nbsp;&nbsp; # FCGIWrapper "/usr/local/bin/php -c /etc/" .php</span></p>
<p> &lt;/Directory&gt;</p>
<p> <b> # Please make sure:<br>
# php is configured with --enable-fastcgi option<br>
# copy php execution to /usr/local/apache2/htdocs/test2.example.com/
directory<br>
# make sure all files in /usr/local/apache2/htdocs/test2.example.com/
with right owner and group<br>
# check error_log(with debug level) and suexec_log, if any thing goes
wrong</b> <br>
</p>
<hr>
<p><br>
<b><a name="PHP-Windows"></a>This is for fastcgi-mode PHP ( Windows )</b>
</p>
<p>LoadModule fcgid_module modules/mod_fcgid.so<br>
DefaultInitEnv PHPRC "c:/php/"<br>
DefaultInitEnv PATH
"c:/php;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;"<br>
DefaultInitEnv SystemRoot "C:/Windows"<br>
DefaultInitEnv SystemDrive "C:"<br>
DefaultInitEnv TEMP "C:/WINDOWS/TEMP"<br>
DefaultInitEnv TMP "C:/WINDOWS/TEMP"<br>
DefaultInitEnv windir "C:/WINDOWS"<br>
&lt;Directory "C:/Apache2/htdocs/php/"&gt;<br>
&nbsp;&nbsp;&nbsp; SetHandler fcgid-script<br>
&nbsp;&nbsp;&nbsp; Options execCGI<br>
&nbsp;&nbsp;&nbsp; AllowOverride None<br>
&nbsp;&nbsp;&nbsp; Order allow,deny<br>
&nbsp;&nbsp;&nbsp; Allow from all<br>
&nbsp;&nbsp;&nbsp; FCGIWrapper "c:/php/php.exe" .php</p>
<p>&nbsp;&nbsp;&nbsp; <span style="font-weight: bold;">#</span> <span
 style="font-weight: bold;">You need mod_fcgid version &gt;= 2.1 to
support arguments in FCGIWrapper, if you want<br>
&nbsp;&nbsp; # FCGIWrapper "/usr/local/bin/php -c /etc/" .php</span><br>
&lt;/Directory&gt;</p>
<p><b>This works too:</b>
</p>
<p>LoadModule fcgid_module modules/mod_fcgid.so<br>
DefaultInitEnv PHPRC "c:/php/"<br>
DefaultInitEnv PATH
"c:/php;C:/WINDOWS/system32;C:/WINDOWS;C:/WINDOWS/System32/Wbem;"<br>
DefaultInitEnv SystemRoot "C:/Windows"<br>
DefaultInitEnv SystemDrive "C:"<br>
DefaultInitEnv TEMP "C:/WINDOWS/TEMP"<br>
DefaultInitEnv TMP "C:/WINDOWS/TEMP"<br>
DefaultInitEnv windir "C:/WINDOWS"<br>
AddHandler fcgid-script .php<br>
&lt;Directory "C:/Apache2/htdocs/php/"&gt;<br>
&nbsp;&nbsp;&nbsp; FCGIWrapper "c:/php/php.exe" .php</p>
<p>&nbsp;&nbsp;&nbsp; <span style="font-weight: bold;">#</span> <span
 style="font-weight: bold;">You need mod_fcgid version &gt;= 2.1 to
support arguments in FCGIWrapper, if you want<br>
&nbsp;&nbsp; # FCGIWrapper "/usr/local/bin/php -c /etc/" .php<br>
</span></p>
<p><span style="font-weight: bold;"></span>&nbsp;&nbsp;&nbsp;&nbsp;
Options ExecCGI<br>
&nbsp;&nbsp;&nbsp; allow from all<br>
&lt;/Directory&gt;<br>
</p>
<hr>
<p><b><a name="Authenticator"></a>This is for Authenticator</b></p>
<p>LoadModule fcgid_module modules/mod_fcgid.so
</p>
<p>&lt;Location /fcgid&gt;<br>
SetHandler fcgid-script<br>
Options ExecCGI<br>
allow from all<br>
AuthType Basic<br>
AuthName ProtectedRealm<br>
FastCgiAuthenticator /some/path/authenticator<br>
require valid-user<br>
&lt;/Location&gt;<br>
</p>
<p><b>Another configuration: <a
 name="FastCgiAuthenticatorAuthoritative">FastCgiAuthenticatorAuthoritative</a>
(default On)</b></p>
<p>Setting the <code>FastCgiAuthenticatorAuthoritative</code>
directive explicitly to <em>Off</em> allows authentication to be
passed on to lower level modules</p>
<hr>
<p><b><a name="Authorizer"></a>This is for Authorizer</b></p>
<p>LoadModule fcgid_module modules/mod_fcgid.so
</p>
<p>&lt;Location /fcgid&gt;<br>
SetHandler fcgid-script<br>
Options ExecCGI<br>
allow from all<br>
AuthType Basic<br>
AuthName ProtectedRealm<br>
FastCgiAuthorizer /some/place/Authorizer<br>
&lt;/Location&gt;</p>
<p><b>Another configuration: <a name="FastCgiAuthorizerAuthoritative">FastCgiAuthorizerAuthoritative</a>
(default On)</b></p>
<p>Setting the <code>FastCgiAuthorizerAuthoritative</code> directive
explicitly to <em>Off</em> allows authorization to be passed on to
lower level modules</p>
<hr>
<p><b><a name="AccessChecker"></a>This is for AccessChecker</b></p>
<p>LoadModule fcgid_module modules/mod_fcgid.so
</p>
<p>&lt;Location /fcgid&gt;<br>
SetHandler fcgid-script<br>
Options ExecCGI<br>
allow from all<br>
FastCgiAccessChecker /some/place/access-checker<br>
&lt;/Location&gt;<br>
</p>
<p><b>Another configuration: </b><a
 name="FastCgiAccessCheckerAuthoritative"><b>FastCgiAccessCheckerAuthoritative</b></a><b>
(default On)</b></p>
<p>Setting the <code>FastCgiAccessCheckerAuthoritative</code>
directive explicitly to <em>Off</em> allows access checking to be
passed on to lower level modules</p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
</body>
</html>