Peachgram Docs
StartMaster serverGame serverClientOperations

Caddy and HTTPS

Publish the master server and this documentation behind Caddy

Caddy terminates TLS, obtains certificates automatically, and forwards traffic to the application or serves static files.

Layout

  • The main domain proxies to the application container.
  • Static sites, such as this documentation, are served from /var/www.

Safe changes

  1. Copy /etc/caddy/Caddyfile to a dated backup.
  2. Edit the file.
  3. Run caddy validate --config /etc/caddy/Caddyfile.
  4. Reload with systemctl reload caddy.
text
docs.example.org {
    root * /var/www/docs
    encode gzip
    try_files {path} {path}.html
    file_server
}

Always validate before reloading. A broken file takes every site on the server offline.

On this page