
How to Install SSL Certificate on XAMPP

Admin・ 20 Agustus 2021
3 min read ・ 2907 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.
2. Type makecert as shown above.
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.
4. Verify the password or type the password again as in step 3.
5. Type like the image above. If there is a command other than the picture above, you can just ENTER.
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.
10. Open C:\xampp\apache\conf\extra\httpd-ssl.conf
11. Search for the word DocumentRoot. Then make changes as shown below.
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.
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.
Artikel Sebelumnya
Artikel Selanjutnya
Tinggalkan Komentar
Loading Comments
Artikel Terkait
- Novi HTML Visual Editor : Website Builder Keren Tanpa Coding
- Memasang Template SB Admin 2 dan Membuat Layout View di Codeigniter 4
- Cara Mudah Membuat Autocomplete Search Seperti Twitter di Laravel 8 dengan Typeahead.js
- Tutorial Membuat Fitur Favorite Seperti Instagram dengan Laravel 8 dan VueJS
- Laravel vs Codeigniter, Manakah Framework PHP yang Lebih Baik?
- Memotong String atau Text dengan Function Substr di PHP
- Membuat Dependent Dropdown di Laravel 8 dengan jQuery AJAX
- Membuat Aplikasi Video Conference Di Laravel Dengan Vonage Video API
- Membuat Social Login di Laravel 8 Dengan Socialite
- Membuat Fitur Import dan Export Data CSV di Laravel 8
Bookmark
Windows | Linux | Mac |
---|---|---|
Ctrl + D | Ctrl + D | ⌘ + D |
Follow us
Favorit See All
- Cara Mengatasi Error XAMPP: MySQL shutdown unexpectedly 23 Oktober 2021 23619 views
- Membuat REST API CRUD di Laravel 8 dengan Sanctum 18 September 2021 19563 views
- Laravel 8: REST API Authentication dengan Sanctum 17 September 2021 17096 views
- Contoh Cara Menggunakan Sweet Alert di Laravel 8 27 Agustus 2021 13289 views
- Panduan Lengkap Cara Membuat Blog dengan Laravel 8 dan Bootstrap 30 Juli 2021 11038 views