forked from sir-go/iptv-playlist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
38 lines (31 loc) · 862 Bytes
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
upstream backend-upstream {
server iptv-back:8081;
}
proxy_cache_path /tmp/cache
levels=1:2 keys_zone=my_cache:10m
max_size=1g inactive=60m use_temp_path=off;
server {
listen 80;
proxy_cache my_cache;
location /static {
root /usr/share/nginx/html;
expires modified 1h;
}
location /robots.txt {
add_header Content-Type text/plain;
return 200 'User-agent: *\nDisallow: /';
}
location ~ (.m3u|.xspf)$ {
proxy_cache_revalidate on;
proxy_cache_valid 200 1m;
proxy_cache_min_uses 3;
proxy_cache_use_stale error timeout updating
http_500 http_502 http_503 http_504;
proxy_cache_background_update on;
proxy_cache_lock on;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://backend-upstream;
}
}