编译Apache时,如何enable所有组件

参考以下内容:

./configure \
--prefix=/opt/httpd/2.4 \
--enable-mods-shared=all \
--enable-ssl=shared \
--with-ssl=/usr \
--with-included-apr
--enable-mods-shared=all 表示安装所有模块

httpd的apxs类似php的phpize,用于添加httpd的额外模块,libphp5.so(mod_php)就是这样的一个模块,
所以php在编译时加入对apache的支持需要指定apxs的位置--with-apxs2=/httpd/2.4/bin/apxs

又比如编译后构建Apache FastCGI进程管理器模块mod_fcgid
tar xjf mod_fcgid-2.3.9.tar.bz2 && cd mod_fcgid-2.3.9
APXS=/png/httpd/2.4.17/bin/apxs ./configure.apxs
make && make install
httpd.conf配置:
#载入mod_fcgid模块(不能和php5_module同时使用)
LoadModule fcgid_module modules/mod_fcgid.so
AddHandler fcgid-script .php
#防止PHP-CGI进程在处理完所有请求前退出,PHP_FCGI_MAX_REQUESTS 应该大于或等于 FcgidMaxRequestsPerProcess.
FcgidInitialEnv PHP_FCGI_MAX_REQUESTS 10000
FcgidMaxRequestsPerProcess 10000
FcgidMaxProcesses 5
FcgidIOTimeout 40
FcgidIdleTimeout 300
#代码加密扩展Beast不兼容PHP-CGI运行模式
FcgidWrapper /png/php/5.4.45/bin/php-cgi .php
#在需要使用PHP-CGI来执行PHP的Directory加上Options +ExecCGI,比如:
<Directory "/png/www/a.com/public_html/fcgid">
    Options +ExecCGI
</Directory>

mod_fcgid 可以用来替代 mod_cgi 和 mod_cgid,
具有管理和维持PHP-CGI进程数目的功能,
而 mod_proxy_fcgi 应该是类似 Nginx fastcgi_pass 的东西.
http://httpd.apache.org/mod_fcgid/
ApacheLounge提供有Windows上的mod_fcgid二进制包:
http://www.apachelounge.com/download/

 

转载于:https://www.cnblogs.com/cnbing/p/6957288.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值