|
|
@@ -0,0 +1,28 @@
|
|
|
+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;
|
|
|
+ }
|
|
|
+ location /api {
|
|
|
+ proxy_set_header Host $http_host;
|
|
|
+ proxy_set_header X-Real-IP $remote_addr;
|
|
|
+ proxy_set_header REMOTE-HOST $remote_addr;
|
|
|
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
+ proxy_pass http://10.130.128.3:28132;
|
|
|
+ }
|
|
|
+ error_page 500 502 503 504 403 404 405 301 /50x.html;
|
|
|
+ location = /50x.html {
|
|
|
+ root html;
|
|
|
+ }
|
|
|
+}
|