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 2020/09/18 18:06:07 UTC
[airavata] 04/09: Ansible: fix default DocumentRoot on Ubuntu 18
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
commit aef45ae0154bd27efa1fb355a85e181baecf6230
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Fri Mar 13 10:03:39 2020 -0400
Ansible: fix default DocumentRoot on Ubuntu 18
---
dev-tools/ansible/roles/httpd/defaults/main.yml | 3 +++
dev-tools/ansible/roles/httpd/templates/default.conf.j2 | 4 ++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/dev-tools/ansible/roles/httpd/defaults/main.yml b/dev-tools/ansible/roles/httpd/defaults/main.yml
index 1317100..d1e6053 100644
--- a/dev-tools/ansible/roles/httpd/defaults/main.yml
+++ b/dev-tools/ansible/roles/httpd/defaults/main.yml
@@ -42,6 +42,9 @@ httpd_default_ssl_vhost_certificate_key_dir:
httpd_default_ssl_vhost_certificate_key_location:
RedHat: "/etc/httpd/ssl/private/default_vhost.key"
Debian: "/etc/apache2/ssl/private/default_vhost.key"
+httpd_default_document_root:
+ RedHat: "/www/default"
+ Debian: "/var/www/html"
httpd_name:
Debian: apache2
RedHat: httpd
diff --git a/dev-tools/ansible/roles/httpd/templates/default.conf.j2 b/dev-tools/ansible/roles/httpd/templates/default.conf.j2
index 1bf550d..ee83a03 100644
--- a/dev-tools/ansible/roles/httpd/templates/default.conf.j2
+++ b/dev-tools/ansible/roles/httpd/templates/default.conf.j2
@@ -1,10 +1,10 @@
# Setup default virtual host as a catchall to prevent resolving to the first defined virtual host
# This will show the welcome page when requesting on the ip address or server default hostname
<VirtualHost *:{{ httpd_default_http_port }}>
- DocumentRoot "/www/default"
+ DocumentRoot "{{ httpd_default_document_root[ansible_os_family] }}"
</VirtualHost>
<VirtualHost *:{{ httpd_default_https_port }}>
- DocumentRoot "/www/default"
+ DocumentRoot "{{ httpd_default_document_root[ansible_os_family] }}"
SSLEngine on
SSLCertificateFile "{{ httpd_default_ssl_vhost_certificate_location[ansible_os_family] }}"
SSLCertificateKeyFile "{{ httpd_default_ssl_vhost_certificate_key_location[ansible_os_family] }}"