< Nginx
本页面介绍如何创建自签名证书
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/nginx-selfsigned.key -out /etc/ssl/certs/nginx-selfsigned.crt
sudo nano /etc/nginx/snippets/self-signed.conf
add these line
ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt; ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key;
然后就可以在nginx配置文件里面添加此行了
include snippets/self-signed.conf;