From d2e944f7dc0ae461497bd385ec233e1012dddabd Mon Sep 17 00:00:00 2001 From: Alan Savage <3028205+asavageiv@users.noreply.github.com> Date: Fri, 5 Sep 2025 06:18:18 -0700 Subject: [PATCH] Use a fixed port for internal WOPI requests and callbacks This fixes the issue where Caddy fails to start when APACHE_PORT was 443. Signed-off-by: Alan Savage <3028205+asavageiv@users.noreply.github.com> --- Containers/apache/Caddyfile | 2 +- php/containers.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Containers/apache/Caddyfile b/Containers/apache/Caddyfile index 9b5362b1..4b92d807 100644 --- a/Containers/apache/Caddyfile +++ b/Containers/apache/Caddyfile @@ -15,7 +15,7 @@ } https://{$ADDITIONAL_TRUSTED_DOMAIN}:443, -http://{$APACHE_HOST}:{$APACHE_PORT}, # For Collabora callback +http://{$APACHE_HOST}:23973, # For Collabora callback and WOPI requests, see containers.json {$PROTOCOL}://{$NC_DOMAIN}:{$APACHE_PORT} { header -Server header -X-Powered-By diff --git a/php/containers.json b/php/containers.json index 998adc5e..4506c09e 100644 --- a/php/containers.json +++ b/php/containers.json @@ -379,7 +379,7 @@ ], "internal_port": "9980", "environment": [ - "aliasgroup1=https://%NC_DOMAIN%:443,http://nextcloud-aio-apache:%APACHE_PORT%", + "aliasgroup1=https://%NC_DOMAIN%:443,http://nextcloud-aio-apache:23973", "extra_params=--o:ssl.enable=false --o:ssl.termination=true --o:mount_jail_tree=false --o:logging.level=warning --o:logging.level_startup=warning --o:home_mode.enable=true %COLLABORA_SECCOMP_POLICY% --o:remote_font_config.url=https://%NC_DOMAIN%/apps/richdocuments/settings/fonts.json --o:net.post_allow.host[0]=.+", "dictionaries=%COLLABORA_DICTIONARIES%", "TZ=%TIMEZONE%", @@ -389,7 +389,7 @@ "restart": "unless-stopped", "nextcloud_exec_commands": [ "echo 'Activating Collabora config...'", - "php /var/www/html/occ richdocuments:activate-config --wopi-url='http://nextcloud-aio-apache:%APACHE_PORT%' --callback-url='http://nextcloud-aio-apache:%APACHE_PORT%'" + "php /var/www/html/occ richdocuments:activate-config --wopi-url='http://nextcloud-aio-apache:23973' --callback-url='http://nextcloud-aio-apache:23973'" ], "profiles": [ "collabora"