etc-configs/nginx/sites-available/debug.inv.zzls.xyz.conf

69 lines
1.6 KiB
Plaintext

limit_req_zone $binary_remote_addr zone=one:10m rate=2r/s;
upstream inv-debug {
server 127.0.0.1:40050;
}
server {
access_log /var/log/nginx/debuginv.access.log;
error_log /var/log/nginx/debuginv.error.log;
server_name debuginv.zzls.xyz;
include configs/general.conf;
include configs/robotsNone.conf;
location / {
proxy_pass http://inv-debug;
include configs/proxy.conf;
limit_rate 12000k;
# Disable buffering and cache so i don't kill my
# SSD and bandwidth usage
proxy_buffering off;
proxy_request_buffering off;
proxy_cache off;
proxy_intercept_errors on;
error_page 502 = @fallback;
}
location ~ ^/api/ {
proxy_pass http://inv-debug;
include configs/proxy.conf;
limit_rate 12000k;
# Disable buffering and cache so i don't kill my
# SSD and bandwidth usage
proxy_buffering off;
proxy_request_buffering off;
proxy_cache off;
limit_req zone=one;
}
location ~ (^/videoplayback|^/vi/|^/ggpht/|^/sb/) {
proxy_buffers 1024 16k;
proxy_set_header X-Forwarded-For "";
proxy_hide_header "alt-svc";
sendfile_max_chunk 512k;
proxy_hide_header Cache-Control;
proxy_hide_header etag;
proxy_http_version 1.1;
proxy_set_header Connection keep-alive;
proxy_max_temp_file_size 32m;
access_log /var/log/nginx/http3-ytproxy.log;
proxy_pass http://unix:/opt/http3-ytproxy/socket/http-proxy-1.sock;
add_header Cache-Control private always;
}
location @fallback {
root /etc/nginx/errors;
try_files $uri /502.html =502;
}
# QUIC
add_header Alt-Svc 'h3=":443"; ma=86400';
listen 443 ssl;
listen 443 quic;
http2 on;
include configs/ssl.conf;
}