Ver Fonte

update nginx for production

fengchang há 1 ano atrás
pai
commit
ae481e9f27
1 ficheiros alterados com 42 adições e 42 exclusões
  1. 42 42
      nginx.conf

+ 42 - 42
nginx.conf

@@ -62,50 +62,50 @@ http {
 
         return 301 https://$host$request_uri;
     }
-    server {
-        listen       443;
-        server_name  www.hichinatravel.com;
+    # server {
+    #     listen       443;
+    #     server_name  www.hichinatravel.com;
 
-        if ($http_host != www.hichinatravel.com) {
-            rewrite  (.*)  https://www.hichinatravel.com$1 permanent;
-        }
+    #     if ($http_host != www.hichinatravel.com) {
+    #         rewrite  (.*)  https://www.hichinatravel.com$1 permanent;
+    #     }
        
-        root         /usr/share/nginx/html;
+    #     root         /usr/share/nginx/html;
 
-        ssl on;
-        ssl_certificate   /etc/nginx/cert/fullchain.pem;
-        ssl_certificate_key  /etc/nginx/cert/private.key;
+    #     ssl on;
+    #     ssl_certificate   /etc/nginx/cert/fullchain.pem;
+    #     ssl_certificate_key  /etc/nginx/cert/private.key;
         
-        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;
+    #     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;
 
-        # Load configuration files for the default server block.
-        include /etc/nginx/default.d/*.conf;
+    #     # Load configuration files for the default server block.
+    #     include /etc/nginx/default.d/*.conf;
         
-        location / {
-                  proxy_set_header   X-Real-IP $remote_addr;
-                  proxy_set_header   Host      hichinatravel.com;
-                  proxy_pass         http://127.0.0.1:8765;
-                  #proxy_pass "http://47.100.21.205:9995/";
-        }
-        location /staticresource/ {
-                      rewrite /staticresource(.*) $1 break;
-                      proxy_pass http://127.0.0.1:8011;
-                      proxy_redirect     off;
-                      proxy_set_header   Host             hichinatravel.com;
-                      proxy_set_header   X-Real-IP        $remote_addr;
-                      proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
-        }
-        error_page 404 /404.html;
-             location = /40x.html {
-         }
+    #     location / {
+    #               proxy_set_header   X-Real-IP $remote_addr;
+    #               proxy_set_header   Host      hichinatravel.com;
+    #               proxy_pass         http://127.0.0.1:8765;
+    #               #proxy_pass "http://47.100.21.205:9995/";
+    #     }
+    #     location /staticresource/ {
+    #                   rewrite /staticresource(.*) $1 break;
+    #                   proxy_pass http://127.0.0.1:8011;
+    #                   proxy_redirect     off;
+    #                   proxy_set_header   Host             hichinatravel.com;
+    #                   proxy_set_header   X-Real-IP        $remote_addr;
+    #                   proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
+    #     }
+    #     error_page 404 /404.html;
+    #          location = /40x.html {
+    #      }
         
-         error_page 500 502 503 504 /50x.html;
-            location = /50x.html {
-         }
-    }
+    #      error_page 500 502 503 504 /50x.html;
+    #         location = /50x.html {
+    #      }
+    # }
     # server {
     #     listen       80;
     #     server_name  www.hichinatravel.com;
@@ -374,7 +374,7 @@ http {
    }
    server {
     listen       443;
-    server_name  preprod.hichinatravel.com;
+    server_name  www.hichinatravel.com;
 
     gzip on;
     gzip_min_length 1k;
@@ -383,8 +383,8 @@ http {
     gzip_vary on;
     gzip_disable "MSIE [1-6]\.";
 
-    if ($http_host != preprod.hichinatravel.com) {
-        rewrite  (.*)  https://preprod.hichinatravel.com$1 permanent;
+    if ($http_host != www.hichinatravel.com) {
+        rewrite  (.*)  https://www.hichinatravel.com$1 permanent;
     }
        
     root         /usr/share/nginx/html;
@@ -403,7 +403,7 @@ http {
         
     location / {
               proxy_set_header   X-Real-IP $remote_addr;
-              proxy_set_header   Host      preprod.hichinatravel.com;
+              proxy_set_header   Host      www.hichinatravel.com;
               proxy_pass         http://127.0.0.1:9057;
               #proxy_pass "http://47.100.21.205:9995/";
     }
@@ -411,7 +411,7 @@ http {
               rewrite /service(.*) $1 break;
               proxy_pass http://127.0.0.1:9056;
               proxy_redirect     off;
-              proxy_set_header   Host             preprod.hichinatravel.com;
+              proxy_set_header   Host             www.hichinatravel.com;
               proxy_set_header   X-Real-IP        $remote_addr;
               proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
     }