Login Image only for one Web Port

Nextcloud version: 12.0.0
Operating system and version: up-to-date Ubuntu 16.04 LTS
Apache Webserver

I’m running Nextcloud in a NAT-configuration behind a firewall.
My internet-IP-address is translated to my private IP-address of the apache webserver, always port 443 (https). To customize the login, I’ve uploaded an image. All is working fine.

Then I’ve configured my firewall to translate an additional port like 8443 to the real port 443 of the apache webserver. All is still working fine.

All except one small part: The login background picture is only available for one port. When I connect over port 8443 and configure the image then it is gone for the connection over port 443 and vice versa.

How can I configure it for connections over both ports?
Any idea?

Thanks a lot

I wouldn’t use two different ports for local and remote access. Problem is that with port 8443, it is not the default port, so you must specify it in the URL. If it is just port 8443 that is redirected to port 443, you could probably use the overwrite-host settings:

but then the direct local access won’t work. If you can use port 443 everywhere, I wouldn’t change it. From external access, many wireless networks in hotels etc. only allow default http/https ports.