Selaa lähdekoodia

更新 'default.conf'

增加架载机反向代理
yoko 8 kuukautta sitten
vanhempi
commit
4aad3566f1
1 muutettua tiedostoa jossa 77 lisäystä ja 0 poistoa
  1. 77 0
      default.conf

+ 77 - 0
default.conf

@@ -34,4 +34,81 @@ server {
     #     proxy_pass   http://api-server:8082;
     # }
 
+}
+server {
+    listen       10166;
+    server_name  backend;
+
+    #charset koi8-r;
+    access_log  /var/log/nginx/host.access.log  main;
+
+    gzip on;
+    gzip_min_length 1k;
+    gzip_buffers 4 16k;
+    gzip_comp_level 8;
+    gzip_types text/plain application/javascript application/x-javascript text/css application/json text/javascript application/x-httpd-php image/jpeg image/gif image/png;
+    gzip_vary off;
+    gzip_disable "MSIE [1-6]\.";
+
+    location / {
+        proxy_pass http://$backend;
+        proxy_set_header Host $host;
+        proxy_set_header X-Real-IP $remote_addr;
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+    }
+	upstream backend {
+         server cops.uniquecharge.cn:2526;
+    }
+}
+
+server {
+    listen       10121;
+    server_name  ftp1;
+
+    #charset koi8-r;
+    access_log  /var/log/nginx/host.access.log  main;
+
+    gzip on;
+    gzip_min_length 1k;
+    gzip_buffers 4 16k;
+    gzip_comp_level 8;
+    gzip_types text/plain application/javascript application/x-javascript text/css application/json text/javascript application/x-httpd-php image/jpeg image/gif image/png;
+    gzip_vary off;
+    gzip_disable "MSIE [1-6]\.";
+
+    location / {
+        proxy_pass http://$ftp1;
+        proxy_set_header Host $host;
+        proxy_set_header X-Real-IP $remote_addr;
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+    }
+	upstream ftp1 {
+         server cssyunwei.sinexcel.com:21;
+    }
+}
+
+server {
+    listen       10122;
+    server_name  ftp2;
+
+    #charset koi8-r;
+    access_log  /var/log/nginx/host.access.log  main;
+
+    gzip on;
+    gzip_min_length 1k;
+    gzip_buffers 4 16k;
+    gzip_comp_level 8;
+    gzip_types text/plain application/javascript application/x-javascript text/css application/json text/javascript application/x-httpd-php image/jpeg image/gif image/png;
+    gzip_vary off;
+    gzip_disable "MSIE [1-6]\.";
+
+    location / {
+        proxy_pass http://$ftp2;
+        proxy_set_header Host $host;
+        proxy_set_header X-Real-IP $remote_addr;
+        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+    }
+	upstream ftp2 {
+         server 120.78.184.165:21;
+    }
 }