没有之一,确实是史上最强,不过安装比较麻烦,这里开始记录下
cd /root
git clone https://github.com/openresty/sregex.git
git clone https://github.com/openresty/replace-filter-nginx-module.git
cd sregex
make PREFIX=/usr/local/sregex
make install PREFIX=/usr/local/sregex
ln -s /usr/local/sregex/lib/libsregex.so.0 /lib64
ln -s /usr/local/sregex/lib/libsregex.so.0 /lib
cd /root/nginx-1.1.1
./configure ….. –add-module=/root/replace-filter-nginx-module
make && make install
/usr/local/nginx/sbin/nginx -V
/usr/local/nginx/sbin/nginx -t
主要在lib的位置哪里卡了下,报错为
/usr/local/nginx/sbin/nginx: error while loading shared libraries: libsregex.so. 0: cannot open shared object file: No such file or directory