-
Notifications
You must be signed in to change notification settings - Fork 2
/
nginx.conf
31 lines (28 loc) · 876 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
# gzip设置
gzip on;
gzip_vary on;
gzip_comp_level 6;
gzip_buffers 4 8k;
gzip_min_length 1000;
gzip_proxied any;
gzip_disable "msie6";
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
# 代理缓存
proxy_cache_path /cache levels=1:2 keys_zone=cache:10m max_size=10g inactive=60m use_temp_path=off;
open_file_cache max=204800 inactive=20s;
open_file_cache_min_uses 1;
open_file_cache_valid 30s;
tcp_nopush on;
client_max_body_size 8m;
server {
listen 8080;
server_name localhost;
index index.html index.htm;
# 入口
location / {
root /usr/share/nginx/html/dist;
}
# error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
}