用nginx 搞了一个google的反向代理,域名:http://gg.cellmean.com,nginx需要sub_filter模块,没有ssl证书,偶尔会被reset,T_T

配置如下:


server {
listen  80;
server_name gg.cellmean.com google.cellmean.com;
charset utf-8;
location / {
proxy_redirect off;
proxy_pass https://www.google.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Accept-Encoding "";
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";
proxy_set_header Accept-Language "zh-CN";
proxy_set_header Cookie "PREF=ID=1111111111111111:FF=1:LD=zh-CN:NW=1:TM=1434359470:LM=1436328666:V=1:S=8SyFnLZIQJF0Qoku; NID=69
=MhclHLIT3bU6cla9-vcFvOceqI9fGvfzbjkw5NNoR_kDuKj5Ym7TJcuYjVegMZeYI5HYwVlD3GOwuifHhgFLzIGcdFzMGWCBLa-
8r6gUxBSA3eWl9acryxCCgN8xXRYTZJxphhseCTmM4nOnkA";
sub_filter https://www.google.com http://gg.cellmean.com;
sub_filter_once off;
}
access_log off;
}

- EOF -

评论

加载中