打开 NGINX 配置文件,在其中的 server { … } 段中,添加下面内容:
ssl on;
ssl_certificate /path/to/your/crt/file;
ssl_certificate_key /path/to/your/key/file;
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;
修改完之后,重启 NGINX 服务:
systemctl restart nginx