分类目录

链接

2017 年 12 月
 123
45678910
11121314151617
18192021222324
25262728293031

近期文章

热门标签

新人福利,免费薅羊毛

现在位置:    首页 > LINUX > 正文
nginx反向代理搭建谷歌镜像
LINUX 暂无评论 阅读(661)

nginx反向代理搭建谷歌镜像.

啥也不说了,直接上代码:

  1. server {
  2.         listen 8000;  
  3.         server_name  google.uol123.com;
  4.             
  5.         location / {
  6.             #root   "d:/wwwroot/test";
  7.             #index  index.html;
  8.             #proxy_redirect off; 
  9.             proxy_pass https://www.google.com.hk/; 
  10.             proxy_redirect / https://www.google.com.hk/;
  11.             proxy_set_header Host www.google.com.hk;
  12.             proxy_set_header X-Real-IP $remote_addr; 
  13.             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
  14.             proxy_set_header Accept-Encoding ""; 
  15.             proxy_set_header User-Agent "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.49 Safari/537.36"; 
  16.             #sub_filter www.google.com google.uol123.com; 
  17.             #sub_filter_once off; 
  18.         }
  19.         
  20.     }

估计有需要的人会用到,自己亲测在windows和Linux下面都可以使用。

============ 欢迎各位老板打赏~ ===========

本文版权归Bruce's Blog所有,转载引用请完整注明以下信息:
本文作者:Bruce
本文地址:nginx反向代理搭建谷歌镜像 | Bruce's Blog

发表评论

留言无头像?