From 02d2d26f469255698925267f84b0ba696c2d0c5f Mon Sep 17 00:00:00 2001 From: Israel Perales Date: Tue, 18 Feb 2020 12:57:47 -0600 Subject: [PATCH] up nginx server without ms up --- scripts/nginx/docker.nginx.conf | 36 ++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/scripts/nginx/docker.nginx.conf b/scripts/nginx/docker.nginx.conf index 5e20e4eb..a1f51f97 100644 --- a/scripts/nginx/docker.nginx.conf +++ b/scripts/nginx/docker.nginx.conf @@ -20,7 +20,8 @@ http { # /api will server your proxied API that is running on same machine different port # or another machine. So you can protect your API endpoint not get hit by public directly location /identity/ { - proxy_pass http://identity-ms:2021; + set $identityms http://identity-ms:2021; + proxy_pass $identityms; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; @@ -31,7 +32,8 @@ http { } location /api/office/ { - proxy_pass http://office-ms:2023/office/; + set $officems http://office-ms:2023/office/; + proxy_pass $officems; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; @@ -42,7 +44,8 @@ http { } location /api/customer/ { - proxy_pass http://customer-ms:2024/customer/; + set $customerms http://customer-ms:2024/customer/; + proxy_pass $customerms; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; @@ -53,7 +56,8 @@ http { } location /api/accounting/ { - proxy_pass http://accounting-ms:2025/accounting/; + set $accountingms http://accounting-ms:2025/accounting/; + proxy_pass $accountingms; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; @@ -64,7 +68,8 @@ http { } location /api/portfolio/ { - proxy_pass http://portfolio-ms:2026/portfolio/; + set $portfolioms http://portfolio-ms:2026/portfolio/; + proxy_pass $portfolioms; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; @@ -75,7 +80,8 @@ http { } location /api/deposit/ { - proxy_pass http://deposit-account-management-ms:2027/deposit/; + set $depositaccountmanagementms http://deposit-account-management-ms:2027/deposit/; + proxy_pass $depositaccountmanagementms; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; @@ -86,7 +92,8 @@ http { } location /api/teller/ { - proxy_pass http://teller-ms:2028/teller/; + set $tellerms http://teller-ms:2028/teller/; + proxy_pass $tellerms; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; @@ -97,7 +104,8 @@ http { } location /api/reporting/ { - proxy_pass http://reporting-ms:2029/reporting/; + set $reportingms http://reporting-ms:2029/reporting/; + proxy_pass $reportingms; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; @@ -108,7 +116,8 @@ http { } location /api/cheques/ { - proxy_pass http://cheques-ms:2030/cheques/; + set $chequesms http://cheques-ms:2030/cheques/; + proxy_pass $chequesms; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; @@ -119,7 +128,8 @@ http { } location /api/payroll/ { - proxy_pass http://payroll-ms:2031/payroll/; + set $payrollms http://payroll-ms:2031/payroll/; + proxy_pass $payrollms; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; @@ -130,7 +140,8 @@ http { } location /api/group/ { - proxy_pass http://group-ms:2032/group/; + set $groupms http://group-ms:2032/group/; + proxy_pass $groupms; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; @@ -141,7 +152,8 @@ http { } location /api/notification/ { - proxy_pass http://notifications-ms:2032/notification/; + set $notificationsms http://notifications-ms:2032/notification/; + proxy_pass $notificationsms; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade';