Serving the donation tool website using a secure connection (https)

The donation tool handles some sensitive information, like personal data from your donators, and more importantly, your donators are asked to use PayPal to process a payment. Even though these information are not send directly from the client to the server, some identifiers are, and, of course, the fact that your donators are using the website. It therefore makes sense to protect this information when they get transferred to your server. When you do not configure serving traffic via https, browser may also mark your website as "Not secure" when donators open it. To do so, you may want to setup to serve the donation tool website with https using a reverse proxy.

As of this guide, we will use the following components:

However, you can use whatever webserver or certificate provider you are most familiar with. You may even buy a certificate from a certificate authority of your choice.

When using nginx as a webserver and following this guide, please make sure you stop all existing and still listening webservers that listen on port 80 or 443 (or make them listen on other ports).

Setup of nginx (the reverse proxy webserver)

Setup of certbot for issuing a certificate

Certbot is a tool that interacts with Let's Encrypts ACME procotol to automatically: * Create a private key * Create a certificate request (CSR) for your domain * Let Let's Encrypt validate that you own your domain * Issue the certificate

In order to do that and to install the certificate into nginx, follow these steps:

Configure automatic certificate renewal

Certificates from Let's Encrypt expire after a short period of time, currently 90 days. This is an intended short lifetime, in order to ensure that certificates rotate often for several reasons.

Certbot will automatically install a scheduled task to renew your certificates before they expire. However, it can not know what to do in order to install the certificates correctly, after they get renewed. For that, you need to adjust the command so that it will automatically reload the configuration of nginx: