Adding try_file of new security issue, running in 404 every time

I want to change my nginx config, to stay secure, but if I add the line try_files fastcgi_script_name =404; I think the problem depends on different paths of nginx and nextcloud docker container. In nginx the nextcloud config is located in /var/www/html/nextcloud, and in the nextcloud container it is only /var/www/html. So files delivered by nginx have to start with nextcloud, I thought try file will be directly by nginx so I added so I changed the line to try_files /nextcloud$fastcgi_script_name =404; but same problem. Which value have to be set, to get the wanted result?