专注收集记录技术开发学习笔记、技术难点、解决方案
网站信息搜索 >> 请输入关键词:
您当前的位置: 首页 > 上网方式

使用国外VPS 反向代理访问谷歌

发布时间: 文章来源:www.iduyao.cn 采编人员:毒药  
方式一:用境外的服务器,谷歌网页搜索使用Google Web Search API,获得搜索结果后再返回客户端展示出来;

方式二:直接使用了Nginx进行反向代理。

面是Nginx反向代理的配置

server {
    listen 80;
    server_name xxx.xxx;

    location / {
        proxy_redirect http://www.google.com/ /;
        proxy_cookie_domain google.com xxx.xxx;
        proxy_pass http://173.194.127.48;
        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 www.google.com xxx.xxx;
        sub_filter_once off;
    }
}
友情提示:
信息收集于互联网,如果您发现错误或造成侵权,请及时通知本站更正或删除,具体联系方式见页面底部联系我们,谢谢。
   4424阅读
目前尚无回复
登录 后发表评论