How to enable SSL on WAMPSERVER from Windows, easy and fast

INSTALL OPEN SSL
First, we install OPEN SSL on our Windows by accessing this address:
https://slproweb.com/products/Win32OpenSSL.html
Scroll down to where it says “Download Win32/Win64 OpenSSL” and download the first EXE, which will be the most current.
Run the EXE on our computer and click yes to everything until the installation is complete.
GENERATE CERTIFICATES
Now we open a Windows command console: Windows key + R
Type cmd
In the command window that appears, we type this:
openssl req -x509 -nodes -sha256 -days 3650 -subj "/CN=Local" -newkey rsa:2048 -keyout C:\wamp64\bin\apache\apache2.4.51\conf\certificados\certificado.key -out C:\wamp64\bin\apache\apache2.4.51\conf\certificados\certificado.crt
If it doesn’t work, go to the directory “C:\Program Files\OpenSSL-Win64” and run the “start.bat” file. In the command window that appears, type the command mentioned above.
The path must be where we have WAMPPSERVER installed.
Note that the “certificados” path does not exist; you have to go to that directory and create it.
httpd-ssl.conf
We have to configure this file, the path is:
C:\wamp64\bin\apache\apache2.4.51\conf\extra\httpd-ssl.conf
We look for these lines and modify them, putting our path:
SSLCertificateFile "${SRVROOT}/conf/certificados/certificado.crt" SSLCertificateKeyFile "${SRVROOT}/conf/certificados/certificado.key"
In the same file, we look for these lines and modify them, putting our path and our localhost address:
<VirtualHost _default_:443> # General setup for the virtual host DocumentRoot "C:\wamp64\www" ServerName localhost:443 ServerAdmin admin@example.com ErrorLog "${SRVROOT}/logs/error.log" TransferLog "${SRVROOT}/logs/access.log"
httpd.conf
We have to configure this file, the path is:
C:\wamp64\bin\apache\apache2.4.51\conf\httpd.conf
We have to activate these lines, simply by removing the # symbol at the beginning of each line if it has one, leaving it like this:
LoadModule ssl_module modules/mod_ssl.so Include conf/extra/httpd-ssl.conf LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
php.ini
We have to configure this file, the path is:
C:\wamp64\bin\apache\apache2.4.51\bin\php.ini
The following line must be active, meaning it does not have a ; symbol at the beginning of the line, leaving it like this:
extension=openssl
That’s it:
If you had the server off, start it and that’s it.
If you had it on, you must restart WAMPPSERVER, go to the green icon of WAMPPSERVER that appears in the Windows bar at the bottom right next to the clock, right-click and click on “Restart from zero“.
A warning about an insecure certificate may appear because it is a self-signed certificate, but at least you will be able to access from HTTPS addresses on your server.