1
rex1901 2014-11-25 14:41:23 +08:00 1
proxy_pass http://74.125.224.207;
|
3
sdcg1994 2014-11-25 20:14:20 +08:00
不加https能直接打开。。。
|
4
sdcg1994 2014-11-25 20:19:42 +08:00
我的代码是这样,你可以参考下
server { listen 80; server_name *.com www.*.com ; rewrite ^(.*) https://www.*.com$1 permanent; add_header Strict-Transport-Security "max-age=31536000;includeSubDomains"; } server { listen 443 ssl spdy; server_name *.com www.*.com ; ssl on; ssl_certificate /cert/sever.crt ; ssl_certificate_key /cert/sever.key ; ssl_protocols TLSv1.2 TLSv1.1 TLSv1; ssl_ciphers FIPS@STRENGTH:!aNULL:!eNULL; ssl_prefer_server_ciphers on; ssl_stapling on; ssl_stapling_verify on; add_header Strict-Transport-Security "max-age=31536000;includeSubDomains"; location / { proxy_redirect https://www.google.com/ /; proxy_pass http://173.194.120.67; proxy_cookie_domain google.com *.com; proxy_set_header Accept-Language "zh-CN"; proxy_set_header Accept-Encoding ""; proxy_set_header User-Agent $http_user_agent; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_cache one; proxy_cache_valid 200 304 3h; proxy_cache_valid 301 3d; proxy_cache_valid any 1m; proxy_cache_use_stale invalid_header error timeout http_502; sub_filter google.com *.com; sub_filter_once off; } } |
6
popphen OP @sdcg1994 按照你这个提示
nginx: [emerg] "proxy_cache" zone "one" is unknown in /usr/local/nginx/conf/nginx.conf:118 |
7
rex1901 2014-11-25 22:08:17 +08:00 1
不加cache试试,我的就没有加,是可以用的。
server { listen 80; server_name g.juxia.me; rewrite ^(.*) https://g.juxia.me$1 permanent; } server { listen 443; server_name g.juxia.me; ssl on; ssl_certificate /usr/local/nginx/ssl.crt; ssl_certificate_key /usr/local/nginx/ssl.key; location / { proxy_redirect http://www.google.com/ /; proxy_cookie_domain google.com g.juxia.me; proxy_pass http://74.125.224.207; proxy_set_header Accept-Encoding ""; proxy_set_header User-Agent $http_user_agent; proxy_set_header Accept-Language "zh-TW"; proxy_set_header Cookie "PREF=ID=136346c68dca691f:U=1b64135de4bae02b:FF=2:LD=zh-TW:NW=1:TM=1410449167:LM=1410449198:GM=1:SG=1:S=mandOuC2bhozpAdN"; sub_filter www.google.com g.juxia.me; sub_filter_once off; } } |
12
camilletan 2014-12-04 10:41:38 +08:00
怎么解决的啊,能告诉我下么
|
13
camilletan 2014-12-04 10:42:02 +08:00
|
14
camilletan 2014-12-04 10:52:19 +08:00 1
@popphen 我的也是ssl错误,443端口启用了啊,也重启了,但是还是错的
|
15
popphen OP |