From 96f3ca25069a648c3a0fcb53276eb36190ab105a Mon Sep 17 00:00:00 2001 From: Simon L Date: Sat, 11 Feb 2023 20:49:30 +0100 Subject: [PATCH 1/3] fix and hide a few caddy warnings Signed-off-by: Simon L --- Containers/apache/Caddyfile | 4 ++++ Containers/apache/start.sh | 3 +++ Containers/mastercontainer/Caddyfile | 4 ++++ Containers/mastercontainer/start.sh | 6 ++++++ 4 files changed, 17 insertions(+) diff --git a/Containers/apache/Caddyfile b/Containers/apache/Caddyfile index 461c0389..ce195ff3 100644 --- a/Containers/apache/Caddyfile +++ b/Containers/apache/Caddyfile @@ -4,6 +4,10 @@ storage file_system { root /mnt/data/caddy } + + log { + level ERROR + } } {$PROTOCOL}://{$NC_DOMAIN}:{$APACHE_PORT} { diff --git a/Containers/apache/start.sh b/Containers/apache/start.sh index 56ff81bc..c466d907 100644 --- a/Containers/apache/start.sh +++ b/Containers/apache/start.sh @@ -45,6 +45,9 @@ else fi echo "$CADDYFILE" > /Caddyfile +# Fix the Caddyfile format +caddy fmt --overwrite /Caddyfile + # Add caddy path mkdir -p /mnt/data/caddy/ diff --git a/Containers/mastercontainer/Caddyfile b/Containers/mastercontainer/Caddyfile index 646d37e8..f068f2c3 100644 --- a/Containers/mastercontainer/Caddyfile +++ b/Containers/mastercontainer/Caddyfile @@ -6,6 +6,10 @@ storage file_system { root /mnt/docker-aio-config/caddy/ } + + log { + level ERROR + } } http://:80 { diff --git a/Containers/mastercontainer/start.sh b/Containers/mastercontainer/start.sh index 3d8ab13e..fbcf7c72 100644 --- a/Containers/mastercontainer/start.sh +++ b/Containers/mastercontainer/start.sh @@ -280,4 +280,10 @@ export TZ=UTC # Fix apache startup rm -f /var/run/apache2/httpd.pid +# Fix the Caddyfile format +caddy fmt --overwrite /Caddyfile + +# Fix caddy log +chmod 777 /root + exec "$@" From 1dc69dca297a3e0fa15cc6ec7719f1427158f3e9 Mon Sep 17 00:00:00 2001 From: Simon L Date: Sat, 11 Feb 2023 21:26:07 +0100 Subject: [PATCH 2/3] Match only host names and not ip-addresses Signed-off-by: Simon L --- Containers/mastercontainer/Caddyfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Containers/mastercontainer/Caddyfile b/Containers/mastercontainer/Caddyfile index f068f2c3..1f77faa7 100644 --- a/Containers/mastercontainer/Caddyfile +++ b/Containers/mastercontainer/Caddyfile @@ -16,7 +16,12 @@ http://:80 { redir https://{host}{uri} } -https://:8443 { +# Match only host names and not ip-addresses: +https://*.*:8443, +https://*.*.*:8443, +https://*.*.*.*:8443, +https://*.*.*.*.*:8443, +https://*.*.*.*.*.*:8443 { reverse_proxy localhost:8000 From 849c0c4c8998ce258d6604a769adaa234c4e8331 Mon Sep 17 00:00:00 2001 From: Simon L Date: Wed, 15 Feb 2023 19:36:26 +0100 Subject: [PATCH 3/3] disable the tls-alpn challenge Signed-off-by: Simon L --- Containers/mastercontainer/Caddyfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Containers/mastercontainer/Caddyfile b/Containers/mastercontainer/Caddyfile index 1f77faa7..02291694 100644 --- a/Containers/mastercontainer/Caddyfile +++ b/Containers/mastercontainer/Caddyfile @@ -27,5 +27,8 @@ https://*.*.*.*.*.*:8443 { tls { on_demand + issuer acme { + disable_tlsalpn_challenge + } } }