Let's Encrypt on Uberspace

# create config
$ uberspace-letsencrypt
# update config (eg new domain)
$ vim /home/{USER}/.config/letsencrypt/cli.ini
# generate certificate 
$ letsencrypt certonly 
# import certificate
$ uberspace-add-certificate -k ~/.config/letsencrypt/live/{DOMAIN_NAME}/privkey.pem -c ~/.config/letsencrypt/live/{DOMAIN_NAME}/cert.pem
# list
$ uberspace-list-certificates
# delete certificate per common name
$ uberspace-del-certificate -c common-name

see https://wiki.uberspace.de/webserver:https#let_s-encrypt-zertifikate

Redirect HTTP to HTTPS


RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteCond %{ENV:HTTPS} !=on
RewriteRule (.*) https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]

see: https://wiki.uberspace.de/webserver:security#https_erzwingen


If using a wildcard DNS record:

RewriteRule (.*) https://maindomain.com/$1 [R=301,L]
``` to redirect all non-existing subdomains to the main website.    
Show Comments