server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name cloud.joshstock.in; rewrite ^/(.*)/$ /$1 permanent; # truncate forward slash error_page 404 /error-404.html; location = /error-404.html { root /var/www/html; } location / { client_max_body_size 100M; proxy_intercept_errors on; proxy_pass http://localhost:8082; proxy_set_header Host $host; proxy_set_header Connection $http_connection; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Scheme $scheme; proxy_buffering off; } location = /favicon.ico { root /var/www/html; } }