502 Bad Gateway error on nginx Load Balancer

I’m trying to configure Nextcloud to go through an nginx Load Balancer, but when accessing by hostname I get a 502 Bad Gateway error on nginx

I have 1 ubuntu 20.04 VM configured for Load balancer
and Nextcloud is installed on another VM

in the load balancer I have my file in the path /etc/nginx/sites-availables/sites.com

with the following content:

server {

     listen 60443;
     root /var/www/html;
     index index.php;
     server_name mydomain.com;

     location / {

     server_name mydomain.com;
     ssl_certificate          /etc/nginx/ssl/mydomain.com.crt;
     ssl_certificate_key /etc/nginx/ssl/mydomain.com.key;
     ssl on;
     ssl_protocols TLSv1.3;


and finally create the link for sites-enabled

Has anyone tried to configure it successfully???