Help with Custom NGINX config?

Using the Lets encrypt container for nextcloud and it’s working great, however I’m not smart enough to get it to work with mailcow, can someone see what is borked?

server {
  listen 443 ssl;
  listen [::]:443 ssl;
  server_name mail.* autodiscover.* autoconfig.*;

  #ssl on;
  #ssl_certificate MAILCOW_PATH/data/assets/ssl/cert.pem;
  #ssl_certificate_key MAILCOW_PATH/data/assets/ssl/key.pem;
  #ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  #ssl_ciphers HIGH:!aNULL:!MD5;

  include /config/nginx/ssl.conf;
  client_max_body_size 0;

  location /Microsoft-Server-ActiveSync {
    include /config/nginx/proxy.conf;
    resolver 127.0.0.11 valid=30s;


    proxy_pass http://10.1.0.222:4443/Microsoft-Server-ActiveSync;
    proxy_set_header Host $http_host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_connect_timeout 75;
    proxy_send_timeout 3650;
    proxy_read_timeout 3650;
    proxy_buffers 64 256k;
    client_body_buffer_size 512k;
    client_max_body_size 0;
  }

  location / {
      include /config/nginx/proxy.conf;
      resolver 127.0.0.11 valid=30s;

      proxy_pass http://10.1.0.222:4443/;
      proxy_set_header Host $http_host;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header X-Forwarded-Proto $scheme;
      client_max_body_size 0;
  }
}

A port like 4443 generally indicates a https port. Are you sure mailcow is running http on that port?

Nope that was https, http is 8083, is that the only thing wrong? I get ssl error in local webmail as well.

I’m guessing I’ll have to expose the letsencrypt certs from this container and point to them in the mailcow conf.