Nginx替换过滤文本模块replace-filter-nginx-module
2024-08-31 03:59:20
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;
}
最新文章
- debian8安装Odoo中的Barcode Scanner Hardware Driver模块时,提示没有evdev
- 制作本地 odoo deb包安装镜像
- 前端异步解决方案——mmDeferred
- 第九篇、Swift的基本使用
- apache 修改端口号 修改根目录 建立多个网站
- mysql获取各种日期
- MVC test
- Javascript下IE与Firefox下的差异兼容写法总结
- jQuery 3.0最终版发布,十大新特性眼前一亮
- 微表面分布函数(Microfacet Distribution Function)确切含义
- mui 下拉刷新和上拉加载
- js里的回调函数
- angularjs入门(二)
- mysql-学习笔记1
- 【Android自动化】编写一个log模块,输出至控制台,供程序运行查看
- 低版本的linux系统装samba服务器
- Ubuntu16.04(Linux)安装JDK
- PSP DAILY软件功能说明书
- SAPUI5实例一:来创建Web应用UI
- mongodb的学习之旅一