【nginx配置】Nginx中Google 扩展代理模块配置教程

时间:2020-09-13  来源:Google  阅读:

据说wen.lu开源了,代码大家可以到github自行下载。

[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 www.111cn.net;
        listen 80;
        resolver 8.8.8.8;
          location / {
          google on;
          google_scholar on;
          google_language "en";
        }
}
}

【nginx配置】Nginx中Google 扩展代理模块配置教程

http://m.bbyears.com/seo/98507.html

推荐访问:nginx负载均衡 nginx怎么读
相关阅读 猜你喜欢
本类排行 本类最新