Server 2016
安装:vc2013_redist_x64.txt
再装:wampserver2.5-Apache-2.4.9-Mysql-5.6.17-php5.5.12-64b.exe
从 https://certbot.eff.org/lets-encrypt/windows-apache 下载 certbot-beta-installer-win32.exe,安装。
执行命令:certbot certonly --webroot
按提示操作,输入邮箱、域名、根目录
然后生成了证书文件: C:\Certbot\archive\[域名]
修改apache配置:
C:\wamp\bin\apache\apache2.4.9\conf\httpd.conf 文件中,
去掉 Include conf/extra/httpd-ssl.conf 前边的 #
去掉 LoadModule ssl_module modules/mod_ssl.so 前边的 #
修改 conf/extra/httpd-ssl.conf 的文件内容,把之前的全给丫删了:
Listen 443 <VirtualHost *:443> SSLEngine on SSLProtocol all -SSLv2 -SSLv3 SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5 SSLCertificateFile C:/Certbot/archive/[域名]/cert1.pem SSLCertificateKeyFile C:/Certbot/archive/[域名]/privkey1.pem SSLCertificateChainFile C:/Certbot/archive/[域名]/chain1.pem ServerName [域名] ServerAlias [域名] DocumentRoot C:/wamp/www/[路径]/ DirectoryIndex index.html index.php <Directory /> Options +Indexes +FollowSymLinks +ExecCGI AllowOverride All Order allow,deny Allow from all Require all granted </Directory> </VirtualHost>
重启apache。
好了。