server { listen 28133 default_server; client_max_body_size 500M; location / { gzip on; gzip_min_length 1k; gzip_buffers 4 16k; gzip_http_version 1.0; gzip_comp_level 2; 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; gzip_vary on; root /usr/share/nginx/html/; # 用于配合 browserHistory 使用 try_files $uri $uri/ /index.html; index index.html index.htm; } error_page 500 502 503 504 403 404 405 301 /50x.html; location = /50x.html { root html; } }