One: Open the httpd.conf file and remove the comment line:
Include conf/extra/httpd-ahssl.conf
LoadModule Ssl_module modules/mod_ssl.so
ServerName localhost:80
Two: Place the SSL certificate
Choose Apache
The domain name is crossed out, its CRT and key are put into and httpd.conf the SSL folder in the sibling directory, and changed to SERVER.CRT and Server.key
Two: Open httpd-ahssl.conf (in the Extra folder under the httpd.conf sibling directory), modify the following:
<virtualhost _default_:443>
Sslengine on
ServerName localhost:443 #主要修改一下这里
Sslcertificatefile "${srvroot}/conf/ssl/server. CRT"
Sslcertificatekeyfile "${srvroot}/conf/ssl/server. Key"
DocumentRoot "C:/appserv/www"
# DocumentRoot Access handled globally in httpd.conf
Customlog "${srvroot}/logs/ssl_request.log" \
"%t%h%{ssl_protocol}x%{ssl_cipher}x \"%r\ "%b"
<directory "C:/appserv/www" >
Options Indexes includes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</virtualhost>
Restart Apache
Appserv Configuring SSL Certificates