As I prefer Caddy over nginx just because of easier configuration, in my opinion, and
By default, Caddy automatically obtains and renews TLS certificates for all your sites.
I replaced nginx + ACME with Caddy v2.8.4.
As an example for a simple configuration:
/etc/caddy/Caddyfile
# After changing the Caddyfile:
# caddy fmt --overwrite /etc/caddy/Caddyfile
# caddy validate --config /etc/caddy/Caddyfile
# caddy reload --config /etc/caddy/Caddyfile
# Global options:
{
# Restrict access to admin API endpoint, see
# https://caddyserver.com/docs/api
admin 127.0.0.1:2019
# HTTP server port - as we don't use port 80 we force
# 'TLS-ALPN challenge', see
# https://caddyserver.com/docs/automatic-https#http-challenge
# https://caddyserver.com/docs/automatic-https#tls-alpn-challenge
# Do not open port 80 and 85 in the firewall
http_port 85
# Use the same email address for all sites
email MAIL@YOURDOMAIN.TLD
}
(DefaultSecHeader) {
header {
Strict-Transport-Security "max-age=31536000; includeSubDomains"
Referrer-Policy "same-origin"
X-Content-Type-Options "nosniff"
X-Frame-Options "SAMEORIGIN"
X-XSS-Protection "1; mode=block"
# Disable FLoC tracking
Permissions-Policy "interest-cohort=()"
# Hide "Server" header / server information
-Server
-X-Powered-By
}
}
YOURDOMAIN.TLD, www.YOURDOMAIN.TLD {
handle_errors {
import DefaultSecHeader
}
import DefaultSecHeader
# Ensure that the server does not run out of memory
request_body {
max_size 10MB
}
handle /YOURSECRETPATH {
reverse_proxy 127.0.0.1:15000
}
handle {
root * /var/www/YOURDOMAIN.TLD/
file_server
}
}
With that I can reach and use my own WebTunnel bridge.