-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathnginx.conf
61 lines (56 loc) · 2.01 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
log_format uwsgi_timed_combined '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" '
'$request_time $upstream_response_time $pipe';
access_log /var/log/nginx/kolibri_uwsgi.log uwsgi_timed_combined;
proxy_cache_path /var/cache/nginxcacheuwsgi levels=1:2 keys_zone=uwsgi_cache:10m max_size=1g inactive=240h use_temp_path=off;
# Map Accept-Language header to language codes
map $http_accept_language $lang {
default en;
~^es es;
~^en en;
~^ar ar;
~^bg-bg bg;
~^bn-bd bn;
~^es-es es-es;
~^es-419 la;
~^fa fa;
~^fr-fr fr;
~^gu-in gu-in;
~^hi-in hi;
~^ko ko;
~^mr mr;
~^my my;
~^nyn ny;
~^pt-br pt-br;
~^sw-tz sw-tz;
~^te te;
~^ur-pk ur-pk;
~^vi vi;
~^yo yo;
}
map $lang $error502 {
en /en/loading.html;
ar /ar/loading.html; # Arabic
bg /bg/loading.html; # Bulgarian
bn /bn/loading.html; # Bengali
es /es-es/loading.html; # Spanish
es-es /es-es/loading.html; # Spanish (Spain)
la /la/loading.html; # Spanish (Latin America)
fa /fa/loading.html; # Persian, Farsi
fr /fr/loading.html; # French
gu-in /gu-in/loading.html; # Gujarati
hi /hi/loading.html; # Hindi
ko /ko/loading.html; # Korean
mr /mr/loading.html; # Marathi
my /my/loading.html; # Burmese
ny /ny/loading.html; # Chewa
pt-br /pt-br/loading.html; # Portuguese (Brazil)
sw-tz /sw-tz/loading.html; # Swahili (Tanzania)
te /te/loading.html; # Telugu
ur-pk /ur-pk/loading.html; # Urdu (Pakistan)
vi /vi/loading.html; # Vietnamese
yo /yo/loading.html; # Yoruba
default /en/loading.html; # Untranslated
}
include /etc/kolibri/nginx.d/*.conf;