#https配置
server {
listen 443; #https协议默认端口是443端口
server_name localhost;
ssl on;
ssl_certificate /ssl/ssl.pem; #ssl证书-.pem文件路径
ssl_certificate_key /ssl/ssl.key; #ssl证书-.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 / {
root /project/h5-mini; #项目路径
index index.html index.htm;
error_page 405 =200 http://$host$request_uri;
try_files $uri $uri/ /index.html;
}
}