Pārlūkot izejas kodu

update nginx default

郭超 4 gadi atpakaļ
vecāks
revīzija
ad21bd035a

+ 1 - 2
.idea/workspace.xml

@@ -3,7 +3,6 @@
   <component name="ChangeListManager">
     <list default="true" id="41dc853c-f418-44c7-ba5d-2164f3f0373a" name="Default" comment="">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/business/.env" beforeDir="false" afterPath="$PROJECT_DIR$/business/.env" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/business/docker-compose-multi.yml" beforeDir="false" afterPath="$PROJECT_DIR$/business/docker-compose-multi.yml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/business/nginx/sites-enabled/default" beforeDir="false" afterPath="$PROJECT_DIR$/business/nginx/sites-enabled/default" afterDir="false" />
     </list>
@@ -187,7 +186,7 @@
       <workItem from="1610264520879" duration="862000" />
       <workItem from="1610343907658" duration="548000" />
       <workItem from="1618465186243" duration="1756000" />
-      <workItem from="1622184011904" duration="12031000" />
+      <workItem from="1622184011904" duration="13098000" />
     </task>
     <servers />
   </component>

+ 1 - 2
business/docker-compose-multi.yml

@@ -34,11 +34,10 @@ services:
     depends_on:
       - crowd_service_backend
     ports:
-      - 81:81
+      - 81:80
     volumes:
       - ${FILE_STORE_BASE_PATH}/${FRONTEND_STORE_DIR}:/var/www
       - ${FILE_STORE_BASE_PATH}/nginx:/etc/nginx
-      - ${FILE_STORE_BASE_PATH}/${FRONTEND_STATIC_FILE}:/usr/share/nginx/html
   # 报告融合前后端
   crowd_service_review:
     restart: always

+ 54 - 26
business/nginx/sites-enabled/default

@@ -1,25 +1,23 @@
 server {
-        listen       81;
-        server_name  192.168.31.157; #改成对应的HOST
-        root /usr/share/nginx/html;
-        #charset koi8-r;
-        client_max_body_size 100m;
-        #access_log  logs/host.access.log  main;
-
-        # 开启代理缓冲区
-        proxy_buffering on;
-        # 响应头的缓冲区
-        proxy_buffer_size 128k;
-        # 网页内容缓冲区的个数为4,单个大小为1M
-        proxy_buffers 8 1M;
-        proxy_busy_buffers_size 2M;
 
-        location / {
-            root /usr/share/nginx/html;
-        }
+    	listen		80;
+    	server_name	192.168.31.157; #改成对应的HOST
+
+    	location /Bug {
+			proxy_pass http://crowd-service-backend-api;
+    	}
+
+       	location  ^~ /dashboard/ {
+       			proxy_pass http://192.168.31.157:6666;
+			#return 404;
+       	}
 
-        location /Bug/api {
-            proxy_pass http://crowd-service-backend-api;
+       	location ^~ /static/ {
+       	    proxy_pass http://192.168.31.157:6666;
+       	}
+
+       	location /QC {
+       	    proxy_pass http://127.0.0.1:8080;
         }
 
         location /var {
@@ -27,12 +25,42 @@ server {
             index  index.html index.htm;
         }
 
-        #error_page  404              /404.html;
+        # location  ^~ /document/ {
+        #     alias /back_end/document/;  # 文件存放目录,注意要以 '/' 结尾;
+        #     index index.html;           # 如果文件存放目录有 index.html,会跳转到 index.html;
+        #     autoindex on;               # 自动列出目录下的文件;
+        #     autoindex_exact_size off;   # 文件大小按 G、M 的格式显示,而不是 Bytes;
+        # }
+
+        # location  ^~ /resourceXinchuang/ {
+        #     alias /Users/hannatao/Downloads/;  # 文件存放目录,注意要以 '/' 结尾;
+        #     index index.html;           # 如果文件存放目录有 index.html,会跳转到 index.html;
+        #     autoindex on;               # 自动列出目录下的文件;
+        #     autoindex_exact_size off;   # 文件大小按 G、M 的格式显示,而不是 Bytes;
+        # }
+
 
-        # redirect server error pages to the static page /50x.html
-        #
-        error_page   500 502 503 504  /50x.html;
-        location = /50x.html {
-            root   html;
+        location / {
+              proxy_pass http://192.168.31.157:5555;
+              #return 404;
+        }
+	}
+
+    server {
+        listen       5555;
+        server_name  192.168.31.157;
+        location / {
+            root   /usr/share/nginx/html/;
+            index  index.html;
+            try_files $uri $uri/ /index.html;
+        }
+   }
+    server {
+        listen       6666;
+        server_name  192.168.31.157;
+        location / {
+             root   /databoard/dist/;
+             index  index.html;
+             try_files $uri $uri/ /index.html;
         }
- }
+   }