diff --git a/nginx/default-http-only.conf.template b/nginx/default-http-only.conf.template index 506bf35a..e7cef87a 100644 --- a/nginx/default-http-only.conf.template +++ b/nginx/default-http-only.conf.template @@ -13,8 +13,9 @@ server { } location /api/ { - set $api_upstream backend:4000; - proxy_pass http://$api_upstream/api/; + set $api_host backend; + set $api_port 4000; + proxy_pass http://$api_host:$api_port; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; @@ -23,8 +24,9 @@ server { } location /ws/ { - set $ws_upstream backend-ws:4001; - proxy_pass http://$ws_upstream; + set $ws_host backend-ws; + set $ws_port 4001; + proxy_pass http://$ws_host:$ws_port; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; @@ -36,8 +38,9 @@ server { } location / { - set $web_upstream prediqo_web:80; - proxy_pass http://$web_upstream/; + set $web_host prediqo_web; + set $web_port 80; + proxy_pass http://$web_host:$web_port; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; diff --git a/nginx/default-https-custom-port.conf.template b/nginx/default-https-custom-port.conf.template index c26a1398..41676d89 100644 --- a/nginx/default-https-custom-port.conf.template +++ b/nginx/default-https-custom-port.conf.template @@ -28,8 +28,9 @@ server { client_max_body_size 20m; location /api/ { - set $api_upstream backend:4000; - proxy_pass http://$api_upstream/api/; + set $api_host backend; + set $api_port 4000; + proxy_pass http://$api_host:$api_port; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; @@ -38,8 +39,9 @@ server { } location /ws/ { - set $ws_upstream backend-ws:4001; - proxy_pass http://$ws_upstream; + set $ws_host backend-ws; + set $ws_port 4001; + proxy_pass http://$ws_host:$ws_port; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; @@ -51,8 +53,9 @@ server { } location / { - set $web_upstream prediqo_web:80; - proxy_pass http://$web_upstream/; + set $web_host prediqo_web; + set $web_port 80; + proxy_pass http://$web_host:$web_port; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; diff --git a/nginx/default.conf.template b/nginx/default.conf.template index 82b08648..df929c2a 100644 --- a/nginx/default.conf.template +++ b/nginx/default.conf.template @@ -26,8 +26,9 @@ server { client_max_body_size 20m; location /api/ { - set $api_upstream backend:4000; - proxy_pass http://$api_upstream/api/; + set $api_host backend; + set $api_port 4000; + proxy_pass http://$api_host:$api_port; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; @@ -36,8 +37,9 @@ server { } location /ws/ { - set $ws_upstream backend-ws:4001; - proxy_pass http://$ws_upstream; + set $ws_host backend-ws; + set $ws_port 4001; + proxy_pass http://$ws_host:$ws_port; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; @@ -49,8 +51,9 @@ server { } location / { - set $web_upstream prediqo_web:80; - proxy_pass http://$web_upstream/; + set $web_host prediqo_web; + set $web_port 80; + proxy_pass http://$web_host:$web_port; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr;