项目主页

获取模块

cd /usr/src
git clone https://github.com/yaoweibin/ngx_http_substitutions_filter_module
git clone https://github.com/cuber/ngx_http_google_filter_module.git

在nginx编译的configure中追加一行:

--add-module=/usr/src/ngx_http_substitutions_filter_module --add-module=/usr/src/ngx_http_google_filter_module

编译
调用

server {
    listen 80;
    server_name google.test;

    location / {
        google on;
    }
}

1 对 “nginx用ngx_http_google_filter_module模块反向代理google”的想法;

  1. nginx多域名配置时候可以用通配符

    server_name ~^(www\.)?(.+)$;
    

回复 sre 取消回复

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code