server {
listen 443; // https 默認的,http默認爲80
server_name 域名;
ssl on;
ssl_certificate cert/214112721760699.pem; // 證書文件的存放位置
ssl_certificate_key cert/214112721760699.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://127.0.0.1:8080/; // 反向代理,轉發到某個地址上
}
}