Xampp Ssl

Seegatesite – How to install openssl on xampp windows. We can easily create ssl for server website without having to spend a lot of cost to purchase the paid ssl. Openssl private features more suitable for applied on mobile apps/android by utilizing web service that is encrypted with https. In this article I only discuss how to create and utilize the openssl using xampp windows.

XAMPP is an easy to install Apache distribution containing MariaDB, PHP, and Perl. Just download and start the installer. XAMPP for Windows 7.3.27, 7.4.16 & 8.0.3. Open the file C: xampp apache conf extra httpd-ssl.conf with Notepad Add these lines and adjust the path and filenames.: SSLCertificateFile 'conf/ssl.crt/certificate.crt' SSLCertificateKeyFile 'conf/ssl.key/wwwexamplecom.key' SSLCertificateChainFile 'conf/ssl.crt/intermediate1.crt' SSLCACertificateFile 'conf/ssl.crt/root.crt'. Basic steps: Create an SSL certificate for your local domain using this: See more details in the link above Install this cert in Windows (Trusted Root Certification Authorities) See more details in the link above Add the site in Windows hosts.

Ssl

Table of Contents

  • 1 Tutorial how to install openssl on xampp server windows

What is HTTPS ?

Https often called http over tls, http over SSL or secure http, is a secure communications protocol over a computer network that is widely used on the Internet. Https using a http communication protocol that encrypted with TLS. HTTPS capable of ensuring authentication (Communicating with the correct party), privacy (data communication can not be understood by the other party) and integrity (data communication can not be modified by other parties).

HTTPS utilize public key infrastructure to create a secure connections, the infrastructure requires 3 parties

1. Server (service providers).
2. Client (service users).
3. Certificate Authority (party that validate server and client).

Public key infrastructure using symmetric encryption algorithm, this algorithm to encrypt the data with a key. The encrypted data only be decrypted with key pair. Both key was commonly referred as private key and public key. Private and public key can be exchanged, for example, the encrypted data with private key, must be decrypted with the public key. If the encrypted with the public key, the data must be decrypted with the private key.

Tutorial how to install openssl on xampp server windows

Install Xampp Server

Make sure you have xampp server. If not already, please download xampp server here. Then do the installation as usual (next next and next).

Set Path / Conf Openssl.cnf

In order to make openssl command goes well, is required to set openssl_conf with the following command. Open Command Prompt and copy the following code

set OPENSSL_CONF=C:xamppphpextrasopensslopenssl.cnf

in the example above, I did the installation of xampp server on drive C:/Xampp. If openssl_conf not be set in advance,usually appear error as shown below (error depending on the version of xampp installed).

WARNING: can’t open config file: /usr/local/ssl/openssl.cnf
Unable to load config info from /usr/local/ssl/openssl.cnf

Install Openssl on Xampp Windows

Then do openssl server installation with the following command :

openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout server.key -out server.crt

Make sure the command prompt command above is located in the folder C:xamppapachebin ( in the folder xampp/apache/bin) because the openssl.exe tool located inside in the bin folder

Fill openssl configuration with valid data such as the image above. When you are finished, will get 2 files server.key and server.crt located in the bin folder (same folder with openssl folder)

Then copy the server.key and server.crt and put on each of the folders ssl.key and ssl.crt as shown below

Xampp localhost ssl

Test localhost server with https protocol in your browser

To test the https protocol can be run properly, run the https://localhost on your favorite browser , for example I am running on mozilla firefox browser.

Xampp Ssl Localhost

Because https certificate authority that you created is not listed on the Firefox browser, the browser will detect insecure connections. You must register https certificate that you have created into your firefox browser as follows

Create Ssl Cert For Localhost

So my article about the steps how to install openssl on xampp server windows, may be useful

Xampp Ssl Certificate Localhost

Another PHP Related Post :