-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathdefault.conf
46 lines (38 loc) · 997 Bytes
/
default.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
server {
listen 8080;
server_name localhost;
access_log /dev/stdout;
error_log /dev/stderr;
add_header X-Frame-Options DENY always;
location ~* \.(manifest|html|xml|json)$ {
root /app;
index index.html;
expires 1m;
}
location ~* \.(css|js|map|ttf)$ {
# cache css and js files as they have hash inside filename
root /app;
access_log off;
expires max;
}
location ~* \.(svg|png|xcf|ico)$ {
# cache css and js files as they have hash inside filename
root /app;
access_log off;
expires 7d;
}
location ~* \.(txt)$ {
# log robots.txt requests, but cache them
root /app;
expires 30d;
}
location / {
root /app;
index index.html;
try_files $uri $uri/ /index.html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}