upstream krdsh_git { server 127.0.0.1:3000; } proxy_cache_path /var/cache/angie/proxy/krdsh-git keys_zone=krdsh_cache_git:10m levels=1:2 inactive=1h; server { server_name git.krd.sh; include snip.d/listen-http; access_log off; log_not_found off; root /var/www/empty; include snip.d/https-alt-svc; include snip.d/http-security-headers; keepalive_timeout 0; include snip.d/empty-favicon; location / { return 301 https://$host$uri$is_args$args; } } server { server_name git.krd.sh; include snip.d/listen-https; include snip.d/ssl-krd.sh; access_log off; log_not_found off; root /var/www/empty; include snip.d/http-security-headers; include snip.d/proxy-common-headers; include snip.d/proxy-accept-encoding; include snip.d/proxy-connection-keepalive; include snip.d/proxy-early-data; proxy_redirect ~*^http://$host(?:|:[0-9]+)/(.*)$ https://$host/$1; location / { proxy_pass http://krdsh_git; ## quirks client_max_body_size 512M; } location @precache { proxy_pass http://krdsh_git; proxy_cache krdsh_cache_git; proxy_cache_key $uri; expires 2h; proxy_cache_valid 200 4h; proxy_cache_valid 10s; proxy_ignore_client_abort on; proxy_ignore_headers Cache-Control Expires; proxy_hide_header Cache-Control; proxy_hide_header Expires; ## quirks proxy_method GET; proxy_temp_file_write_size 4m; } location /assets/ { try_files /.non-existent-uri @precache; } }