Nginx Internal Server Error with docker throw error 500

I,m trying to deploy a nginx application in docker. After I have installed certificates with cerbot i have this nginx.conf:

server {
  listen 80;
  server_name web.com www.web.com;
  location / {
    return 301 https://$server_name$request_uri;
  }

  location /.well-known/acme-challenge/ {
    root /var/www/certbot;
  }
}

server {
  listen 443 ssl default_server;
  server_name web.com www.web.com;
  location / {
    proxy_pass https://www.web.com;
  }

  ssl_certificate /etc/letsencrypt/live/web.com/fullchain.pem;
  ssl_certificate_key /etc/letsencrypt/live/web.com/privkey.pem;
  include /etc/letsencrypt/options-ssl-nginx.conf;
  ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
}

When I try to access to my web url the browser show 500 Internal Server Error. nginx/1.15.12

I can`t see the logs so I don’t know what I have to do.

The ssl certificate works fine becaouse the lock appear in the url bar

Source: Docker Questions