server {
    server_name tormob.duckdns.org;

    index index.html;
    include acme;
    location / {
#        proxy_pass http://11.101.0.3:8090/;
        proxy_pass http://11.200.0.2:8090/;
        proxy_set_header Host $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;

        add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";
        client_max_body_size 0;

    }

    location /.well-known/carddav {
      return 301 $scheme://$host/remote.php/dav;
    }

    location /.well-known/caldav {
      return 301 $scheme://$host/remote.php/dav;
    }

#    listen [::]:443 ssl http2; # managed by Certbot
    listen 7443 ssl; 
    #http2 on; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/pycm1k/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/pycm1k/privkey.pem; # managed by Certbot
    ssl_trusted_certificate /etc/letsencrypt/live/pycm1k/chain.pem;
}

server {
    if ($host = tormob.duckdns.org) {
        return 301 https://$host$request_uri;
    } # managed by Certbot

        listen 80;
#        listen [::]:80;

        server_name tormob.duckdns.org;
    return 404; # managed by Certbot
}
