V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
skllb
V2EX  ›  Google

使用 nginx 怎么配置访问 google 全站呢?包括 google 图片等

  •  1
     
  •   skllb · 2015-11-23 18:26:20 +08:00 · 2270 次点击
    这是一个创建于 3082 天前的主题,其中的信息可能已经有所发展或是发生改变。

    大神, 我想配个 nginx 作为访问 google 代理,但现在仅支持 google.com

    地址为: https://www.bool.so

    不知道 google 的全部域名、、、 google 图片里面还有大量使用二级域名的, 有没有方案可以使用 nginx 配置 google 的所有服务呢?

    不配 vpn 和在客户端安装软件与做任何配置的前提下。 谢谢
    现在的配置如下:

    upstream google {
    server 74.125.239.128:80 max_fails=1;
    server 74.125.239.129:80 max_fails=1;
    server 74.125.239.130:80 max_fails=1;
    server 74.125.239.131:80 max_fails=1;
    server 74.125.239.132:80 max_fails=1;
    server 74.125.239.133:80 max_fails=1;
    server 74.125.239.134:80 max_fails=1;
    server 74.125.239.135:80 max_fails=1;
    server 74.125.239.136:80 max_fails=1;
    server 74.125.239.137:80 max_fails=1;
    server 74.125.239.142:80 max_fails=1;
    server 216.58.192.14:80 max_fails=1;
    }
    server {
    listen 443 ssl spdy_detect spdy;
    server_name www.bool.so;
    ssl on;
    ssl_certificate /opt/sslkeys/bool.so.crt;
    ssl_certificate_key /opt/sslkeys/bool.so.key;
    location / {
    expires max;
    proxy_cache one;
    proxy_cache_valid 200 302 1h;
    proxy_cache_valid 404 1m;
    proxy_redirect https://www.google.com/ /;
    proxy_cookie_domain google.com bool.so;
    proxy_pass http://google;
    proxy_set_header Host "www.google.com";
    proxy_set_header Accept-Encoding "";
    proxy_set_header User-Agent $http_user_agent;
    proxy_set_header Accept-Language "zh-CN";
    proxy_set_header Cookie "PREF=ID=047808f19f6de346:U=0f62f33dd8549d11:FF=2:LD=zh-CN:NW=1:TM=1325338577:LM=1332142444:GM=1:SG=2:S=rE0SyJh2w1IQ-Maw";

    sub_filter_types text/javascript application/javascript text/css;
    sub_filter_once off;

    }
    }

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2218 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 02:32 · PVG 10:32 · LAX 19:32 · JFK 22:32
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.