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 2019/10/28 15:54:32 UTC
[airavata] branch staging updated: AIRAVATA-3019 Additional vhost
aliases support
This is an automated email from the ASF dual-hosted git repository.
machristie pushed a commit to branch staging
in repository https://gitbox.apache.org/repos/asf/airavata.git
The following commit(s) were added to refs/heads/staging by this push:
new bbb43a6 AIRAVATA-3019 Additional vhost aliases support
bbb43a6 is described below
commit bbb43a6bd60867a9086398f9aa4c075a8fea1cd8
Author: Marcus Christie <ma...@iu.edu>
AuthorDate: Mon Oct 28 11:54:16 2019 -0400
AIRAVATA-3019 Additional vhost aliases support
This will allow SEAGrid Desktop to keep the same URL for app updates.
---
.../ansible/inventories/scigap/staging/host_vars/seagrid/vars.yml | 3 +++
dev-tools/ansible/roles/django/defaults/main.yml | 1 +
dev-tools/ansible/roles/django/templates/django-ssl-vhost.conf.j2 | 8 ++++++++
dev-tools/ansible/roles/django/templates/django-vhost.conf.j2 | 8 ++++++++
4 files changed, 20 insertions(+)
diff --git a/dev-tools/ansible/inventories/scigap/staging/host_vars/seagrid/vars.yml b/dev-tools/ansible/inventories/scigap/staging/host_vars/seagrid/vars.yml
index 1a79046..d72c96f 100644
--- a/dev-tools/ansible/inventories/scigap/staging/host_vars/seagrid/vars.yml
+++ b/dev-tools/ansible/inventories/scigap/staging/host_vars/seagrid/vars.yml
@@ -21,6 +21,9 @@
---
vhost_servername: "django.staging.seagrid.org"
vhost_ssl: True
+vhost_aliases:
+ - url: /seagrid-rich-client/
+ path: "{{ doc_root_dir }}/static/seagrid-rich-client/"
ssl_certificate_file: "/etc/letsencrypt/live/django.staging.seagrid.org/cert.pem"
ssl_certificate_chain_file: "/etc/letsencrypt/live/django.staging.seagrid.org/fullchain.pem"
ssl_certificate_key_file: "/etc/letsencrypt/live/django.staging.seagrid.org/privkey.pem"
diff --git a/dev-tools/ansible/roles/django/defaults/main.yml b/dev-tools/ansible/roles/django/defaults/main.yml
index 2c1a22e..a1c719a 100644
--- a/dev-tools/ansible/roles/django/defaults/main.yml
+++ b/dev-tools/ansible/roles/django/defaults/main.yml
@@ -26,6 +26,7 @@ django_venv_dir: "{{ doc_root_dir }}/venv"
real_user_data_dir: "{{ user_data_dir }}"
vhost_servername: "{{ groups['django'][0] }}"
vhost_ssl: False
+vhost_aliases: []
httpd_confd_file_location:
RedHat: "/etc/httpd/conf.d/django-{{ gateway_id }}.conf"
Debian: "/etc/apache2/sites-available/django-{{ gateway_id }}.conf"
diff --git a/dev-tools/ansible/roles/django/templates/django-ssl-vhost.conf.j2 b/dev-tools/ansible/roles/django/templates/django-ssl-vhost.conf.j2
index 09d8b09..13e5d5d 100644
--- a/dev-tools/ansible/roles/django/templates/django-ssl-vhost.conf.j2
+++ b/dev-tools/ansible/roles/django/templates/django-ssl-vhost.conf.j2
@@ -55,6 +55,14 @@
Require all granted
</Directory>
+ {# Additional aliases #}
+ {% for alias in vhost_aliases %}
+ Alias "{{ alias.url }}" "{{ alias.path }}"
+ <Directory "{{ alias.path }}">
+ Require all granted
+ </Directory>
+ {% endfor %}
+
WSGIDaemonProcess {{ vhost_servername }} display-name=%{GROUP} python-home={{ doc_root_dir }}/venv python-path={{ doc_root_dir }}/airavata-django-portal processes={{ django_wsgi_processes }} user={{ user }} group={{ group }}
WSGIProcessGroup {{ vhost_servername }}
diff --git a/dev-tools/ansible/roles/django/templates/django-vhost.conf.j2 b/dev-tools/ansible/roles/django/templates/django-vhost.conf.j2
index 995fdde..489ab2b 100644
--- a/dev-tools/ansible/roles/django/templates/django-vhost.conf.j2
+++ b/dev-tools/ansible/roles/django/templates/django-vhost.conf.j2
@@ -46,6 +46,14 @@
Require all granted
</Directory>
+ {# Additional aliases #}
+ {% for alias in vhost_aliases %}
+ Alias "{{ alias.url }}" "{{ alias.path }}"
+ <Directory "{{ alias.path }}">
+ Require all granted
+ </Directory>
+ {% endfor %}
+
WSGIDaemonProcess {{ vhost_servername }} display-name=%{GROUP} python-home={{ doc_root_dir }}/venv python-path={{ doc_root_dir }}/airavata-django-portal processes={{ django_wsgi_processes }} user={{ user }} group={{ group }}
WSGIProcessGroup {{ vhost_servername }}