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;
}

Nginx替换过滤文本模块replace-filter-nginx-module的更多相关文章

  1. nginx图片过滤处理模块http_image_filter_module

    nginx图片过滤处理模块http_image_filter_module安装配置笔记 http_image_filter_module是nginx提供的集成图片处理模块,支持nginx-0.7.54 ...

  2. nginx图片过滤处理模块http_image_filter_module安装配置笔记

    http_image_filter_module是nginx提供的集成图片处理模块,支持nginx-0.7.54以后的版本,在网站访问量不是很高磁盘有限不想生成多余的图片文件的前提下可,就可以用它实时 ...

  3. nginx图片过滤处理模块http_image_filter_module安装配置

    http_image_filter_module是nginx提供的集成图片处理模块,支持nginx-0.7.54以后的版本,在网站访问量不是很高磁盘有限不想生成多余的图片文件的前提下可,就可以用它实时 ...

  4. Nginx HTTP 过滤addition模块(响应前后追加数据)

    --with-http_addition_module 需要编译进Nginx 其功能主要在响应前或响应后追加内容 add_before_body 指令 将处理给定子请求后返回的文本添加到响应正文之前 ...

  5. Nginx核心流程及模块介绍

    Nginx核心流程及模块介绍 1. Nginx简介以及特点 Nginx简介: Nginx (engine x) 是一个高性能的web服务器和反向代理服务器,也是一个IMAP/POP3/SMTP服务器 ...

  6. nginx日志过滤相同IP方法

    nginx日志过滤相同IP方法分析nginx日志的时候,统计ip怎么过滤重复的?awk '{print $2}' nginx.log |sort -rn |uniq -c |sort -rn |hea ...

  7. Nginx:HTTP过滤模块

    参考资料<深入理解Nginx> HTTP过滤模块也是一种HTTP模块,与普通HTTP处理模块不同在于: 1.一个请求仅由一个HTTP处理模块处理,而可以被任意个HTTP过滤模块处理 2.普 ...

  8. Nginx 的过滤模块是干啥用的?

    上一篇文章我写了 Nginx 的 11 个阶段,很多人都说太长了.这是出于文章完整性的考虑的,11 个阶段嘛,一次性说完就完事了.今天这篇文章比较短,看完没问题. 过滤模块的位置 之前我们介绍了 Ng ...

  9. Nginx编译安装第三方模块http_substitutions_filter_module2222

    Nginx编译安装第三方模块http_substitutions_filter_module Rming -- 阅读 安装 Http 编译 module filter nginx 模块 >> ...

随机推荐

  1. linux-课题练习1

    1.创建组testgroup: 2.创建用户a2012,先采用默认设置创建,然后使该用户加入testgroup组. 3.创建用户a2013,其用户主目录为/tmp/a2013,其主组为testgrou ...

  2. node 动态页面渲染

    代码: 'use strict' const express = require('express'); const consoldiate = require('consolidate'); con ...

  3. node解析post表单信息

    一共有4种解析方式 urlencoded.json.text .raw 发起请求的form表单中可以设置三种数据编码方式 application/x-www-form-urlencoded.multi ...

  4. HyperLedger Fabric 1.4 超级账本项目(5.4)

    超级账本(Hyperledger)项目分框架类和工具类两种项目,框架类有Hyperledger Burrow.Hyperledger Fabric.Hyperledger Indy.Hyperledg ...

  5. Laravel框架

    curl操作: ===================================初始化$ch=curl_init() 设置请求的urlcurl_setopt($ch,CURLOPT_URL,&q ...

  6. Redis进阶:数据持久化,安全,在PHP中使用

    一.redis数据持久化 由于redis是一个内存数据库,如果系统遇到致命问题需要关机或重启,内存中的数据就会丢失,这是生产环境所不能允许的.所以redis提供了数据持久化的能力. redis提供了两 ...

  7. 【个人训练】(UVa146)ID Codes

    题意与解析 这题其实特别简单,求给定排列的后继.使用stl(next_permutation)可以方便地解决这个问题.但是,想要自己动手解就是另外一回事了.我的解法是从后往前找到第一个$a_i$比$a ...

  8. Bugku 速度要快

    import requests import base64 url="http://123.206.87.240:8002/web6/" res=requests.get(url) ...

  9. python------- IO 模型

                                                    IO模型介绍                                               ...

  10. LeetCode - 70. Climbing Stairs(0ms)

    You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb ...