You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dlab.apache.org by om...@apache.org on 2020/01/24 10:43:04 UTC

[incubator-dlab] branch DLAB-1462 updated: [DLAB-1462]: Fixed issue with Nginx configuration

This is an automated email from the ASF dual-hosted git repository.

omartushevskyi pushed a commit to branch DLAB-1462
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git


The following commit(s) were added to refs/heads/DLAB-1462 by this push:
     new e021779  [DLAB-1462]: Fixed issue with Nginx configuration
e021779 is described below

commit e02177952f19ea6a14376a34383c3b30d491abb4
Author: Oleh Martushevskyi <Ol...@epam.com>
AuthorDate: Fri Jan 24 12:42:52 2020 +0200

    [DLAB-1462]: Fixed issue with Nginx configuration
---
 infrastructure-provisioning/src/project/templates/conf.d/proxy.conf | 3 +++
 infrastructure-provisioning/src/ssn/templates/nginx_proxy.conf      | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/infrastructure-provisioning/src/project/templates/conf.d/proxy.conf b/infrastructure-provisioning/src/project/templates/conf.d/proxy.conf
index c59fea1..a58147f 100644
--- a/infrastructure-provisioning/src/project/templates/conf.d/proxy.conf
+++ b/infrastructure-provisioning/src/project/templates/conf.d/proxy.conf
@@ -28,6 +28,9 @@ server {
 server {
     listen       443 ssl;
     server_name  EDGE_IP;
+    if ($host != $server_name) {
+        rewrite ^/(.*)$ https://$server_name/$1 redirect;
+    }
     # SSL section
     proxy_buffering off;
     ssl on;
diff --git a/infrastructure-provisioning/src/ssn/templates/nginx_proxy.conf b/infrastructure-provisioning/src/ssn/templates/nginx_proxy.conf
index 08a228c..3a293fc 100644
--- a/infrastructure-provisioning/src/ssn/templates/nginx_proxy.conf
+++ b/infrastructure-provisioning/src/ssn/templates/nginx_proxy.conf
@@ -31,6 +31,9 @@ server {
 server {
     listen       443 ssl;
     server_name  SSN_HOSTNAME;
+    if ($host != $server_name) {
+        rewrite ^/(.*)$ https://$server_name/$1 redirect;
+    }
     # SSL section
     proxy_buffering off;
     ssl on;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@dlab.apache.org
For additional commands, e-mail: commits-help@dlab.apache.org