总是不成功,求救,我的是:
server {
listen 80;
server_name wiki.domain.com;
rewrite ^(.*) https://wiki.domain.com$1 permanent;
}
server {
listen 443;
server_name wiki.domain.com;
location / {
proxy_pass https://zh.wikipedia.org/;
proxy_redirect https://zh.wikipedia.org/ /;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host zh.wikipedia.org;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
1
49 2015-08-04 20:22:20 +08:00
server{
listen 45.116.12.40:443 spdy ssl ; spdy_headers_comp 6; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl on; ssl_certificate /root/ssl/ssl.crt; ssl_certificate_key /root/ssl/ssl.key; ssl_dhparam /root/dh.pem; ssl_session_tickets on; ssl_ciphers CHACHA20:GCM:HIGH:!DH:!RC4:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS; ssl_prefer_server_ciphers on; add_header Strict-Transport-Security "max-age=31536000; preload;"; server_name wiki.49.gs; location / { proxy_pass https://zh.wikipedia.org/; proxy_cache one; proxy_cache_valid 200 302 2h; proxy_cache_valid 404 1h; proxy_buffering off; proxy_cookie_domain wikipedia.org wiki.49.gs; proxy_redirect https://zh.wikipedia.org/ /; 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 $http_user_agent; proxy_set_header Accept-Language "zh-CN"; proxy_set_header Cookie "GeoIP=HK:00:Hong_Kong:22.2833:114.1500:v4; uls-previous-languages=%5B%22zh-cn%22%5D; zhwikimwuser-sessionId=7eb60062b6b7b89f; TBLkisOn=0"; sub_filter zh.wikipedia.org wiki.49.gs; sub_filter_once off; } } server { listen 45.116.12.40:80; server_name wiki.49.gs; rewrite ^(.*) https://wiki.49.gs$1 permanent; } |