Nginx替换过滤文本模块实例教程

1.安装此模块需要先安装sregex运行库apt-get update;
apt-get install git make gcc -y
#Centos改成yumgit clone https://github.com/agentzh/sregexcd sregexmakemake installcd ..git clone https://github.com/agentzh/replace-filter-nginx-modulewget http://nginx.org/download/nginx-1.2.6.tar.gztar zxvf nginx-1.2.6.tar.gzcd nginx-1.2.6./configure --add-module=../replace-filter-nginx-module #自行加其他编译参数makemake installnginx.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;}

以上就是Nginx替换过滤文本模块实例教程的详细内容,更多请关注创想鸟其它相关文章!

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 chuangxiangniao@163.com 举报,一经查实,本站将立刻删除。
发布者:程序猿,转转请注明出处:https://www.chuangxiangniao.com/p/288587.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
【项目】江苏2024年完成投资超7300亿元,涉多个半导体项目;
上一篇 2025年11月4日 19:37:13
开炮吧方舟发售倒计时后最后两天,塔防建造与肉鸽的完美融合
下一篇 2025年11月4日 19:37:18

相关推荐

发表回复

登录后才能评论
关注微信