首先,因为是用windows版本没办法直接装Let’s Encrypt而SSL For Free这个网站可以让像是cpanel或是其他不好动到后台的主机套上let's Encrypt,当然,windows server也可以这样做
安装教学:使用SSL For Free获取let's encrypt证书
拿到凭证和key后,把这些凭证和key放到一个新增资料夹/conf/sslforfree/中,接着处理apache的部分,/conf/httpd.conf中修改
LoadModule ssl_module modules/mod_ssl.so
LoadModule rewrite_module modules/mod_rewrite.so
Include conf/extra/httpd-ssl.conf
这三行注释拿掉,之后修改\conf\extra\httpd-ssl.conf
<VirtualHost _default_:443> //这里别去改动
DocumentRoot "你的网站路径"
ServerName 你的网站名称:443
SSLCertificateFile "c:/Apache2/conf/sslforfree/certificate.crt"
SSLCertificateKeyFile "c:/Apache2/conf/sslforfree/private.key"
SSLCertificateChainFile "c:/Apache2/conf/sslforfree/ca_bundle.crt"
</VirtualHost>
最后要记得把server的443port打开,如果是aliyun记得把安全组的port打开
这时就可以访问https://你的域名