-
-
Save airways/ae67310727ac394e5b3c12ba9f918962 to your computer and use it in GitHub Desktop.
XAMPP SSL Tutorial https://shellcreeper.com/?p=2573
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set /p domain="Enter Domain: " | |
set OPENSSL_CONF=../conf/openssl.cnf | |
if not exist .\%domain% mkdir .\%domain% | |
set dir="%cd%" | |
cd ..\php | |
..\php\extras\openssl\openssl.exe req -config %dir%\cert.conf -new -sha256 -newkey rsa:2048 -nodes -keyout %dir%\%domain%\server.key -x509 -days 365 -out %dir%\%domain%\server.crt | |
echo. | |
echo ----- | |
echo The certificate was provided. | |
echo. | |
pause |
Note: I also had to provide the full path to the files in the crt directory when creating the VirtualHost directive's SSLCertificateFile and SSLCertificateKeyFile values.
Thank you @airways, it helped :) 💯
where to put the file. my xampp in D:\xampp
This script is updated based on the article here, which gives all the other information for the process:
https://shellcreeper.com/how-to-create-valid-ssl-in-localhost-for-xampp/
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updated for current XAMPP 3.2.4 (2020/8/2) file layout.