服务器技术

 首页 > 服务器技术 > nginx > nginx错误处理:ModSecurity PCRE do not match with compiled 的解决

nginx错误处理:ModSecurity PCRE do not match with compiled 的解决

分享到:
【字体:
导读:
         [导读] nginx错误处理:ModSecurity PCRE do not match with compiled 的解决 解决方法 wgetftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.36.tar.gz ./configure --prefix=/usr/local/pcre-8.36 --libdir=/usr/local/lib/pcre --include...

nginx错误处理:ModSecurity PCRE do not match with compiled 的解决 



解决方法


wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.36.tar.gz


./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.  


分享到:
nginx常用if判断语句与变量set使用方法
nginx常用if判断语句与变量set使用方法 [root@www conf]#  tail      nginx.conf location  /  {     stub_status  on; access_log      off; } } include    vhost/*.conf;              //指定虚拟主机配置文件路径  }  [root@www conf]#  cd      /usr/...
linux环境下安装nginx步骤启动1、验证ngi...
开始前,请确认gcc g++开发类库是否装好,默认已经安装。   ububtu平台编译环境可以使用以下指令 apt-get install build-essential apt-get install libtool   centos平台编译环境使用如下指令   安装make: yum -y install gcc automake autoconf libtool make   安装g++: yum install gcc gcc-c++...
  •         php迷,一个php技术的分享社区,专属您自己的技术摘抄本、收藏夹。
  • 在这里……