forked from kubeagi/ops-console
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.conf
29 lines (25 loc) · 820 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
server {
listen 80 default_server;
listen [::]:80 default_server;
root /usr/share/nginx/static;
index index.html index.htm;
location / {
# 启用 gzip 压缩
gzip on;
gzip_min_length 1k;
gzip_buffers 4 16k;
gzip_http_version 1.1;
gzip_comp_level 6;
gzip_types text/plain image/svg+xml application/javascript application/x-javascript text/css text/javascript image/jpeg image/gif image/png;
gzip_vary on;
# 开启缓存
expires max;
add_header Cache-Control "public, max-age=31536000, immutable";
try_files $uri /kubeagi-portal-public/index.html;
}
location ~* \.(html)$ {
# 禁用 HTML 文件的缓存
expires off;
add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0";
}
}