fix for davical /server url path
This commit is contained in:
@@ -27,6 +27,14 @@ spec:
|
||||
if [ ! -f /mnt/config-pvc/davical.php ]; then
|
||||
cp -r /config/. /mnt/config-pvc/
|
||||
fi
|
||||
# Apache's SCRIPT_NAME (and DAViCal's base_url derived from it)
|
||||
# only reflects the /server prefix if Apache itself resolves
|
||||
# that prefix - Traefik forwards the path unstripped. Add an
|
||||
# Alias so /server/* maps to the app root; idempotent so it
|
||||
# self-heals if apache.conf predates this fix.
|
||||
if ! grep -q '^\s*Alias /server ' /mnt/config-pvc/apache.conf; then
|
||||
sed -i '/^\s*DocumentRoot \/usr\/share\/davical\/htdocs/a\ Alias /server /usr/share/davical/htdocs' /mnt/config-pvc/apache.conf
|
||||
fi
|
||||
containers:
|
||||
app:
|
||||
image:
|
||||
@@ -78,8 +86,10 @@ spec:
|
||||
# requests/owns the Certificate for c.aggtaa.com -> radicale-tls.
|
||||
# A second Ingress with the annotation would create a competing
|
||||
# Certificate for the same host/secret.
|
||||
annotations:
|
||||
traefik.ingress.kubernetes.io/router.middlewares: pim-davical-stripprefix@kubernetescrd
|
||||
#
|
||||
# No stripPrefix middleware either: Apache needs to see the /server
|
||||
# prefix itself (via the Alias added in the seed-config initContainer)
|
||||
# so that DAViCal's self-referential links come out correct.
|
||||
hosts:
|
||||
- host: c.aggtaa.com
|
||||
paths:
|
||||
|
||||
Reference in New Issue
Block a user