113 lines
2.0 KiB
Plaintext
113 lines
2.0 KiB
Plaintext
upstream krdsh_ci {
|
|
server 127.0.0.1:8000;
|
|
}
|
|
upstream krdsh_ci_grpc {
|
|
server 127.0.0.1:9000;
|
|
}
|
|
|
|
proxy_cache_path
|
|
/var/cache/angie/proxy/krdsh-ci
|
|
keys_zone=krdsh_cache_ci:10m
|
|
levels=1:2 inactive=1h;
|
|
|
|
server {
|
|
server_name 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;
|
|
}
|
|
}
|
|
|
|
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://$host(?:|:[0-9]+)/(.*)$ https://$host/$1;
|
|
|
|
location /
|
|
{
|
|
proxy_pass http://krdsh_ci;
|
|
|
|
## quirks
|
|
client_max_body_size 512M;
|
|
proxy_buffering off;
|
|
}
|
|
|
|
location @precache
|
|
{
|
|
proxy_pass http://krdsh_ci;
|
|
|
|
proxy_cache krdsh_cache_ci;
|
|
|
|
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;
|
|
}
|
|
}
|
|
|
|
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://krdsh_ci_grpc;
|
|
}
|
|
}
|