server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name git.joshstock.in; rewrite ^/(.*)/$ /$1 permanent; # truncate forward slash root /var/www/html; error_page 404 /error-404.html; rewrite_log on; location = / { proxy_pass http://localhost:8080/; } location = /favicon.ico { # the only static file we want on this domain try_files /favicon.ico =404; } location / { # restrict all other endpoints internal; } }