Merge pull request #1969 from nextcloud/enh/noid/improve-caddy

fix and hide a few caddy warnings
This commit is contained in:
Simon L 2023-02-16 17:23:43 +01:00 committed by GitHub
commit 8a23a1cb6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 1 deletions

View file

@ -4,6 +4,10 @@
storage file_system {
root /mnt/data/caddy
}
log {
level ERROR
}
}
{$PROTOCOL}://{$NC_DOMAIN}:{$APACHE_PORT} {

View file

@ -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/

View file

@ -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
}
}
}

View file

@ -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 "$@"