This repository has been archived on 2025-06-03. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
invidious-setup/nginx.conf
Minecon724 66a31f562c
Reintroduce nginx
And general refactoring
2025-04-30 13:36:20 +02:00

85 lines
2 KiB
Nginx Configuration File

user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
access_log /dev/null;
error_log /dev/null;
tcp_nopush on;
keepalive_timeout 65;
gzip off;
resolver 127.0.0.11;
server {
listen 80;
listen [::]:80;
# It's still not a lot, so let's keep it that way
location = / {
proxy_pass http://anubis:8923;
proxy_http_version 1.1; # to keep alive
proxy_set_header Connection ""; # to keep alive
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}
location / {
proxy_pass http://invidious:3000;
proxy_http_version 1.1; # to keep alive
proxy_set_header Connection ""; # to keep alive
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}
location /.within.website/x {
proxy_pass http://anubis:8923;
proxy_http_version 1.1; # to keep alive
proxy_set_header Connection ""; # to keep alive
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}
location /watch {
proxy_pass http://anubis:8923;
proxy_http_version 1.1; # to keep alive
proxy_set_header Connection ""; # to keep alive
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}
location /about {
return 302 "https://git.m724.eu/id.420129/about/src/branch/master/README.md";
}
location /latest_version {
return 403;
}
location /api/manifest/dash/id/ {
return 403;
}
location /videoplayback {
return 403;
}
location /api/v1/videos {
return 403;
}
}
}