php-fastcgi配置,PHP-FastCGI的配置和测试(linux下)

本文详细介绍了如何在Linux系统中配置PHP-FastCGI,包括安装mod_fastcgi模块,编辑httpd.conf配置文件,设置FastCGI支持PHP,以及创建虚拟主机的配置。同时,进行了压力测试,对比了配置前后PHP-FastCGI的性能差异,结果显示性能提升显著。
摘要由CSDN通过智能技术生成

一、配置PHP-FastCGI

1、安装

wget http://www.fastcgi.com/dist/mod_fastcgi-2.4.6.tar.gz

tar xzf mod_fastcgi-2.4.6.tar.gz

cd mod_fastcgi-2.4.6

cp Makefile.AP2 Makefile

make top_dir=/usr/local/apache

make top_dir=/usr/local/apache install

2、编辑httpd.conf配置文件,加入fastcgi模块装载代码:

LoadModule fastcgi_module modules/mod_fastcgi.so

3、配置apache支持php

编辑httpd.conf文件,加入如下代码:

### fastcgi ###

ScriptAlias /fcgi-bin/ "/usr/local/php/bin/"

AddHandler php-fastcgi .php

Action php-fastcgi /fcgi-bin/php-cgi

AddType application/x-httpd-php .php

AddHandler fcgid-script. .php .fcgi   ### 暂时只配置支持.php

IdleTimeout 300

ProcessLifeTime 1800

MaxProcessCount 100

DefaultMinClassProcessCount 3

DefaultMaxClassProcessCount 8

IPCConnectTimeout 15

<
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值