-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx-photodirs-common.conf
33 lines (33 loc) · 1.05 KB
/
nginx-photodirs-common.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
# syn:nginx
location /api {
proxy_pass http://api:3000;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location /photo {
proxy_pass http://api:3000;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
#proxy_cache STATIC;
#proxy_cache_valid 200 1d;
#proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;
}
# Serve videos directly from the cache mount
location ~ ^/video/(.+) {
root /cache/albums;
try_files /$1^transcoded.mp4 =404;
}
location / {
proxy_pass http://frontend:3000;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}