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..02291694 100644 --- a/Containers/mastercontainer/Caddyfile +++ b/Containers/mastercontainer/Caddyfile @@ -6,17 +6,29 @@ storage file_system { root /mnt/docker-aio-config/caddy/ } + + log { + level ERROR + } } 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 tls { on_demand + issuer acme { + disable_tlsalpn_challenge + } } } 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 "$@"