From 9a316a56a8db654453279958cf4e6a6f9c7ec7c7 Mon Sep 17 00:00:00 2001 From: Henrik Date: Fri, 10 Apr 2020 17:05:37 +0200 Subject: [PATCH] Upgrade Caddyfile config to v2 and drastically reduce size. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since Caddy v2 is in RC state, config should be updates to v2. Also config has been simplified a lot. Running example with this config: https://dns.hnrk.io/dns Cheers and happy easter 😊! --- Readme.md | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/Readme.md b/Readme.md index bf61eb8..67965e7 100644 --- a/Readme.md +++ b/Readme.md @@ -156,24 +156,12 @@ server { ``` (Credit: [Cipherli.st](https://cipherli.st/)) -### Example configuration: Caddy +### Example configuration: Caddy (v2) ```bash -https://MY_SERVER_NAME { - log / syslog "{remote} - {user} [{when}] \"{method} {scheme}://{host}{uri} {proto}\" {status} {size} \"{>Referer}\" \"{>User-Agent}\" {>X-Forwarded-For}" - errors syslog - gzip - proxy /dns-query http://[::1]:18053 { - header_upstream Host {host} - header_upstream X-Real-IP {remote} - header_upstream X-Forwarded-For {>X-Forwarded-For},{remote} - header_upstream X-Forwarded-Proto {scheme} - } - root /var/www - tls { - ciphers ECDHE-ECDSA-WITH-CHACHA20-POLY1305 ECDHE-RSA-WITH-CHACHA20-POLY1305 ECDHE-ECDSA-AES256-GCM-SHA384 ECDHE-RSA-AES256-GCM-SHA384 ECDHE-ECDSA-AES128-GCM-SHA256 ECDHE-RSA-AES128-GCM-SHA256 - curves X25519 p384 p521 - must_staple - } +my.server.name { + reverse_proxy * localhost:8053 + tls your@email.address + try_files {path} {path}/index.php /index.php?{query} } ``` ### Example configuration: Docker Compose + Traefik + Unbound (Raspberry Pi/Linux/Mac) [linux/amd64,linux/arm64,linux/arm/v7]