How to install SSL on localhost with Xampp and Windows
The post is to instruct you how to install SSL on localhost with Xampp and Windows
Important! You need to have 2 files cert.conf and makecert.bat, please download the files here.
Put cert.conf and makecert.bat in xampp/apache/crt (Please create crt folder before that)
Open makecert.bat file and enter your information it like below images:
You can enter your domain name as you expected, in this example, we use domain name as site.local
site.local folder is generated automatically with 2 files in there (server.crt, server.key)
Open server.crt file in xampp\apache\crt\site.local and do the steps as below images:
click on Next then Finish
Edit httpd-xapp.conf in xampp\apache\conf\extra
add the scripts at the bottom of the file like below scripts:
DocumentRoot "D:/xampp/htdocs" ServerName site.local ServerAlias *.site.local DocumentRoot "D:/xampp/htdocs" ServerName site.local ServerAlias *.site.local SSLEngine On SSLCertificateFile "crt/site.local/server.crt" SSLCertificateKeyFile "crt/site.local/server.key"
Edit hosts file in C:\Windows\System32\drivers\etc
Add line site.local 127.0.0.1