Hi Imre,
The typical installation is that collabora runs a server at port 9980 and nginx runs as a reverse proxy for a virtual host (typically port 443 for SSL). If you have a GUI and a web browser (or use wget) you could try checking XXXXs://127.0.0.1:9980/hosting/discovery. Test nginx using XXXXs://myvirtualhost/hosting/discovery. You should see XML data.
(I had to change http to XXXX because the forum software thinks I am posting links.)
I can only talk about docker but maybe some of it applies for your non-docker configuration. The docker instructions usually start using 127.0.0.1. If you use this interface, the connection is only possible on the local computer, and perhaps just for IPV4. You might also try changing XXXXs://localhost:9980 to XXXXs://127.0.0.1:9980 in your nginx configuration file (assuming nginx is on the same system). This is because localhost can also be IPV6. If your non-docker server is on a separate system, you cannot use 127.0.0.1 and you might also check if name resolution is working correctly (can you ping?).
I don’t have everything working yet myself. There is also a token problem. Apparently the nginx rule “location ^~ /lool” should be changed to “location ~ ^/lool”, except that I was already using that so I must have another problem.
Another hint for people using docker is that you probably need to use an additional parameter “–add-host nextcloud.myhost.mydomain:127.0.0.1” because the docker image has an independent /etc/hosts file so when docker talks to nextcloud it knows where to find it. Actually maybe I should have used a real IP address because docker is supposed to use bridge networking unless you specify --net=host. OK, something else to try.
I hope that this helps. There are several other things I have discovered (problems with curl, certificates and other things) and I originally planned to write a much longer post. But these are not pertinent to your current problem. Corrections to anything I have said are warmly accepted.