Configure Strict Transport Security

Having issues with your DietPi installation or found a bug? Post it here.
User avatar
Site Admin
Posts: 2622
Joined: Sat Nov 18, 2017 6:21 pm

Re: Configure Strict Transport Security

Post by MichaIng »

Hey there,

okay first you need to add the new domain to your certificate. You could also just create a new certificate for the new domain only, but to be more flexible, I guess keeping the old domain inside is the better solution for now:

certbot --expand -d, //Replace with the domain/IP you used, to get your first letsencrypt certificate, and with, if I got right.
Source: ... rtificates

Then set or add:
to the following Apache config files:

Hmm, I am actually not sure if this is even necessary. You could also skip this first, and see if it works :lol:.

The Nextcloud config should be actually still fine, but to be sure, check that within /var/www/nextcloud/config/config.php
you see: 'overwrite.cli.url' => 'https://localhost/nextcloud',
It is possible to set the domain here as well, but since localhost is handled as well, the solution above is the flexible one.
Post Reply