Reference:
Nginx 使用的憑證格式是 .pem,所以需要把憑證轉檔。
使用 openssl 轉檔
openssl rsa -in private.key -text > private.pem
openssl x509 -inform PEM -in certificate.crt > certificate.pem
openssl x509 -inform PEM -in ca_bundle.crt > ca_bundle.pem
openssl x509 -inform PEM -in certificate.crt > certificate.pem
openssl x509 -inform PEM -in ca_bundle.crt > ca_bundle.pem
2021/9/14 update:
$ cat certificate.crt ca_bundle.crt >> certificate.crt
nginx.conf
listen 443 ssl;
ssl on;
ssl_certificate /etc/ssl/certificate.crt;
ssl_certificate_key /etc/ssl/private.key;
ssl on;
ssl_certificate /etc/ssl/certificate.crt;
ssl_certificate_key /etc/ssl/private.key;
沒有留言:
張貼留言