I didn’t think that there will be a time where websites would be saying if you don’t have a website that is not on HTTPS server then you may not be able to use our services. So, I experienced that myself and you too will experience that at one point or the other as you go in your Web Development journey.
I thank God for the OpenSSL project that has provided us with this powerful tool to be able to achieve this task. So, without further ado, let's get started.
Any version of WampServer can be used in this setup.
Today, we are going to learn how to set up HTTPS on your localhost. Let me tell you briefly why I am recording this video. I wanted to integrate a payment gateway into my website, and I needed to test it on my localhost before going live. The company website requires that the test be done on an HTTPS website, so I started looking for guides. Most of the guides I found were not comprehensive enough, and some did not zoom for proper viewing. Then, fortunately, I came across a guide that gave me 80% of the understanding, and I decided to record this video to give you 100% understanding and clarity. So, without further ado, let's get started.
Create a private key by copying and pasting each of the lines below and clicking Enter key each time you copy and paste, when asked for pass phrase, it can be any number of characters you like, e.g., 1234:
openssl genrsa -aes256 -out private.key 2048
openssl rsa -in private.key -out private.key
Copy and search each line:
DocumentRoot "c:/wamp/www"
ServerName localhost:443
ServerAdmin admin@example.com
SSLCertificateKeyFile "c:/wamp/bin/apache/apache2.4.9/conf/ssl/private.key"
SSLCertificateFile "c:/wamp/bin/apache/apache2.4.9/conf/conf/ssl/certificate.crt"
SSLSessionCache "shmcb:c:/wamp/bin/apache/apache2.4.9/logs/ssl_scache(512000)"
CustomLog "c:/wamp/bin/apache/apache2.4.9/logs/ssl_request.log" \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" > Save the file or press Ctr+S when you are done.
If you find this post useful, help me smash the like button, comment, share with your friends, and you can also share your content on this website by registering free here. Thanks, and take care!
Check link below to download PDF of this post