External Access trusted Domains

I have installed via Docker Nextcloud 22.1.0 on my Synology NAS.
Locally I also have access to the Nextcloud instance. However, I would like to have access to my Nextcloud via subdomain.mydomain.com as well. For this I have already adjusted the config trusted_domains array.
Unfortunately I do not have access to my https://subdomain.meinedomain.de.
I get a 502 error. In the reverse proxy Synology settings I have stored the correct path.
Can someone help me?