nginx下https配置
nginx下https配置如下:
server {
listen 443;
server_name www.XXXX.comXXXX.com m.XXXXr.com;
client_max_body_size 30M;
ssl_certificate /usr/local/nginx/conf/www.XXXX.com.pem;
ssl_certificate_key /usr/local/nginx/conf/www.XXXX.com.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
#ssl_ciphers HIGH:!aNULL:!MD5;
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;
root /mnt/soft/tomcat8/webapps/XXXX/;
location / {
proxy_pass http://120.76.BB.AAA:8080/XXXX/;
index login.do;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
add_header Content-Security-Policy upgrade-insecure-requests;
}
}
想了解更多?現(xiàn)在就開始免費體驗