如何更新SSL(HTTPS)证书

By admin, 18 八月, 2017

1. 首先翻墙(不翻墙也可以访问,但好像下一步会卡住)访问https://www.sslforfree.com/,填入域名

sslforfree截图1

2. 选择Manual Verification认证方式,选择之后下面还有个按钮Manual Verification的按钮要点击。

sslforfree截图2

3. 下载认证文件,上传到服务器指定位置(通常地,web的根目录在/var/www/html)。不能用wget直接在服务器上下载该文件,因为链接需要浏览器当前的session信息。

sslforfree截图3

4. 点击“Download SSL Certificate"

这是会收到一个sslforfree.zip压缩包,里面包含3个文件:

  • ca_bundle.crt
  • certificate.crt
  • private.key

对于Apache服务器,会有以下3行配置(在/etc/httpd/conf.d/ssl.conf)对应这3个文件:

  • SSLCertificateFile /etc/ssl/100week/certificate.crt

  • SSLCertificateKeyFile /etc/ssl/100week/private.key

  • SSLCACertificateFile /etc/ssl/100week/ca_bundle.crt

5. 把sslforfree.zip改名成sslforfree-<下载日期>.zip后上传到服务器/etc/ssl/100week(这个目录根据服务器配置而变),然后解压覆盖原有文件。

6. 重启Web服务:`service httpd restart`。至此,SSL(HTTPS)证书更新完成,重新访问网站可以看到新的有效证书。

sslforfree截图4

评论

Restricted HTML

  • 允许的HTML标签:<a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <img src>
  • 自动断行和分段。
  • 网页和电子邮件地址自动转换为链接。
验证码
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
请输入"Drupal10"