wfansh 3 hónapja
szülő
commit
2e0ebc0824
2 módosított fájl, 83 hozzáadás és 40 törlés
  1. 83 40
      conf/nginx/adweb3.conf
  2. BIN
      conf/ssl/v3.sohoeb2b.com_SSL.zip

+ 83 - 40
conf/nginx/adweb3.conf

@@ -1,59 +1,102 @@
 map $http_upgrade $connection_upgrade {
-    default upgrade;
-    'websocket' upgrade;
+        default upgrade;
+        'websocket' upgrade;
 }
 
+
 server {
-    listen 80;
-    listen 443 ssl;
-    server_name v3.adwebcloud.com zhigeng.adwebcloud.com sohoeb2b.adwebcloud.com;
+        listen 80;
+        listen 443 ssl;
+        server_name v3.adwebcloud.com zhigeng.adwebcloud.com;
 
-    # 日志地址
-    access_log /var/log/nginx/access.log;
-    error_log /var/log/nginx/error.log;
+        # 日志地址
+        access_log /var/log/nginx/access.log;
+        error_log /var/log/nginx/error.log;
 
-    ssl_certificate /root/.acme.sh/v3.adwebcloud.com_ecc/fullchain.cer;
-    ssl_certificate_key /root/.acme.sh/v3.adwebcloud.com_ecc/v3.adwebcloud.com.key;
+        ssl_certificate /root/.acme.sh/v3.adwebcloud.com_ecc/fullchain.cer;
+        ssl_certificate_key /root/.acme.sh/v3.adwebcloud.com_ecc/v3.adwebcloud.com.key;
 
-    include /etc/nginx/conf.d/adweb3/*.conf;
+        include /etc/nginx/conf.d/adweb3/*.conf;
 
-    index index.html;
-    root /home/ubuntu/adweb3-web/dist; # 这里改成前端静态
-    location / {
-        try_files $uri $uri/ /index.html;
+        index index.html;
+        root /home/ubuntu/adweb3-web/dist; # 这里改成前端静态
+        location / {
+                try_files $uri $uri/ /index.html;
 
-        # 后端 API 的转发
-        location /adweb3/ {
-            proxy_set_header Upgrade $http_upgrade;
-            proxy_set_header Connection $connection_upgrade;
-            proxy_pass http://127.0.0.1:8080;
-        }
+                # 后端 API 的转发
+                location /adweb3/ {
+                        proxy_set_header Upgrade $http_upgrade;
+                        proxy_set_header Connection $connection_upgrade;
+                        proxy_pass http://127.0.0.1:8080;
+                }
 
-        location /adweb3/websocket/ {
-            proxy_pass http://127.0.0.1:8080/adweb3/websocket/;
-            proxy_http_version 1.1;
-            proxy_set_header Upgrade $http_upgrade;
-            proxy_set_header Connection "Upgrade";
-            proxy_set_header X-real-ip $remote_addr;
-            proxy_set_header X-Forwarded-For $remote_addr;
+                location /adweb3/websocket/ {
+                        proxy_pass http://127.0.0.1:8080/adweb3/websocket/;
+                        proxy_http_version 1.1;
+                        proxy_set_header Upgrade $http_upgrade;
+                        proxy_set_header Connection "Upgrade";
+                        proxy_set_header X-real-ip $remote_addr;
+                        proxy_set_header X-Forwarded-For $remote_addr;
+                }
         }
-    }
+
 }
 
+
 server {
-    listen 80;
-    server_name xxl-job.v3.adwebcloud.com;
+        listen 80;
+        listen 443 ssl;
+        server_name v3.sohoeb2b.com;
 
-    # 日志地址
-    access_log /var/log/nginx/access.log;
-    error_log /var/log/nginx/error.log;
+        # 日志地址
+        access_log /var/log/nginx/access.log;
+        error_log /var/log/nginx/error.log;
 
-    location / {
-        # 后端 API 的转发
+
+        ssl_certificate /etc/nginx/conf.d/ssl/v3.sohoeb2b.com.pem;
+        ssl_certificate_key /etc/nginx/conf.d/ssl/v3.sohoeb2b.com.key;
+
+        include /etc/nginx/conf.d/adweb3/*.conf;
+
+        index index.html;
+        root /home/ubuntu/adweb3-web/dist; # 这里改成前端静态
         location / {
-            proxy_set_header Upgrade $http_upgrade;
-            proxy_set_header Connection $connection_upgrade;
-            proxy_pass http://127.0.0.1:8090;
+                try_files $uri $uri/ /index.html;
+
+                # 后端 API 的转发
+                location /adweb3/ {
+                        proxy_set_header Upgrade $http_upgrade;
+                        proxy_set_header Connection $connection_upgrade;
+                        proxy_pass http://127.0.0.1:8080;
+                }
+
+                location /adweb3/websocket/ {
+                        proxy_pass http://127.0.0.1:8080/adweb3/websocket/;
+                        proxy_http_version 1.1;
+                        proxy_set_header Upgrade $http_upgrade;
+                        proxy_set_header Connection "Upgrade";
+                        proxy_set_header X-real-ip $remote_addr;
+                        proxy_set_header X-Forwarded-For $remote_addr;
+                }
         }
-    }
+
 }
+
+
+server {
+        listen 80;
+        server_name xxl-job.v3.adwebcloud.com;
+
+        # 日志地址
+        access_log /var/log/nginx/access.log;
+        error_log /var/log/nginx/error.log;
+
+        location / {
+                # 后端 API 的转发
+                location / {
+                        proxy_set_header Upgrade $http_upgrade;
+                        proxy_set_header Connection $connection_upgrade;
+                        proxy_pass http://127.0.0.1:8090;
+                }
+        }
+}

BIN
conf/ssl/v3.sohoeb2b.com_SSL.zip