- November 25, 2020
- saptrxuy_learnit
- 0 Comments
- 2106 Views
- 2 Likes
- Python, XAMPP
Create SSL Certificate with XAMPP in Local Windows Machine
1 Introduction
2 Create SSL
3 Add domain name in hosts file
4 Create virtual host in Apache
1.Introduction▲
This document describes how to create SSL certificate in Windows Machine and deploy your local site with https.
It requires two files that you can download from
This example uses the following details:
Domain Name: training.xcelvations.new
Folder Name: F:\ClientProjects\training.xcelvations.new
Localhost IP: 127.0.0.1
Xampp folder: C:\xampp
2.Create SSL▲
2.1.Download the onf and bat files from the links▲
2.2.Put the following files in Xampp▲
Put both files in C:\xampp\apache\conf\ssl.crt folder
cert.conf
make-cert.bat
2.3.Edit conf file▲
Edit domain name in cert.conf as you need.
2.4.Run bat file▲
Run the from command prompt:
make-cert.bat
2.5.Check the newly created file▲
There will be a new folder with domain name. Inside that you will find two files:
server.crt
server.key
2.6.Install certificate▲
Go to newly created server.crt and install it by clicking it.
3.Add domain name in hosts file▲
3.1.Run the following command▲
Cd C:\Windows\System32\drivers\etc
notepad hosts
3.2.Enter the following entry▲
127.0.0.1 training.xcelvations.new
4.Create virtual host in Apache▲
4.1.Edit apache conf file▲
Modify the following file as the case may be.
- xampp\apache\conf\extra\httpd-vhosts.conf
- xampp\apache\conf\httpd.conf
4.2.Put the following code in the file.▲
Make sure to change domain name and folder etc.
ServerName training.xcelvations.new
DocumentRoot “F:/ClientProjects/training.xcelvations.new”
ErrorLog “logs/training.new-error.log”
CustomLog “logs/training.new-access.log” common
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Allow from all
Require all granted
ServerAdmin webmaster@training.xcelvations.new
DocumentRoot “F:/ClientProjects/training.xcelvations.new”
ServerName www.training.xcelvations.new
ErrorLog “logs/xcelvations-error.log”
CustomLog “logs/xcelvations-access.log” common
<Directory “F:/ClientProjects/training.xcelvations.new”>
AllowOverride All
Require all granted
Allow from All
SSLEngine on
SSLCertificateFile “C:/xampp/apache/conf/ssl.crt/training.xcelvations.new/server.crt”
SSLCertificateKeyFile “C:/xampp/apache/conf/ssl.crt/training.xcelvations.new/server.key”
4.3.Uncomment SSL module in xampp\apache\conf\httpd.conf▲
LoadModule ssl_module modules/mod_ssl.so
4.4.Restart Apache ▲
Restart apache and open the following page in browser
Leave a Comment