nginx配置https转发的一个例子

server {
        listen      443;
    #https默认端口不是80,而是443 server_name www.test.com; ssl on; ssl_certificate cert
/2142977640231.pem; ssl_certificate_key cert/2142977640231.key; ssl_session_timeout 5m; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; location / { proxy_pass http://192.168.97.5:9888; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection keep-alive; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } }

 

posted @ 2017-10-18 18:38  IWing  阅读(18745)  评论(0编辑  收藏  举报