Dock + Nginx configuration

Hi,
I’d like to secure my nextcloud as much as possible. I’m trying to use the nginx configuration given in Nginx configuration documentation.

My nextcloud instance runs within a docker.

So I’ve copy/paste everything in the config file given in the doc, and I’ve just added

 location / {
    proxy_pass http://127.0.0.1:8080;
  }

I guess that’s not the right way, because I get a lot of errors with the Security Check.

Where should I put my proxy_pass ?

Thanks,
Djokx