Install XAMPP SSL - 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;
- Open your terminal
- Type makecert as shown above.
- 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.
- Verify the password or type the password again as in step 3.
- Type as shown above. If there is a command other than the picture above, you can just ENTER.
Enter the password again as was done in numbers 3 and 4.
Configure the file by going to C:\xampp\apache\conf\extra
Open the httpd-xampp.conf file
Open the file httpd-ssl.conf
In DocumentRoot, adjust the location of your project and in ServerName change it to your liking. The purpose of the code above, when I enter the url www.geolocation.test it will display data from the DocumentRoot or our project.
- If so, SAVE. Then restart Apache.
If our project uses the laravel framework, we usually need to include "/public" in the URL like https://geolocation.test/public. We can remove public URL in laravel by::
Move the .htaccess and index.php files to the root folder.
Open the index.php file
And, find code
$app = require_once __DIR__.'/../bootstrap/app.php';
$app = require_once __DIR__.'/bootstrap/app.php';
Now if I open it with the url https://geolocation.test it will display the default laravel display as shown below.
Thank's for your attention and don't forget to visit Bisabos.com, to get articles about web programming, web design, and others.