naive-ui/build-doc/config/nginx.conf
2020-06-03 14:14:01 +08:00

28 lines
814 B
Nginx Configuration File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

server {
listen 8010;
# 开启gzip
gzip on;
# 启用gzip压缩的最小文件小于设置值的文件将不会压缩
gzip_min_length 1k;
# gzip 压缩级别1-10数字越大压缩的越好也越占用CPU时间
gzip_comp_level 6;
# 进行压缩的文件类型。javascript有多种形式。
# 其中的值可以在 mime.types 文件中找到。
gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png;
# 是否在http header中添加Vary: Accept-Encoding建议开启
gzip_vary on;
# 禁用IE 6 gzip
gzip_disable "MSIE [1-6]\.";
location / {
root /app/dist;
index index.html;
try_files $uri $uri/ /index.html;
}
}