nginx https 配置
1、创建证书并下载(下载完成后有两个文件)
*.pem
*.key
2、将两个文件放在linux 某个目录下
3、配置nginx的conf配置文件
server{ # https 端口默认不是80,是443 listen 443; ssl on; ssl_certificate /etc/nginx/cert/*.pem; ssl_certificate_key /etc/nginx/cert/*.key; ssl_session_timeout 5m; ssl_ciphers *; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; }
nginx 其他的配置不变