-
Notifications
You must be signed in to change notification settings - Fork 1
/
default.conf
54 lines (39 loc) · 1.35 KB
/
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
47
48
49
50
51
52
53
54
# events {
# worker_connections 1024;
# }
server {
listen 8080;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
include /etc/nginx/mime.types;
gzip on;
gzip_min_length 1000;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css application/json application/javascript application/x-javascript text/xml application/xml application/xml rss text/javascript;
location ~* \.(?:manifest|appcache|html?|xml|json)$ {
expires off;
etag off;
access_log off;
add_header Cache-Control "max-age=86400, public, must-revalidate";
}
location ~* \.(?:css|js)$ {
try_files $uri =404;
expires off;
etag off;
access_log off;
add_header Cache-Control "max-age=86400, public, must-revalidate";
}
# Any route containing a file extension (e.g. /devicesfile.js)
location ~ ^. \.. $ {
try_files $uri =404;
}
# Any route that doesn't have a file extension (e.g. /devices)
location / {
try_files $uri $uri/ /index.html;
}
# include /etc/nginx/extra-conf.d/*.conf;
}
# sudo docker cp client-cloudnc-website-1:/etc/nginx/conf.d/default.conf ~/default.conf
# sudo docker cp ~/default.conf client-cloudnc-website-1:/etc/nginx/conf.d/default.conf
# sudo docker exec client-cloudnc-website-1 nginx -t