-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathnginx.conf
60 lines (46 loc) · 1.16 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
#
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Huawei Inc.
#
server {
listen 3000;
# server_name .domain.com;
root /usr/share/nginx/html/;
error_log /dev/stdout info;
access_log /dev/stdout;
index index.html default.html;
location / {
try_files $uri $uri/ /index.html =404;
include /etc/nginx/mime.types;
expires -1;
}
location ~* \.(?:css|js)$ {
access_log off;
log_not_found off;
add_header Cache-Control "no-cache, public, must-revalidate, proxy-revalidate";
}
location ~* \.(?:jpg|jpeg|gif|png|ico|xml|webp)$ {
access_log off;
log_not_found off;
expires 5m;
add_header Cache-Control "public";
}
location ~* \.(?:eot|woff|woff2|ttf|svg|otf) {
access_log off;
log_not_found off;
expires 5m;
add_header Cache-Control "public";
add_header Access-Control-Allow-Origin *;
types {font/opentype otf;}
types {application/vnd.ms-fontobject eot;}
types {font/truetype ttf;}
types {application/font-woff woff;}
types {font/x-woff woff2;}
types {image/svg+xml svg svgz;}
}
location ~ /\. {
access_log off;
log_not_found off;
deny all;
}
}