入门客AI创业平台(我带你入门,你带我飞行)
博文笔记

Nginx反向代理Google扩展ngx_http_google_filter_module

创建时间:2017-06-17 投稿人: 浏览次数:241

模块介绍

ngx_http_google_filter_module是一个过滤器模块,能够让谷歌镜像更便捷的部署。内建了正则表达式、URI locations和其他复杂的配置。原生nginx模块确保了更加高效地处理cookies, gstatic scoures和重定向。

安装Nginx

使用《OneinStack》Nginx选择y,其余n

重新编译Nginx,安装ngx_http_google_filter_module模块

  1. cd /root/oneinstack/src
  2. git clone https://github.com/cuber/ngx_http_google_filter_module
  3. git clone https://github.com/yaoweibin/ngx_http_substitutions_filter_module
  4. wget http://mirrors.linuxeye.com/oneinstack/src/pcre-8.39.tar.gz
  5. wget http://mirrors.linuxeye.com/oneinstack/src/openssl-1.0.2j.tar.gz
  6. tar xzf pcre-8.39.tar.gz
  7. tar xzf openssl-1.0.2j.tar.gz
  8. tar xzf nginx-1.10.2.tar.gz
  9. cd nginx-1.10.2
  10. ./configure --prefix=/usr/local/nginx --user=www --group=www --with-http_stub_status_module 
  11. --with-http_v2_module --with-http_ssl_module --with-ipv6 --with-http_gzip_static_module
  12. --with-http_realip_module --with-http_flv_module --with-openssl=../openssl-1.0.2j
  13. --with-pcre=../pcre-8.39 --with-pcre-jit --with-ld-opt="-ljemalloc" 
  14. --add-module=../ngx_http_google_filter_module 
  15. --add-module=../ngx_http_substitutions_filter_module
  16. make
  17. mv /usr/local/nginx/sbin/nginx{,_`date +%m%d`}  #备份现有nginx
  18. cp objs/nginx /usr/local/nginx/sbin/  #更新nginx
  19. nginx -t  #检查nginx语法
  20. service nginx restart
声明:该文观点仅代表作者本人,入门客AI创业平台信息发布平台仅提供信息存储空间服务,如有疑问请联系rumenke@qq.com。
  • 上一篇:没有了
  • 下一篇:没有了
未上传头像