SSL Support

Having SSL on local development is not a requirement but it is good to have to match your live site https://.


SSL stands for Secure Sockets Layer, a security protocol that creates an encrypted link between a web server and a web browser.

Before we do anything else, you need to create cert folder inside C:\Xampp\apache\ and two empty files make-cert.bat and wpbp.local.conf

Note: Be sure to have the .conf extensions; otherwise, the “make” process will fail.

1. Open and update C:\Xampp\apache\cert\make-cert.bat
@echo off
set /p domain="Enter domain: "
set OPENSSL_CONF=../conf/openssl.cnf

if not exist .\%domain% mkdir .\%domain%

..\bin\openssl req -config %domain%.conf -new -sha256 -newkey rsa:2048 -nodes -keyout %domain%\server.key -x509 -days 356 -out %domain%\server.crt

echo.
echo ----
echo The certificate was provided.
echo.
pause
1. Open and update C:\Xampp\apache\cert\wpbp.local.conf

Replace the wpbp with your domain name from the file name and its contents.

[ req ]

default_bits                = 2048
default_keyfile             = server-key.pem
distinguished_name          = subject
req_extensions              = req_ext
x509_extensions             = x509_ext
string_mask                 = utf8only

[ subject ]

countryName                 = Country Name (2 letter code)
countryName_default         = US

stateOrProvinceName         = State or Province Name (full name)
stateOrProvinceName_default = New York

localityName                = Locality Name (e.g. city)
localityName_default        = New York

organizationName            = Organization Name (e.g. company) 
organizationName_default    = ACME

commonName                  = Common Name (e.g. serve FQDN or YOUR name)
commonName_default          = wpbp.local

emailAddress                = Email Address
emailAddress_default        = admin@wpbp.local

[ x509_ext ]

subjectKeyIdentifier        = hash
authorityKeyIdentifier      = keyid, issuer 

basicConstraints            = CA:FALSE
keyUsage                    = digitalSignature, keyEncipherment
subjectAltName              = @alternate_names
nsComment                   = "OpenSSL Generated Certificate"

[ req_ext ]

subjectKeyIdentifier        = hash

basicConstraints            = CA:FALSE
keyUsage                    = digitalSignature, keyEncipherment
subjectAltName              = @alternate_names
nsComment                   = "OpenSSL Generated Certificate"

[ alternate_names ]

DNS.1                       = wpbp.local
3. Run C:\Xampp\apache\cert\make-cert.bat

Once you have your files ready, it is time to complete the SSL process.

You can hit [Enter] several times and use the default values for your certificate or enter your own details.

In the end, you will have a new folder created with wpbp.local a name with two files inside, server.crt and server.key.

4. Run C:\Xampp\apache\cert\wpbp.local\server.crt

Finally, to add the SSL certificates to your local machine run server.crt and follow the steps shown in the screenshot gallery below.

6. Testing your local development environment with SSL

We are now done with the configuration.

All we have left before we start Apache and MySQL services is to create our document root wpbp.local/ folder with .logs/ inside.

C:\Xampp\htdocs\wpbp.local\.logs

Once the above is done, you can open the Xampp Control Panel, Start the Apache and MySQL services, and open the https://wpbp.local/ in your favorite browser.

Download SSL Support Files