Browse Source

更新 'share-v2/sharesrv2-nginx/conf.d/sharesrv2-nginx.conf'

chenghongxi 4 years ago
parent
commit
17267bd568
1 changed files with 17 additions and 22 deletions
  1. 17 22
      share-v2/sharesrv2-nginx/conf.d/sharesrv2-nginx.conf

+ 17 - 22
share-v2/sharesrv2-nginx/conf.d/sharesrv2-nginx.conf

@@ -3,39 +3,34 @@ server {
     listen 443 ssl http2;
 
     #ssl on;
-    ssl_certificate     ssl/xinyueyouxi.com.pem;
+    ssl_certificate ssl/xinyueyouxi.com.pem;
     ssl_certificate_key ssl/xinyueyouxi.com.key;
     ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
     ssl_ciphers HIGH:!RC4:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!EXP:+MEDIUM;
     ssl_prefer_server_ciphers on;
     ssl_session_timeout 5m;
-    
+
     add_header Access-Control-Allow-Origin *;
-    add_header Access-Control-Allow-Headers *;
+    add_header Access-Control-Allow-Headers X-Requested-With;
     add_header Access-Control-Allow-Methods GET,POST,OPTIONS;
-    if ($request_method = 'OPTIONS') {
-        return 204;
-    }
-    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-    proxy_set_header Remote_addr $remote_addr;
-    proxy_set_header X-Real_IP $remote_addr;
-    proxy_set_header X-CROS true;  # 自定义,有做跨域的时候需要加
-    proxy_set_header Host $host; 
-    proxy_redirect off;
-    proxy_http_version 1.1;
 
     charset utf-8;
 
-    server_name share-console-debug.xinyueyouxi.com;
+    server_name api-debug.xinyueyouxi.com;
+
     location / {
-        root /usr/share/nginx/html/;
-        try_files $uri $uri/ /index.html;
-        #index index.html;
-    }
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+        proxy_set_header Remote_addr $remote_addr;
+        proxy_set_header X-Real_IP $remote_addr;
+        proxy_set_header Host $host;
 
-    location /sharebms/v2/ {
-        proxy_pass http://sharebms2-svc:9191;
-        client_max_body_size 10m;
+        proxy_redirect off;
+        proxy_http_version 1.1;
+        proxy_pass http://sharesrv2-svc-nei:6999;
     }
     
-}
+    location /favicon.ico {
+        log_not_found off;
+        access_log off;
+    }
+}