How to Install SSL Certificate on XAMPP
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.
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
Favorit See All
- Cara Mengatasi Error XAMPP: MySQL shutdown unexpectedly 23 Oktober 2021 66851 views
- Laravel 8: REST API Authentication dengan Sanctum 17 September 2021 32132 views
- Tutorial CRUD (Create, Read, Update & Delete) Codeigniter 4 dengan Bootstrap 14 Oktober 2021 31338 views
- Membuat REST API CRUD di Laravel 8 dengan Sanctum 18 September 2021 28486 views
- Contoh Cara Menggunakan Sweet Alert di Laravel 8 27 Agustus 2021 27761 views