-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf
36 lines (29 loc) · 837 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
server {
server_name _;
listen 80;
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 5;
gzip_buffers 32 16k;
gzip_types text/xml text/javascript text/plain text/css application/json application/javascript application/x-javascript application/xml+rss application/xml image/png image/jpeg image/svg+xml;
index index.html;
root /usr/share/nginx/html;
error_page 404 /404.html;
location / {
try_files $uri $uri/ =404;
}
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ {
expires 1M;
access_log off;
add_header Cache-Control "public, no-transform";
}
# Javascript and CSS files
location ~* \.(?:css|js)$ {
try_files $uri =404;
expires 1y;
access_log off;
add_header Cache-Control "public, no-transform";
}
}