How to Install SSL Certificate on XAMPP

How to Install SSL Certificate on XAMPP

Admin
Admin・ 20 Agustus 2021
3 min read ・ 5177 views

Install SSL XAMPP - In some cases, a developer requires the presence of an SSL certificate on his local server to build a system or program that does require an SSL certificate or the HTTPS protocol. How to install SSL or HTTPS on localhost XAMPP? Following are the steps;

1. Open CMD or Command Prompt.
install ssl di xampp
2. Type makecert as shown above.
install https di xampp
3. Enter the PEM pass phrase or enter the password. Enter a password that is easy to remember because in the next step we are asked to enter a verification password.
install ssl di xampp
4. Verify the password or type the password again as in step 3.
install ssl di xampp
5. Type like the image above. If there is a command other than the picture above, you can just ENTER.
install ssl di xampp
6. Enter the password again as was done in numbers 3 and 4.
7. Configuration file by going to C:\xampp\apache\conf\extra
8. Open httpd-xampp.conf file.
9. Add SSLRequireSSL to <Directory "C:/xampp/htdocs/xampp">, <Directory "C:/xampp/phpMyAdmin"> and <Directory "C:/xampp/webalizer">. So the httpd-xampp.conf file will look like the image below. And don't forget to SAVE.
install ssl di xampp
10. Open C:\xampp\apache\conf\extra\httpd-ssl.conf
11. Search for the word DocumentRoot. Then make changes as shown below.
enable ssl on xampp phpmyadmin
In DocumentRoot, adjust the location of your project and in ServerName change it according to your wishes. The purpose of the code above, when I enter the url www.geolocation.test it will display data from the DocumentRoot or our project.
12. Don't forget to SAVE. And then restart Apache.
 
DONE.
 
If your project uses the laravel framework, it should usually include "/public" in the URL like https://geolocation.test/public. We can omit public URLs by:
 
1. Move .htaccess and index.php file to root folder. 
2. Open index.php file
search code
require __DIR__.'/../vendor/autoload.php';
Change to
require __DIR__.'/vendor/autoload.php';
And
$app = require_once __DIR__.'/../bootstrap/app.php';
Change to
$app = require_once __DIR__.'/bootstrap/app.php';
 
3. Save.
 
Now if we open it with the url https://geolocation.test it will display the default laravel display as shown below.
install ssl di localhost
So this article is about how to install SSL or HTTPS on XAMPP. Installing SSL on XAMPP is quite complicated. If you need HTTPS or SSL protocol for your project, you can try laragon instead of XAMPP. Installing SSL on Laragon is easier than installing SSL on XAMPP.

Tinggalkan Komentar
Loading Comments