etc-configs/nginx/conf.d/twitch.zzls.xyz.conf

40 lines
767 B
Text
Raw Normal View History

2023-12-21 15:17:35 -03:00
server {
access_log /var/log/nginx/twitch.zzls.xyz.access.log;
2024-01-15 15:49:51 -03:00
error_log /var/log/nginx/twitch.zzls.xyz.error.log;
2024-01-10 01:04:45 -03:00
server_name twitch.zzls.xyz twitch.nadeko.net;
2023-12-21 16:06:15 -03:00
include configs/general.conf;
include configs/security.conf;
include configs/robotsNone.conf;
2023-12-21 15:17:35 -03:00
location / {
2024-01-15 15:49:51 -03:00
add_header Content-Type text/plain;
return 200 "Twitch Russia Proxy for TTVLOL V1";
2023-12-21 15:17:35 -03:00
}
location ~ ^/(?!$) {
2024-01-14 04:14:30 -03:00
proxy_pass http://twitchproxy;
2023-12-21 15:17:35 -03:00
include configs/proxy.conf;
}
# QUIC
2023-12-21 16:06:15 -03:00
include configs/http3.conf;
2023-12-21 15:17:35 -03:00
listen 443 ssl;
http2 on;
}
server {
2024-01-10 01:04:45 -03:00
set $x "";
2023-12-21 15:17:35 -03:00
if ($host = twitch.zzls.xyz) {
2024-01-10 01:04:45 -03:00
set $x 1;
2024-01-15 15:49:51 -03:00
}
2024-01-10 01:04:45 -03:00
if ($host = twitch.nadeko.net) {
set $x 1;
}
if ($x = 1) {
2023-12-21 15:17:35 -03:00
return 301 https://$host$request_uri;
}
listen 80;
2024-01-10 01:04:45 -03:00
server_name twitch.zzls.xyz twitch.nadeko.net;
2023-12-21 15:17:35 -03:00
}