You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2018/05/15 19:14:32 UTC

[airavata] branch master updated: pga role gains vhost_server_redirect variable, used for CSBGLSU gateway

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

machristie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata.git


The following commit(s) were added to refs/heads/master by this push:
     new a0fc98b  pga role gains vhost_server_redirect variable, used for CSBGLSU gateway
a0fc98b is described below

commit a0fc98b494ee75b6a0aa0a45f8c5849d6c316a49
Author: Marcus Christie <ma...@iu.edu>
AuthorDate: Tue May 15 15:14:22 2018 -0400

    pga role gains vhost_server_redirect variable, used for CSBGLSU gateway
---
 .../inventories/scigap/production/pga_config/csbglsu/vars.yml | 11 ++++++-----
 dev-tools/ansible/roles/pga/templates/pga-ssl-vhost.conf.j2   |  7 +++++++
 dev-tools/ansible/roles/pga/templates/pga-vhost.conf.j2       |  7 +++++++
 3 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/dev-tools/ansible/inventories/scigap/production/pga_config/csbglsu/vars.yml b/dev-tools/ansible/inventories/scigap/production/pga_config/csbglsu/vars.yml
index 175d372..60fd88e 100644
--- a/dev-tools/ansible/inventories/scigap/production/pga_config/csbglsu/vars.yml
+++ b/dev-tools/ansible/inventories/scigap/production/pga_config/csbglsu/vars.yml
@@ -24,12 +24,13 @@ git_branch: "master"
 user: "pga"
 group: "pga"
 doc_root_dir: "/var/www/portals/{{ gateway_id }}"
-vhost_servername: "csbglsu.scigap.org"
-vhost_ssl: false
+vhost_servername: "sciencegateway.brylinski.org"
+vhost_server_redirect: "www.sciencegateway.brylinski.org"
+vhost_ssl: true
 # TODO: have Ansible manage these files as well
-#ssl_certificate_file: "/etc/letsencrypt/live/csbglsu.scigap.org/cert.pem"
-#ssl_certificate_chain_file: "/etc/letsencrypt/live/csbglsu.scigap.org/fullchain.pem"
-#ssl_certificate_key_file: "/etc/letsencrypt/live/csbglsu.scigap.org/privkey.pem"
+ssl_certificate_file: "/etc/letsencrypt/live/sciencegateway.brylinski.org/cert.pem"
+ssl_certificate_chain_file: "/etc/letsencrypt/live/sciencegateway.brylinski.org/fullchain.pem"
+ssl_certificate_key_file: "/etc/letsencrypt/live/sciencegateway.brylinski.org/privkey.pem"
 
 ## Keycloak related variables
 tenant_domain: "{{ gateway_id }}"
diff --git a/dev-tools/ansible/roles/pga/templates/pga-ssl-vhost.conf.j2 b/dev-tools/ansible/roles/pga/templates/pga-ssl-vhost.conf.j2
index 44ec48b..cf58076 100644
--- a/dev-tools/ansible/roles/pga/templates/pga-ssl-vhost.conf.j2
+++ b/dev-tools/ansible/roles/pga/templates/pga-ssl-vhost.conf.j2
@@ -1,3 +1,10 @@
+{% if vhost_server_redirect is defined %}
+<VirtualHost *:{{pga_default_http_port}}>
+    ServerName {{ vhost_server_redirect }}
+    Redirect "/" "https://{{ vhost_servername }}"
+</VirtualHost>
+{% endif %}
+
 <VirtualHost *:{{pga_default_http_port}}>
     ServerName {{ vhost_servername }}
     {% if vhost_serveralias is defined %}
diff --git a/dev-tools/ansible/roles/pga/templates/pga-vhost.conf.j2 b/dev-tools/ansible/roles/pga/templates/pga-vhost.conf.j2
index 0cfd5d4..dd4a07a 100644
--- a/dev-tools/ansible/roles/pga/templates/pga-vhost.conf.j2
+++ b/dev-tools/ansible/roles/pga/templates/pga-vhost.conf.j2
@@ -1,3 +1,10 @@
+{% if vhost_server_redirect is defined %}
+<VirtualHost *:{{pga_default_http_port}}>
+    ServerName {{ vhost_server_redirect }}
+    Redirect "/" "http://{{ vhost_servername }}"
+</VirtualHost>
+{% endif %}
+
 <VirtualHost *:{{pga_default_http_port}}>
     ServerName {{ vhost_servername }}
     {% if vhost_serveralias is defined %}

-- 
To stop receiving notification emails like this one, please contact
machristie@apache.org.