HatsuneMiku 2014-08-08
#user nobody; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' # '$status $body_bytes_sent "$http_referer" ' # '"$http_user_agent" "$http_x_forwarded_for"'; #access_log logs/access.log main; port_in_redirect off; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #A #gzip on; upstream google { server 74.125.239.112:80 max_fails=3; server 74.125.239.113:80 max_fails=3; server 74.125.239.114:80 max_fails=3; server 74.125.239.115:80 max_fails=3; server 74.125.239.116:80 max_fails=3; } server { listen $OPENSHIFT_DIY_IP:$OPENSHIFT_DIY_PORT; server_name localhost; #server_name google-i51.rhcloud.com; #rewrite ^(.*) https://xxx.xxx.com$1 permanent; #charset koi8-r; #access_log logs/host.access.log main; #location / { # root html; # index index.html index.htm; #} #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # #error_page 500 502 503 504 /50x.html; location / { #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 xxx.xxx.com; 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 www.google.com xxx.xxx.com #sub_filter_once off; } } }ok,访问你在 rhcloud.com地址,看哈是否成功,当然中间可能有错误,可以看哈log文件,找哈原因
祝你成功,google在手 ,欢迎抛砖哈
最后欢迎访问我的小站,利多乐