mirror of
https://github.com/nextcloud/all-in-one.git
synced 2024-12-29 18:20:49 +08:00
Merge pull request #1969 from nextcloud/enh/noid/improve-caddy
fix and hide a few caddy warnings
This commit is contained in:
commit
8a23a1cb6b
4 changed files with 26 additions and 1 deletions
|
@ -4,6 +4,10 @@
|
|||
storage file_system {
|
||||
root /mnt/data/caddy
|
||||
}
|
||||
|
||||
log {
|
||||
level ERROR
|
||||
}
|
||||
}
|
||||
|
||||
{$PROTOCOL}://{$NC_DOMAIN}:{$APACHE_PORT} {
|
||||
|
|
|
@ -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/
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 "$@"
|
||||
|
|
Loading…
Reference in a new issue