server {
    server_name {redacted};
    listen 443 ssl;
    listen [::]:443 ssl;

    #SSL
    ssl_certificate /etc/letsencrypt/live/{redacted}/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/{redacted}/privkey.pem; # managed by Certbot

    # allow large file uploads
    client_max_body_size 50000M;

    # Set headers
    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;

    # enable websockets: http://nginx.org/en/docs/http/websocket.html
    proxy_http_version 1.1;
    proxy_set_header   Upgrade    $http_upgrade;
    proxy_set_header   Connection "upgrade";
    proxy_redirect     off;

    # set timeout
    proxy_read_timeout 600s;
    proxy_send_timeout 600s;
    send_timeout       600s;

    #buffering settings
    proxy_max_temp_file_size 0;

    location / {
        proxy_pass http://127.0.0.1:2283;
    }

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


    listen 80;
    server_name {redacted};

    # Redirect to HTTPS
    return 301 https://$host$request_uri;


}
