Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Mutale85/26386399f28d7d4490fc845499f0f936 to your computer and use it in GitHub Desktop.
Save Mutale85/26386399f28d7d4490fc845499f0f936 to your computer and use it in GitHub Desktop.
The commands which will be outlined below are there to help you set up HTTPS on your website hosted on an ubuntu server 20.04, you can also try on other versions, they may work, but I can't guarantee it as on the version 20.04
I must mention, that you should have have had already done the Ubuntu set up on your VPS server.
The following are the steps
1. sudo apt install certbot python3-certbot-apache
2. sudo nano /etc/apache2/sites-available/your_domain.conf
3. sudo apache2ctl configtest
4. sudo systemctl reload apache2
5. sudo ufw status
6. sudo ufw allow 'Apache Full'
7. sudo ufw delete allow 'Apache'
8. sudo certbot --apache/
/*---- Optional ---- has no effect apart from checking that the SSL certificate will renew after 90 days.
9. sudo systemctl status certbot.timer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment