Monday, October 4, 2021

Configure Godaddy SSL certificate for apache in ubuntu 20.04 LTS


Step 1) Purchase a new SSL certificate.

Step 2) Generate a Certificate Signing Request (CSR) by below command in Ubuntu terminal.

$ openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr

here you will have to give some information regarding CSR.

Country Name (2 letter code) [AU]:                IN
State or Province Name (full name) [Some-State]:        Delhi
Locality Name (eg, city) []:                     New Delhi
Organization Name (eg, company) [Internet Widgits Pty Ltd]:    Tech2Towards Pvt Ltd.
Organizational Unit Name (eg, section) []:            IT
Common Name (e.g. server FQDN or YOUR name) []:            tech2towards.tech
Email Address []:                        tech2towards@yahoo.com

Note:- Press the blank enter for both option

A challenge password []:
An optional company name []:

 

Now you will get server.key and server.csr file
and copy the content of server.csr file and paste into godaddy Re-key

 

Step 3) Paste the CSR content in following image, (then click on "add changes" and click on "submit all changes")

 


 

After 10 min of Re-key process download the ssl certificate files.


 

Step 4) Upload the SSl certificate zip in server and then extract it under /etc/ssl/.

Step 5) Make a SSL virtual host 

<VirtualHost *:443>
   
    ServerName tech2towards.tech
    ServerAlias www.tech2towards.tech
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

        SSLEngine on
        SSLCertificateFile /etc/ssl/4c8d7148b829e49.crt
        SSLCertificateKeyFile /etc/2021/server.key
        SSLCertificateChainFile /etc/ssl/gd_bundle-g2-g1.crt

</VirtualHost>

Step 6) Enable ssl mode and enable new ssl virtual host.

sudo a2enmod ssl
sudo a2ensite tech2towards.tech-ssl.conf



No comments:

Post a Comment

testing