# 以下部分部分是ssl证书的配置; server { listen 443 ; server_name dk.java456.com; ssl on; root html; index index.html index.htm; #为虚拟主机指定pem格式的证书文件 ssl_certificate cert/2996326_dk.java456.com.pem; #为虚拟主机指定私钥文件 ssl_certificate_key cert/2996326_dk.java456.com.key; #ssl_session_cache shared:SSL:1m; ssl_session_timeout 10m; #指定使用的ssl协议 ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE; ssl_prefer_server_ciphers on; location / { proxy_pass http://127.0.0.1:8080; index index.html index.htm; } } server { listen 80; server_name dk.java456.com; rewrite ^(.*)$ https://$host$1 permanent; }
站长微信:xiaomao0055
站长QQ:14496453