nginx https反向代理


server
{
listen 443 ssl;
#listen [::]:80;
server_name www.wangjingfeng.com;
ssl on;
ssl_certificate 20.crt;
ssl_certificate_key 20.key;
#ssl_session_timeout  5m;
#ssl_protocols  SSLv3 TLSv1;
#ssl_ciphers  HIGH:!ADH:!EXPORT56:RC4+RSA:+MEDIUM;
#ssl_prefer_server_ciphers   on;
#index index.html index.htm index.php default.html default.htm default.php;
#root  /home/wwwroot/wangjingfeng;

#include wordpress.conf;
#error_page   404   /404.html;
location / {
proxy_pass    http://www.baidu.com/;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
#proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#proxy_set_header X-Forwarded-Proto http;
proxy_set_header SSL '1';
proxy_redirect http:// https://;
proxy_redirect off;
}
access_log  /home/wwwlogs/www.wangjingfeng.com443.log  access;
}


Whatever is worth doing is worth doing well.