I get 502 bad gateway

Hi, I just install webmin/virtualmin on my VPS and I have this problem.
I have three sites running in my VPS.
Site1 running a next.js app run perfectly, same the site2 running plain html, but the site3 running another next.js app give me a 502 bad gateway error.
If delete the code and put other next.js app, the site work ok, but with the data than I need dont.
Allways give me the same error.
The error.log of nginx says:

connect() failed (111: Connection refused) while connecting to upstream, client: xxx.xx.xxx.xx, server: sitio3.top, request: “GET / HTTP/1.1”, upstream: “”, host: “sitio3.top”

If anybody can help my I apretiate. I dont what do.

Ubuntu 20.04 REQUIRED