[Windows] SSL/HTTPS Certificate with XAMPP
1 - v3.ext:
Create a file v3.ext in C:/xampp/apache/ and paste the following content:
2 - makecert.bat:
Edit makecert.bat in C:/xampp/apache/ following the example below:
3 - Create the Certificate:
Execute the makecert.bat.
A window with several questions will appear on the screen which you will need to answer:
With the Certificate created, you need to restart Apache so that it can execute the new certificates.
4 - Install the Certificate:
Go to C:\xampp\apache\conf\ssl.crt and open server.crt;
Click in the button Install Certificate;
Select Actual User;
Select “Place all certificates in the following repository” and click “Browse”.
In the new window that opens, select “Trusted Root Certification Authorities” and click “Ok” and then click “Next” and finally “Finish”.
To conclude, restart Apache in the XAMPP Administrative Panel, that is, stop and start it again.
If everything worked, when updating https://localhost or https://127.0.0.1 in the browser, the lock should be activated and the page loaded.
5 - Changing Apache and SSL VirtualHost Port:
To change Apache Port to 8080, go to C:\xampp\apache\conf\ and edit httpd.conf:
Find for:
Listen 80
Change to:
Listen 8080
To change the SSL VirtualHost Port to 8080, go to C:\xampp\apache\conf\extra and edit httpd-ssl.conf:
Comment this VirtualHost:
Add this VirtualHost below:
Then the SSL/HTTPS will work with Port 8080.
Restart Apache in the XAMPP Administrative Panel.
6 - Credits:
Majesty (Apache and SSL VirtualHost Port)
Last updated