|
@@ -0,0 +1,131 @@
|
|
|
|
|
+
|
|
|
|
|
+ #### cems 油烟监控
|
|
|
|
|
+ upstream cems.file.service{
|
|
|
|
|
+ ip_hash;
|
|
|
|
|
+ server 127.0.0.1:8191;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ upstream cems.auth.service{
|
|
|
|
|
+ ip_hash;
|
|
|
|
|
+ server 127.0.0.1:8192;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ upstream cems.sys.service{
|
|
|
|
|
+ ip_hash;
|
|
|
|
|
+ server 127.0.0.1:8193;
|
|
|
|
|
+ }
|
|
|
|
|
+ upstream cems.mobile.service{
|
|
|
|
|
+ ip_hash;
|
|
|
|
|
+ server 127.0.0.1:8198;
|
|
|
|
|
+ }
|
|
|
|
|
+ server {
|
|
|
|
|
+ listen 8290;
|
|
|
|
|
+ client_max_body_size 50M;
|
|
|
|
|
+ client_body_buffer_size 2M;
|
|
|
|
|
+
|
|
|
|
|
+ location ^~/api/mobile{
|
|
|
|
|
+ proxy_pass http://cems.mobile.service/mobile;
|
|
|
|
|
+ proxy_redirect off;
|
|
|
|
|
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
|
+ proxy_set_header Host $http_host;
|
|
|
|
|
+ proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
|
+ proxy_set_header Connection Close;
|
|
|
|
|
+
|
|
|
|
|
+ add_header Access-Control-Allow-Origin *;
|
|
|
|
|
+
|
|
|
|
|
+ client_max_body_size 10m;
|
|
|
|
|
+ client_body_buffer_size 128k;
|
|
|
|
|
+ proxy_connect_timeout 120;
|
|
|
|
|
+ proxy_read_timeout 90;
|
|
|
|
|
+ proxy_send_timeout 30;
|
|
|
|
|
+ proxy_buffers 8 64k;
|
|
|
|
|
+ proxy_busy_buffers_size 64k;
|
|
|
|
|
+ proxy_temp_file_write_size 128k;
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ location ^~/api/auth{
|
|
|
|
|
+ proxy_pass http://cems.auth.service/auth;
|
|
|
|
|
+ proxy_redirect off;
|
|
|
|
|
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
|
+ proxy_set_header Host $http_host;
|
|
|
|
|
+ proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
|
+ proxy_set_header Connection Close;
|
|
|
|
|
+
|
|
|
|
|
+ add_header Access-Control-Allow-Origin *;
|
|
|
|
|
+
|
|
|
|
|
+ client_max_body_size 10m;
|
|
|
|
|
+ client_body_buffer_size 128k;
|
|
|
|
|
+ proxy_connect_timeout 120;
|
|
|
|
|
+ proxy_read_timeout 90;
|
|
|
|
|
+ proxy_send_timeout 30;
|
|
|
|
|
+ proxy_buffers 8 64k;
|
|
|
|
|
+ proxy_busy_buffers_size 64k;
|
|
|
|
|
+ proxy_temp_file_write_size 128k;
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ location ^~/api/sys{
|
|
|
|
|
+ proxy_pass http://cems.sys.service/sys;
|
|
|
|
|
+ proxy_redirect off;
|
|
|
|
|
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
|
+ proxy_set_header Host $http_host;
|
|
|
|
|
+ proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
|
+ proxy_set_header Connection Close;
|
|
|
|
|
+
|
|
|
|
|
+ add_header Access-Control-Allow-Origin *;
|
|
|
|
|
+
|
|
|
|
|
+ client_max_body_size 10m;
|
|
|
|
|
+ client_body_buffer_size 128k;
|
|
|
|
|
+ proxy_connect_timeout 120;
|
|
|
|
|
+ proxy_read_timeout 90;
|
|
|
|
|
+ proxy_send_timeout 30;
|
|
|
|
|
+ proxy_buffers 8 64k;
|
|
|
|
|
+ proxy_busy_buffers_size 64k;
|
|
|
|
|
+ proxy_temp_file_write_size 128k;
|
|
|
|
|
+ }
|
|
|
|
|
+ location ^~/api/file{
|
|
|
|
|
+ proxy_pass http://cems.file.service/file;
|
|
|
|
|
+ proxy_redirect off;
|
|
|
|
|
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
|
+ proxy_set_header Host $http_host;
|
|
|
|
|
+ proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
|
+ proxy_set_header Connection Close;
|
|
|
|
|
+
|
|
|
|
|
+ add_header Access-Control-Allow-Origin *;
|
|
|
|
|
+
|
|
|
|
|
+ client_max_body_size 50M;
|
|
|
|
|
+ client_body_buffer_size 2M;
|
|
|
|
|
+ proxy_connect_timeout 120;
|
|
|
|
|
+ proxy_read_timeout 90;
|
|
|
|
|
+ proxy_send_timeout 30;
|
|
|
|
|
+ proxy_buffers 8 64k;
|
|
|
|
|
+ proxy_busy_buffers_size 64k;
|
|
|
|
|
+ proxy_temp_file_write_size 128k;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ location /{
|
|
|
|
|
+ #root /data/fbs/fbs-ui/dist/;
|
|
|
|
|
+ # 缓存配置
|
|
|
|
|
+ # proxy_cache iwbnet;
|
|
|
|
|
+ # proxy_cache_key iwbnet;
|
|
|
|
|
+ # proxy_cache_min_uses 1;
|
|
|
|
|
+ # proxy_cache_methods HEAD GET POST;
|
|
|
|
|
+ # proxy_cache_valid 200 1d;
|
|
|
|
|
+ # # 加一个头,方便在header中观察是否命中缓存
|
|
|
|
|
+ # add_header Nginx-Cache "$upstream_cache_status";
|
|
|
|
|
+
|
|
|
|
|
+ root /www/wwwroot/fbs/fbs-ui/v3/dist/;
|
|
|
|
|
+ try_files $uri /index.html last;
|
|
|
|
|
+ index index.html;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|