Question: How to setup and use ssl on xampp or wampp in windows ?
Answer:
- Download this file and copy it to your apache installation folder
- Download Certificate.zip
- Unzip this and go into the folder and open cert.conf in text editor
- Replace site.local with your required name or let it as it is if you want to use this as an example
- Now run make-cert.bat it will as you the site name
- use site.local and hit enter
- it will create a folder named site.local
- Copy your folder to the apache/conf folder
- Now you have to install the certificate on local machine
- Right click the certificate file and hit install
- choose Install Certificate Button and then Local Machine, hit Next.
- Choose Place all certificats in … and hit Browse.
- Select Trusted Root Certification Authorities
- Hit ok and then next.
- Add the site in windows hosts file
C:\Windows\System32\drivers\etc\hosts
. - 127.0.0.1 site.local
- Note: You have to open the text editor as an Administrator to edits hosts.
- Now add the certificate to the httpd-ssl.conf file
SSLCertificateFile "crt/site.test/server.crt"
SSLCertificateKeyFile "crt/site.test/server.key"- Now restart your apache server.
Feel free to comment if you face any problem. Dont forget to like and share the post.