From dd06fb0a56feba126cce5ef75e84e23eb72fe7aa Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Wed, 15 Oct 2014 16:55:11 -0400 Subject: Add playbook and httpd and the rest --- roles/httpd/templates/vhost.conf | 21 +++++++++++++++++++++ roles/httpd/templates/vhost_redirect.conf | 16 ++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 roles/httpd/templates/vhost.conf create mode 100644 roles/httpd/templates/vhost_redirect.conf (limited to 'roles/httpd/templates') diff --git a/roles/httpd/templates/vhost.conf b/roles/httpd/templates/vhost.conf new file mode 100644 index 0000000..21172c9 --- /dev/null +++ b/roles/httpd/templates/vhost.conf @@ -0,0 +1,21 @@ + + {% if website_password is defined %} + + + AuthType Basic + AuthName "Restricted access, contact OSAS for password" + AuthUserFile /etc/httpd/{{ website_url }}.htpasswd + Require valid-user + + {% endif %} + + + AllowOverride All + + + ServerName {{ website_url }} + DocumentRoot {{ document_root }} + Include /etc/httpd/conf.d/{{ website_url}}.conf.d/*conf + + + diff --git a/roles/httpd/templates/vhost_redirect.conf b/roles/httpd/templates/vhost_redirect.conf new file mode 100644 index 0000000..1c93343 --- /dev/null +++ b/roles/httpd/templates/vhost_redirect.conf @@ -0,0 +1,16 @@ + + {% if website_password is defined %} + + + AuthType Basic + AuthName "Restricted access, contact OSAS for password" + AuthUserFile /etc/httpd/{{ website_url }}.htpasswd + Require valid-user + + {% endif %} + + ServerName {{ website_url }} + Redirect / {{ redirect }} + + + -- cgit