Step 1: Create a folder named certs in ‘C’ folder

step 2: Open the command prompt c:\certs>

step 3: Now generate a private key using the command
C:\certs> openssl genrsa -des3 -out server.key 1024
It will ask the pass phrase key : (Simply click enter without entering the key).Now a server.key file will be generated in the folder .

step 4: Now we create csr file from the server.key we generate , for that follow the command :
C:\certs>openssl req -new -key server.key -out server.csr

Now a server.csr file will be generated .

step 5: Now create the certificate (crt) based on the csr and key using the below command :

C:\certs>openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt

we have successfully created the certificate .Now we need to specify the certificate for the ip .

In xampp->apache->conf->extra->(httpd-vhosts.conf).Paste the command in the file.

<VirtualHost *:80>
    ServerName wordpress_ecom.test
    ServerAlias wordpress_ecom.test
    DocumentRoot "C:/xampp/htdocs/wordpress_ecom"
<VirtualHost *:443>
		DocumentRoot "C:/xampp/htdocs/wordpress_ecom"
		ServerName localhost
		SSLEngine on
		SSLCertificateFile "C:/certs/server.crt"
		SSLCertificateKeyFile "C:/certs/server.key"

step 6: Goto xampp->apache->conf (httpd.conf)

check “Include conf/extra/httpd-ssl.conf” its enabled .

In the browser check https://localhost/

Thanks . . .

Related Post

Hello world!

September 29, 2018

Leave a Comment

Your email address will not be published. Required fields are marked *