方式二:直接使用了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;
}
}