高级运维工程师 曹青峰 QQ 258896473
分类: LINUX
2015-02-04 17:13:12
翻了无数次墙 终于搞定了
nginx: [warn] ModSecurity: Loaded PCRE do not match with compiled!
解决方法
wget
./configure --prefix=/usr/local/pcre-8.36 --libdir=/usr/local/lib/pcre --includedir=/usr/local/include/pcre
configure有许多参数可配,具体参见./configure --help及手册
4、编译:
make
5、安装:
make install
6、检查:
ls /usr/local 检查是否有pcre目录
ls /usr/local/lib 检查是否有pcre目录
ls /usr/local/include 检查是否有pcre目录
7、将库文件导入cache:
方法1:在/etc/ld.so.conf中加入: /usr/local/lib/pcre,然后运行ldconfig
参考
I believe it's more a bug than a feature.
Cpanel or EasyApache installs PCRE version 8.21 2011-12-12 int /opt/pcre/lib
But it does also install PCRE from YUM repository, which for Centos has Version 7.8 2008-09-05, which is too old.
I am not sure why EasyApache makes Apache and PHP (DSO, mod_ruid2) to
use the system ones, even when it's compiled with /opt/pcre parameter.
Requesting PCRE version from command lines reports new version, but
using phpinfo() reported old versions. Meaning apache , and PHP running
as module uses system ones.
As i have little time nowadays, let's se if another users will encouter same problem, maybe they could provide more information.