updated webserver guide to debian buster

This commit is contained in:
Lídia Pereira 2020-05-08 11:05:43 +02:00
parent 7729130884
commit b0aacfd8da

View File

@ -39,7 +39,7 @@ So in essence the web is a network of webservers which runs on top of the intern
- Have an available power socket next to your router.
- An ethernet cable to connect your server to the router.
The instructions on this guide were run on a Debian Stretch distribution.
This guide assumes Debian stable (Buster) running on the server.
## Installing Apache
@ -185,18 +185,13 @@ As part of its bigger goal to "encrypt the entire Internet", the [Electronic Fro
Let's get down to it! Again, these instructions are specific to Debian 9 (Stretch), but detailed instructions for installation on other distributions can be found on [Certbot's website](https://certbot.eff.org/instructions)
First, add backports to your packages list and update it:
First, let's install Certbot:
```bash
$ echo deb http://deb.debian.org/debian stretch-backports main | sudo tee -a /etc/apt/sources.list && sudo apt update
$ sudo apt-get install certbot python-certbot-apache
```
Now, install Certbot:
```bash
$ sudo apt install certbot python-certbot-apache -t stretch-backports
```
Run Certbot to get the right certificates for your domain:
Now, run Certbot to get the right certificates for your domain:
```bash
$ sudo certbot certonly -d myserver.org
@ -268,19 +263,13 @@ $ sudo a2enmod ssl
### Certificate renewal
Your certificates expire after a period of time. You can, however, automate renewal by adding a [cron job](https://www.ostechnix.com/a-beginners-guide-to-cron-jobs/) that schedules when the specific renewal command should be run.
Your certificates expire after a period of time. However, the Certbot packages on your system should come with a [cron job](https://www.ostechnix.com/a-beginners-guide-to-cron-jobs/) or a [systemd timer](https://wiki.archlinux.org/index.php/Systemd/Timers) that automatically renews them before they expire. This will be installed in one of the following locations:
Start by running:
```bash
sudo crontab -e
```
* /etc/crontab/
Add the following:
```bash
55 5 * * 5 /usr/bin/certbot renew
```
* /etc/cron.*/*
This means the certificates will be renewed every week on Friday at 05:55. You can of course edit these times according to your preferences!
* systemctl list-timers
Save your changes and exit the editor.
Time to restart Apache and load all of these changes!