List of Commands for installing SSL certificate over google cloud platform hosted wordpress website

List of Commands for installing SSL certificate over google cloud platform hosted wordpress website

I followed tutorial over onepagezen.com, a popular and thoroughly written blogs collection for aws and gcp cloud providers, specifically wordpress part. I am becoming a huge fan of jow, as he is indicating clear cut instructions via youtube and blog both. This post is my personal note for installing SSL certificate over another pending domains of mine, that’s mediwiki.co.in and medi-wiki.com. I will also update post if I find time to explain them, else you directly find relevant page over onepagezen.com, and get things done.

Also, I would add to use notepad++ to store commands, as it requires find and replace function to change your domains instead of this template.

To understand these notes, you have to thoroughly watch tutorials and also practice them like me. It took around 1 hour or so to get through successful installation. Watch result on my very own website now, served over https. Thanks joe !

 

 

wget https://dl.eff.org/certbot-auto && chmod a+x certbot-auto

./certbot-auto certonly –webroot -w /var/www/html/ -d mediwiki.co.in -d www.mediwiki.co.in

Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/mediwiki.co.in/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/mediwiki.co.in/privkey.pem

./certbot-auto renew –dry-run

sudo crontab -e
1

0 0 * * * ./certbot-auto renew –quiet –no-self-upgrade
0 12 * * * ./certbot-auto renew –quiet –no-self-upgrade

sudo nano /etc/apache2/sites-available/default-ssl.conf

<Directory /var/www/html/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>

#s–
#s–

SSLCertificateFile “/etc/letsencrypt/live/mediwiki.co.in/cert.pem”
SSLCertificateKeyFile “/etc/letsencrypt/live/mediwiki.co.in/privkey.pem”
SSLCertificateChainFile “/etc/letsencrypt/live/mediwiki.co.in/chain.pem”

sudo nano /etc/apache2/sites-available/wordpress.conf

ServerName www.mediwiki.co.in
ServerAlias mediwiki.co.in
Redirect permanent / https://www.mediwiki.co.in/

sudo a2ensite default-ssl

sudo a2enmod ssl

sudo service apache2 restart

RENEWAL- ANOTHER TUTORIAL

wget https://dl.eff.org/certbot-auto && chmod a+x certbot-auto
ls

sudo mv certbot-auto /etc/letsencrypt/

ls /etc/letsencrypt/

sudo crontab -e
45 2 * * 6 cd /etc/letsencrypt/ && ./certbot-auto renew && /etc/init.d/apache2 restart

sudo -i
cd /etc/letsencrypt/ && ./certbot-auto renew –dry-run && /etc/init.d/apache2 restart

Loading

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.