server { listen 80 default_server; listen [::]:80 default_server ipv6only=on; listen 443 ssl; listen [::]:443 ipv6only=on ssl; ssl_certificate /etc/letsencrypt/live/master.tus.io/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/master.tus.io/privkey.pem; server_name master.tus.io; # certbot will place the files required for the HTTP challenge in the # webroot under the .well-known/acme-challenge directory. Therefore we must # make this path publicly accessible. location /.well-known { root /mnt/nginx-www/; } location / { # Forward incoming requests to local tusd instance proxy_pass http://localhost:8080; # Disable request and response buffering proxy_request_buffering off; proxy_buffering off; proxy_http_version 1.1; # Add X-Forwarded-* headers proxy_set_header X-Forwarded-Host $hostname; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; client_max_body_size 0; add_header King marius; } }