How to Set Up an SSL Certificate in Localhost for XAMPP

preview_player
Показать описание
Learn how to set up a self-signed SSL certificate on localhost using XAMPP, Apache, and OpenSSL.

The self-signed certificate is meant to be used only in the local development environment and NOT in Production.

🌿 Resources:

📧 Sign up for my newsletter to get ZERO COST content right at your fingertips

💫 Table of Content 💫
00:00 - Intro
00:25 - Prerequisite: Set up a Custom Domain
00:48 - Ports 80 & 443
01:46 - Set up & install the SSL certificate
06:07 - Configure Apache
10:06 - Redirect HTTP to HTTPS
12:09 - Thank you 💜

🔗 You can also find me on 🔗

#xampp #ssl #windows
Рекомендации по теме
Комментарии
Автор

You just helped me solve a problem I was dealing with for a week. Thank you so much worked perfectly!

yasha
Автор

Great tutorial. I subscribed as your expertise is vastly superior. I wish you the very best.

MerkMorassi
Автор

Thank you very much!
I tried several solutions, but that was the only one that worked.

nebelkatze
Автор

Thank you so much man you're a life saver

StannisWMahon
Автор

great work @neutron thanks bro, please i have one question I applied it to the same computer and it works fine, but when I try to access my local site from another device local, HTTPS it doesn't work. Why please help me ?

tarekdhl
Автор

not work for me

bat file listen this error

The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
Could Not Find C:\Windows\system32\.rnd
Could Not Find
Could Not Find
The system cannot find the file specified.
The system cannot find the file specified.


Das Zertifikat wurde erstellt.
The certificate was provided.

Press any key to continue . . .

eduard
Автор

thanks, its very usefully video, i have small issue, i installed the certificate in windows server and its work successfully from inside the server, but when i open the website from outside I got (the website is not secure) error and red color on https protocol on URL, but the website is work fine

hozayfamustafa
Автор

I got an issue
issue: apache shutdown unexpectedly. This may be due to a blocked port, missing dependencies, improper privileges, a crash, or a shutdown by another method. Press the Logs button to view error logs and check the Windows Event Viewer for more clues If you need more help, copy and post this entire log window on the forums.

DheerajKumar-rrik
Автор

do you have a tutorial in which you install a valid certificate outside localhost?

techinsleep
Автор

Enter PEM pass phrase:
what is that? you did not show what you wrote

tarekhassan
Автор

Hi bro is this work through lan server? I use Laravel also..😊😊

SteveMorillo-hung
Автор

Though there are good bits of the video I got very confused as the code did not work for me, and this is not helped by the infinite way that other sites have different openssl code to generate the certs, and the variety of unexplained options. When I ran it privkey was not there. I noticed this key is deleted at the end of the script also. However I confirmed that the file is generated by running the 1st line below and the code below worked. The -nodes is required to stop it forcing a Passphrase. On open -genrsa removal of -des3 creates it where no passphrase is necessary.

Modified code run in an empty directory to move the files later:
openssl req -new -nodes -out server_req_privatekey.csr
openssl rsa -in privkey.pem -out server_priv_key.pem
openssl x509 -in server_req_privatekey.csr -out server_signed.crt -req -signkey server_priv_key.pem -days 3650

Other code:

openssl req -x509 -nodes -newkey rsa:4096 -days 3650 -keyout ca-priv_key.pem -out ca_pub_key.pem
openssl req -nodes -newkey rsa:4096 -days 3650 -keyout server_priv_key.pem -out server_pub_req.csr
openssl x509 -req -in server_pub_req.csr -CA ca-pub_key.pem -CAkey ca-priv_key.pem -days 3650 -Cacreateserial -out server_signed_cert.crt

Code 3:
openssl genrsa -out server_priv_key.pem 4096
openssl req -new -key server_priv_key.pem -sha256 -out server_req.csr
openssl x5099 -req -days 350 -in server_req.csr -signkey server_priv_key.pem -sha256 -out server_signed.crt
(modify 1st for passphrase openssl genrsa -des3 -out server_priv_key.pem 4096)

When asked Copilot things about this code:
That’s a good question. The reason why there is no -key option in the first command is that it generates a new private key along with the CSR, and saves it in the same file as the CSR1. This is the default behavior of openssl req -new when no -key option is specified2.

However, this is not recommended, because it means that the private key is not separated from the CSR, and may be exposed to others when the CSR is submitted to the CA. It also makes it harder to reuse the same private key for other purposes3.

tarunarya