server { server_name git.krd.sh ci.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; } } proxy_cache_path /var/cache/angie/proxy/krdsh-git keys_zone=krdsh_git:10m levels=1:2 inactive=1h; 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://(ci|git)\.krd\.sh(?:|:[0-9]+)/(.*)$ https://$1.krd.sh/$2; location / { proxy_pass http://127.0.0.1:3000; ## quirks client_max_body_size 512M; chunked_transfer_encoding off; } location @precache { proxy_pass http://127.0.0.1:3000; proxy_cache krdsh_git; proxy_cache_key $uri; proxy_cache_valid 200 1h; proxy_cache_valid 30s; proxy_ignore_client_abort on; proxy_ignore_headers Cache-Control; proxy_hide_header Cache-Control; expires 2h; ## quirks chunked_transfer_encoding off; proxy_method GET; proxy_buffering on; proxy_temp_file_write_size 4m; } location /assets/ { try_files /.non-existent-uri @precache; # proxy_pass http://127.0.0.1:3000; } } proxy_cache_path /var/cache/angie/proxy/krdsh-ci keys_zone=krdsh_ci:10m levels=1:2 inactive=1h; server { server_name ci.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://(ci|git)\.krd\.sh(?:|:[0-9]+)/(.*)$ https://$1.krd.sh/$2; location / { proxy_pass http://127.0.0.1:8000; ## quirks chunked_transfer_encoding off; client_max_body_size 16M; proxy_buffering off; } location @precache { proxy_pass http://127.0.0.1:8000; proxy_cache krdsh_ci; proxy_cache_key $uri; proxy_cache_valid 200 1h; proxy_cache_valid 30s; proxy_ignore_client_abort on; proxy_ignore_headers Cache-Control; proxy_hide_header Cache-Control; expires 2h; ## quirks chunked_transfer_encoding off; proxy_method GET; proxy_buffering on; proxy_temp_file_write_size 4m; } location /assets/ { try_files /.non-existent-uri @precache; # proxy_pass http://127.0.0.1:8000; } } server { server_name ci.krd.sh; include snip.d/listen-grpcs; 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/grpc-accept-encoding; location / { grpc_pass grpc://127.0.0.1:9000; } }