miaofuhao 5 ay önce
ebeveyn
işleme
94a29ecb92
2 değiştirilmiş dosya ile 24 ekleme ve 4 silme
  1. 23 0
      nginx.conf
  2. 1 4
      src/views/main/main.vue

+ 23 - 0
nginx.conf

@@ -404,6 +404,29 @@ http {
404 404
                                 root   html;
405 405
                         }
406 406
         }
407
+	server {
408
+	            listen       8321;
409
+	                    server_name  localhost;
410
+	
411
+	            location / {
412
+	                    root   /home/website/hjzxall/web;
413
+	                    try_files $uri $uri/ /index.html;
414
+	                    index  index.html index.htm;
415
+	                    }
416
+	
417
+	            location /prod-api/{
418
+	                    proxy_set_header Host $http_host;
419
+	                    proxy_set_header X-Real-IP $remote_addr;
420
+	                    proxy_set_header REMOTE-HOST $remote_addr;
421
+	                    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
422
+	                    proxy_pass http://localhost:8070/;
423
+	            }
424
+	
425
+	            error_page   500 502 503 504  /50x.html;
426
+	                    location = /50x.html {
427
+	                            root   html;
428
+	                    }
429
+	    }
407 430
 	# gzip_vary on;
408 431
 	# gzip_proxied any;
409 432
 	# gzip_comp_level 6;

+ 1 - 4
src/views/main/main.vue

@@ -12,10 +12,7 @@
12 12
     <!-- 左侧菜单 -->
13 13
     <sidebar class="sidebar-container"></sidebar>
14 14
 
15
-    <div
16
-      :class="{ hasTagsView: needTagsView, sidebarHide: sidebar.hide }"
17
-      class="main-container"
18
-    >
15
+    <div :class="{ hasTagsView: needTagsView, sidebarHide: sidebar.hide }" class="main-container" >
19 16
       <div :class="{ 'fixed-header': fixedHeader }">
20 17
         <!-- 右部头部 -->
21 18
         <navbar @setLayout="setLayout" />