Browse Source

updated webserver guide to debian buster

master
Lídia Pereira 5 years ago
parent
commit
b0aacfd8da
  1. 27
      content/fundamentals/webserver.md

27
content/fundamentals/webserver.md

@ -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:
```bash
$ echo deb http://deb.debian.org/debian stretch-backports main | sudo tee -a /etc/apt/sources.list && sudo apt update
```
Now, install Certbot:
First, let's install Certbot:
```bash
$ sudo apt install certbot python-certbot-apache -t stretch-backports
$ sudo apt-get install certbot python-certbot-apache
```
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!

Loading…
Cancel
Save