php模块安装相应软件包即可,如debian下apt-get install libapache2-mod-php5。
fastcgi网上可以搜索到fastcgi和fcgid两个模块,较适合使用的为fcgid,在apache项目的页面上有单独的链接页面。debian下运行apt-get install libapache2-mod-fcgid。
下面是其他相关的配置,来自apache项目上的在线文档:
----------
# FcgidMaxRequestsPerProcess should be <= PHP_FCGI_MAX_REQUESTS
# The example PHP wrapper script overrides the default PHP setting.
FcgidMaxRequestsPerProcess 10000
# Uncomment the following line if cgi.fix_pathinfo is set to 1 in
# php.ini:
# FcgidFixPathinfo 1
Alias /phpapp/ /usr/local/phpapp/
<Location /phpapp/>
AddHandler fcgid-script .php
Options +ExecCGI
FcgidWrapper /usr/local/bin/php-wrapper .php
# Customize the next two directives for your requirements.
Order allow,deny
Allow from all
</Location>
----------
新建的/usr/local/bin/php-wrapper
----------
PHP wrapper script - /usr/local/bin/php-wrapper #!/bin/sh
# Set desired PHP_FCGI_* environment variables.
# Example:
# PHP FastCGI processes exit after 500 requests by default.
PHP_FCGI_MAX_REQUESTS=10000
export PHP_FCGI_MAX_REQUESTS
# Replace with the path to your FastCGI-enabled PHP executable
exec /usr/local/bin/php-cgi
----------
声明: 此文观点不代表本站立场;转载须要保留原文链接;版权疑问请联系我们。