nginx用ngx_http_google_filter_module模块反向代理google
获取模块
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;
}
}
nginx多域名配置时候可以用通配符