Technology · 2016 年 6 月 18 日 0

在 Windows Apache 上使用 Let’s Encrypt SSL 证书

1

 

打开 https://zerossl.com/free-ssl/#crt

填写邮箱,域名,一直Next。

2

 

接下来验证域名:用rewrite写到他给出的访问地址。

3

 

最后的到两个证书,一个根证书,一个域名证书,复制下来,分别保存为 domain.crt 和 domain.key。

打开Apache的SSL模块,配置Httpd.cnf 引入一个新的配置文件,以下作参考。

 

Listen 443
<VirtualHost *:443>
ServerName n0elle.cn:443
ServerAlias www.n0elle.cn
DocumentRoot “X:\Website\n0elle.cn”

SSLEngine on
SSLCertificateFile “X:/Website/n0elle.cn/sslcerts/domain.crt”
SSLCertificateKeyFile “X:/Website/n0elle.cn/sslcerts/domain.key”
<Directory “X:\Website\n0elle.cn”>

Options FollowSymLinks ExecCGI
AllowOverride All
Order allow,deny
Allow from all
Require all granted

</Directory>
</VirtualHost>

 

详细的Apache SSL 配置见 ——  “windows Apache 配置支持HTTPS的SSL证书”