Nginx替换过滤文本模块replace-filter-nginx-module

2017-08-25T22:22:36
1.安装此模块需要先安装sregex运行库

apt-get update;
apt-get install git make gcc -y
#Centos改成yum git clone https://github.com/agentzh/sregex cd sregex make make install cd .. git clone https://github.com/agentzh/replace-filter-nginx-module wget http://nginx.org/download/nginx-1.2.6.tar.gz tar zxvf nginx-1.2.6.tar.gz cd nginx-1.2.6 ./configure --add-module=../replace-filter-nginx-module #自行加其他编译参数 make make install nginx.conf的用法举例: location /t { default_type text/html; echo abc; replace_filter 'ab|abc' X; } location / { # proxy_pass/fastcgi_pass/... # caseless global substitution: replace_filter '\d+' 'blah blah' 'ig'; replace_filter_types text/plain text/css; }

via.http://www.cnblogs.com/crxis/p/7091174.html

当前页面是本站的「Baidu MIP」版。发表评论请点击:完整版 »
因本文不是用Markdown格式的编辑器书写的,转换的页面可能不符合MIP标准。