Nginx编译安装第三方模块http_substitutions_filter_module

1. >>ngx_http_substitutions_filter_module OR HttpSubModule ?

为了应急处理或者一些需要,有时候需要使用Nginx的反向代理某站点,并通过 HttpSubModule 和ngx_http_substitutions_filter_module 模块替换正文内容和URL。
但是通常LNMP套件安装的webserver并没有编译安装nginx官方模块HttpSubModule(官方option),并且,官方自带的模块 HttpSubModule 只能匹配1条规则,但是使用第三方模块ngx_http_substitutions_filter_module 可以匹配多条规则。

备注:
ngx_http_substitutions_filter_module 是指第三方nginx模块 substitutions4nginx (原:Google Code 现:github
HttpSubModule 是指Nginx官方的 with-http_sub_module模块(option)

Nginx自身带的module并不多,这也是它为什么性能好,系统开销较小的原因之一,相比apache,它不能动态的加载module,如果之前编译安装了Nginx,这时候就需要重新编译nginx添加模块,并替换掉原先的nginx执行文件。

2. 1.下载需要的文件

substitutions4nginx github下载

  1. # 下载第三方模块
  2. # cd ~
  3. # git clone git://github.com/yaoweibin/ngx_http_substitutions_filter_module.git

3. 2.查看之前Nginx编译configure

  1. # nginx -V
  2. nginx version: nginx/1.2.7
  3. built by gcc 4.6.3(Ubuntu/Linaro4.6.3-1ubuntu5)
  4. TLS SNI support enabled
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值