Https don't working

Nextcloud version (19.0.2):
Operating system and version (Docker linuxserver image):

The https is not working i have the error:


I specify that my nginx server is in a debian vm which is a router and passes all the network traffic

My nginx config

#NextCloud HTTP
server {
    if ($host = {
        return 301 https://$host$request_uri;
    } # managed by Certbot

    listen    80;
	return 301 https://$server_name$request_uri;


#NextCloud HTTPS
server {
    listen 443 ssl;
	access_log /var/log/nginx/nextcloud.access.log; 
    location / {
		include proxy_params;
        proxy_pass http://backend_nextcloud;
    ssl_certificate /etc/letsencrypt/live/; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/; # managed by Certbot