1.编译安装regex
wget -c --no-check-certificate https://github.com/agentzh/sregex/tarball/master -O -|tar xz && mv -f agentzh-sregex* sregex
cd sregex/
make
make install
cd ../

2.重编译nginx

wget -c --no-check-certificate https://github.com/agentzh/replace-filter-nginx-module/tarball/master -O -|tar xz && mv -f agentzh-replace-filter-nginx-module* replace-filter-nginx-module
...
./configure --add-module=/path/to/replace-filter-nginx-module
...