- 67 Views
- 30/10/2025
How to install an SSL certificate on XAMPP for Windows
Learn how to install an SSL certificate on XAMPP for Windows, configure Apache virtual hosts, and enable HTTPS for your local or custom domain using your existing CA, CRT, and private key files
Example Apache vhost configuration (XAMPP, Windows)
If your SSL files are:
mydomain.crt (certificate)
mydomain.key (private key)
mydomain-ca-bundle.crt (CA chain / intermediate cert)
Place them in:
C:\xampp\apache\crt\
Then edit:
C:\xampp\apache\conf\extra\httpd-vhosts.conf
Add your HTTPS virtual host:
<VirtualHost *:443>
ServerName mydomain.local
DocumentRoot "C:/xampp/htdocs/myproject"
SSLEngine on
SSLCertificateFile "C:/xampp/apache/crt/mydomain.crt"
SSLCertificateKeyFile "C:/xampp/apache/crt/mydomain.key"
SSLCertificateChainFile "C:/xampp/apache/crt/mydomain-ca-bundle.crt"
<Directory "C:/xampp/htdocs/myproject">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
ServerName mydomain.local
DocumentRoot "C:/xampp/htdocs/myproject"
SSLEngine on
SSLCertificateFile "C:/xampp/apache/crt/mydomain.crt"
SSLCertificateKeyFile "C:/xampp/apache/crt/mydomain.key"
SSLCertificateChainFile "C:/xampp/apache/crt/mydomain-ca-bundle.crt"
<Directory "C:/xampp/htdocs/myproject">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
If your CA file is in .pem format, just replace the file names accordingly (Apache supports both .crt and .pem).
Thank for visit my website
