nginx配置 https
server {
listen 443 ssl; # 开启ssl
server_name test.ym; # 域名
ssl_certificate /etc/ssl/xxx.pem; # 指定证书的位置,绝对路径
ssl_certificate_key /etc/ssl/xxx.key; # 绝对路径
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;
#charset koi8-r;
location / {
try_files $uri $uri/ @router;
root /root/data/mhtml/;
index index.html;
add_header Cache-Control "no-cache, no-store";
}
location @router{
rewrite ^.*$ /index.html last;
}
location /api {
uwsgi_pass 127.0.0.1:9999;
include uwsgi_params;
}
}
}