个人用户,可以选择免费的DV证书。
StartSSL的免费DV证书:有效期一年,可以续,也就是永久免费。
申请步骤:
1、https://startssl.com 注册,邮箱接收验证码,生成客户端证书,下载双击导入证书到浏览器。
2、重启浏览器,登录startssl.com,进入控制台,选择申请免费证书,验证域名网站所有权;
3、最多填入5个网站域名,比如:domain.com www.domain.com api.domain.com admin.domain.com 这样4个;
4、openssl req -newkey rsa:2048 -keyout domain.com.key -out domain.com.csr 命令,输入密码,生成 csr、key文件;
5、将csr文件内容粘帖到startssl框框里, submit your Certificate Signing Request (CSR)。
6、成功后显示:Your certificate is issued, please click here to download the certificate, the intermediate certificate and the root CA certificate.
And you can retrieve your issued certificate at “Tool Box” – “Certificate List” at any time if you need。
Nginx配置SSL步骤:
1、用前面第4步骤生成的key文件,生成nginx的ssl_certificate_key文件:
cp domain.com.key domain.com.key.org
openssl rsa -in domain.com.key.org -out domain.com.org.key

本文介绍了如何申请StartSSL的免费DV证书并配置Nginx以使用HTTPS访问,同时实现HTTP到HTTPS的强制跳转。详细步骤包括在StartSSL注册、验证域名所有权、生成CSR和Key文件,以及Nginx的SSL配置和子域名的正确跳转设置。
最低0.47元/天 解锁文章
1万+

被折叠的 条评论
为什么被折叠?



