本节分享的这段shell 脚本可以运行Apache 2.x的mod_fastcgi的。
1,
<VirtualHost *:80>
ServerAdmin webmaster@it.net.cn DocumentRoot "/websites/home/it.net.cn/http" ServerName www.it.net.cn ServerAlias it.net.cn. ErrorLog "/websites/home/it.net.cn.logs/error.log" CustomLog "/websites/home/it.net.cn/logs/access.log" common ScriptAlias /cgi-bin/ "/websites/home/it.net.cn/cgi-bin/" <Directory "/websites/home/it.net.cn/http"> Options -Indexes FollowSymLinks +ExecCGI AllowOverride AuthConfig FileInfo AddHandler php5-fastcgi .php Action php5-fastcgi /cgi-bin/php.cgi Order allow,deny Allow from all </Directory> <Directory "/websites/home/it.net.cn/cgi-bin"> AllowOverride None Options None Order allow,deny Allow from all </Directory> #SuExecUserGroup jbxue.comUser jbxueGroup </VirtualHost>
2,shell脚本
#!/bin/sh
# # Apache 2.x中运行 PHP5 中的 mod_fastcgi ### Set PATH ### PHP_CGI=/usr/local/bin/php-cgi PHP_FCGI_CHILDREN=4 PHP_FCGI_MAX_REQUESTS=1000 ### no editing below ### export PHP_FCGI_CHILDREN export PHP_FCGI_MAX_REQUESTS exec $PHP_CGI (责任编辑:IT) |