Jwilder/nginx proxy untrusted domain


I know that there are several similar topics, but none of them could solve my problem.

I currently run several nextcloud instances that i want to move to docker. I have setup a reverse proxy with jwilder nginx proxy. I also seted upp a docker container with nextcloud-fpm copied from the github page and all worked perfectly.

When i set up a second nextcloud instance with docker and jwilder nginx proxy the problems started. I could install nextcloud, but after the installation i got the error message untrusted domain. The config for the second nextcloud instance is exactly like the first one. I have tried to add the ip for the docker container to the config.php and also added the option trusted proxyes but it has no effect, the error message still apperes but only for the second nextcloud instance.

I also tried to install nginx directly on my host os (debian) and proxy it to a port number, it worked perfectly. So it seems like there are som kind of conflict with docker nextcloud-fpm and jwilder nginx proxy.

So my question is if someone have a solution or and suggestions on how to solve this problem.