据说wen.lu开源了,代码大家可以到github自行下载。
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
[root@hz /]# cd /byrd/tools/ [root@hz tools]# yum install pcre* openssl openssl-devel gcc gcc-c++ wget vim -y [root@hz tools]# git clone https://github.com/cuber/ngx_http_google_filter_module [root@hz tools]# git clone https://github.com/yaoweibin/ngx_http_substitutions_filter_module [root@hz tools]# wget http://nginx.org/download/nginx-1.7.8.tar.gz [root@hz tools]# cd /byrd/service/ [root@hz service]# wget http://www.openssl.org/source/openssl-1.0.2e.tar.gz [root@hz service]# cd openssl-1.0.2e/ [root@hz openssl-1.0.2e]# ./config [root@hz openssl-1.0.2e]# make [root@hz openssl-1.0.2e]# cd ../../tools/ [root@hz tools]# tar zxf nginx-1.7.8.tar.gz [root@hz tools]# cd nginx-1.7.8 [root@hz nginx-1.7.8]# ./configure --user=www --group=www --prefix=/byrd/service/nginx-1.7.8 --with-openssl=/byrd/service/openssl-1.0.1h --with-pcre --with-http_ssl_module --with-http_spdy_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_stub_status_module --with-ipv6 --with-http_sub_module --add-module=/byrd/tools/ngx_http_google_filter_module --add-module=/byrd/tools/ngx_http_substitutions_filter_module [root@hz nginx-1.7.8]# make && make install [root@hz nginx-1.7.8]# ln -s /byrd/service/nginx-1.7.8 /usr/local/nginx [root@hz nginx-1.7.8]# cd /usr/local/nginx/conf/ [root@hz conf]# cp nginx.conf nginx.conf.bk [root@hk conf]# cat ./nginx.conf worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; server { server_name note.t4x.org; listen 80; resolver 8.8.8.8; location / { google on; google_scholar on; google_language "en"; } } } |
nginx代理模块:http://nginx.org/en/docs/http/ngx_http_proxy_module.html
官方文档:https://github.com/cuber/ngx_http_google_filter_module
中文版本:https://github.com/cuber/ngx_http_google_filter_module/blob/master/README.zh-CN.md SourceByrd's Weblog-https://note.t4x.org/system/ngx-http-google-filter-module/
申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!