sh 安装Nginx SSL证书

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 安装Nginx SSL证书相关的知识,希望对你有一定的参考价值。

# First, create a full certificate file with gt_bundle_.crt and yourdomain.crt
cat gd_bundle_.crt >> yourdomain.crt

# Backup your current ssl file. Check nginx configuration to find its location:
sudo mv /etc/ssl/certs/yourdomain.crt /etc/ssl/certs/yourdomain.crt.bak

# Copy the new certificate file
sudo cp ~/path/to/yourdomain.crt /etc/ssl/certs/yourdomain.crt

# Reload nginx configuration
sudo nginx -s reload

# SSL private key file should be located in /etc/ssl/private as a .key file.
# Never share your private file!

# Now, check in your browser if the certificate is fully installed.
# In Chrome, go to Dev Tools > Security > Certificate > View certificate,
# and check expiration date.

以上是关于sh 安装Nginx SSL证书的主要内容,如果未能解决你的问题,请参考以下文章

nginx 安装ssl证书端口443可以改吗

linux nginx ssl证书怎么配置

nginx 安装 ssl 证书

为啥 ssl证书只能绑在nginx上

如何创建ssl证书 nginx

Nginx安装SSL证书