0
0
opnxng-deploy-playbook/templates/conf/invidious-nginx.conf.j2

40 lines
1.3 KiB
Plaintext
Raw Normal View History

2023-11-16 19:23:33 +08:00
user www-data;
events {
worker_connections 1000;
}
http {
server {
listen 3000;
listen [::]:3000;
access_log off;
location / {
resolver 127.0.0.11;
set $backend "invidious";
proxy_pass http://$backend:3000;
proxy_http_version 1.1; # to keep alive
proxy_set_header Connection ""; # to keep alive
location ~ (^/videoplayback|^/vi/|^/ggpht/|^/sb/) {
proxy_buffering on;
proxy_buffers 1024 16k;
proxy_set_header X-Forwarded-For "";
proxy_set_header CF-Connecting-IP "";
proxy_hide_header "alt-svc";
sendfile on;
sendfile_max_chunk 512k;
tcp_nopush on;
aio threads=default;
aio_write on;
directio 16m;
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 off;
proxy_pass http://unix:/opt/http3-ytproxy/http-proxy.sock;
add_header Cache-Control private always;
}
}
}
}