abiao преди 1 година
родител
ревизия
59477907a4
променени са 2 файла, в които са добавени 11 реда и са изтрити 88 реда
  1. 0 86
      go/gopath/src/fohow.com/nginx/ngx_dev_config
  2. 11 2
      go/gopath/src/fohow.com/nginx/ngx_test_config

+ 0 - 86
go/gopath/src/fohow.com/nginx/ngx_dev_config

@@ -1,86 +0,0 @@
-
-#upstream rungobackend {
-#    server 127.0.0.1:28889;
-#    keepalive 128;
-#}
-
-server {
-    listen       80;
-    server_name  tfohowapi.hiwavo.com;
-    charset utf-8;
-
-    access_log  /root/sites/fohow_git/x_api/go/gopath/src/fohow.com/logs/ngx_access.log  main;
-    error_log   /root/sites/fohow_git/x_api/go/gopath/src/fohow.com/logs/ngx_error.log;
-
-    location /.well-known/pki-validation/ {
-      alias /root/sites/fohow_git/x_api/go/gopath/src/fohow.com/static/tapi/;
-    }
-
-    location =/MP_verify_WKpffc3SRB4yjEzI.txt {
-      root /root/sites/fohow_git/x_api/go/gopath/src/fohow.com/static/tapi/;
-      #expires  30d;
-    }
-
-    location =/stcXSY70Qh.txt {
-      root /root/sites/fohow_git/x_api/go/gopath/src/fohow.com/static/tapi/;
-      #expires  30d;
-    }
-
-
-   location /xj_api {
-       proxy_set_header Host $http_host;
-       proxy_set_header  X-Real-IP $remote_addr;
-       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
-       proxy_set_header X-Forwarded-Proto $scheme;
-       rewrite ^/api/(.*)$ /$1 break;  #重写
-       proxy_pass http://gva-server; # 设置代理服务器的协议和地址
-    }
-
-    location / {
-        proxy_next_upstream off;
-        proxy_set_header    X-Real-IP           $remote_addr;
-        proxy_set_header    X-Forwarded-For     $proxy_add_x_forwarded_for;
-        proxy_set_header    Host                $host;
-        proxy_http_version  1.1;
-        proxy_set_header    Connection  "";
-        proxy_pass          http://127.0.0.1:25565;
-    }
-
-   location /ngx {
-     stub_status on;
-   }
-}
-
-
-# HTTPS server
-server {
-    listen       443 ssl;
-    server_name  tfohowapi.hiwavo.com;
-    charset utf-8;
-    #ssl on;
-    ssl_certificate      /root/sites/fohow_git/x_api/go/gopath/src/fohow.com/static/tapi/tfohowapi.hiwavo.com_bundle.pem;
-    ssl_certificate_key  /root/sites/fohow_git/x_api/go/gopath/src/fohow.com/static/tapi/tfohowapi.hiwavo.com.key;
-
-    ssl_session_cache    shared:SSL:1m;
-    ssl_session_timeout  5m;
-
-    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
-    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
-    ssl_prefer_server_ciphers  on;
-
-    location / {
-        proxy_next_upstream off;
-        proxy_set_header    X-Real-IP           $remote_addr;
-        proxy_set_header    X-Forwarded-For     $proxy_add_x_forwarded_for;
-        proxy_set_header    Host                $host;
-        proxy_http_version  1.1;
-        proxy_set_header    Connection  "";
-        proxy_pass           http://tfohowapi.hiwavo.com:80;
-    }
-}
-
-
-
-
-
-

+ 11 - 2
go/gopath/src/fohow.com/nginx/ngx_test_config

@@ -35,6 +35,15 @@ server {
       #expires  30d;
     }
 
+   location /xj_api {
+       proxy_set_header Host $http_host;
+       proxy_set_header  X-Real-IP $remote_addr;
+       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+       proxy_set_header X-Forwarded-Proto $scheme;
+       rewrite ^/api/(.*)$ /$1 break;  #重写
+       proxy_pass http://gva-server; # 设置代理服务器的协议和地址
+    }
+
     location / {
         proxy_next_upstream off;
         proxy_set_header    X-Real-IP           $remote_addr;
@@ -57,8 +66,8 @@ server {
     server_name  tfohowapi.hiwavo.com;
     charset utf-8;
     #ssl on;
-    ssl_certificate      /home/rails/fohow/api/go/gopath/src/fohow.com/static/tapi/tfohowapi.hiwavo.com.pem;
-    ssl_certificate_key  /home/rails/fohow/api/go/gopath/src/fohow.com/static/tapi/tfohowapi.hiwavo.com.key;
+       ssl_certificate      /root/sites/fohow_git/x_api/go/gopath/src/fohow.com/static/tapi/tfohowapi.hiwavo.com_bundle.pem;
+       ssl_certificate_key  /root/sites/fohow_git/x_api/go/gopath/src/fohow.com/static/tapi/tfohowapi.hiwavo.com.key;
     ssl_session_cache    shared:SSL:1m;
     ssl_session_timeout  5m;