easyink/easyink_Dashboard-master/nginx.conf

35 lines
948 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.

gzip on;
gzip_min_length 100k;
gzip_buffers 4 16k;
gzip_http_version 1.0;
gzip_comp_level 6; #压缩等级号量不多并发小的客户可以使用6号量多并发高的客户使用1
gzip_types text/plain application/x-javascript text/css application/xml text/javascript application/x-httpd-php application/javascript;
gzip_disable "MSIE [1-6]\.";
upstream api{
server 172.16.0.2:32093 weight=1 fail_timeout=2s max_fails=2;
}
server {
listen 80;
server_name 127.0.0.1;
client_max_body_size 50m;
location / {
root /app/dist;
index index.html index.htm;
}
location /api/ {
proxy_pass http://api/;
proxy_http_version 1.1;
index index.html index.htm;
}
location /profile {
proxy_pass http://api;
proxy_http_version 1.1;
proxy_connect_timeout 1;
proxy_send_timeout 30;
proxy_read_timeout 60;
proxy_buffering off;
}
}