summaryrefslogtreecommitdiffstats
path: root/roles/httpd/templates/vhost_redirect.conf
diff options
context:
space:
mode:
Diffstat (limited to 'roles/httpd/templates/vhost_redirect.conf')
-rw-r--r--roles/httpd/templates/vhost_redirect.conf16
1 files changed, 16 insertions, 0 deletions
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 @@
+<VirtualHost *:80>
+ {% if website_password is defined %}
+ <Location />
+
+ AuthType Basic
+ AuthName "Restricted access, contact OSAS for password"
+ AuthUserFile /etc/httpd/{{ website_url }}.htpasswd
+ Require valid-user
+ </Location>
+ {% endif %}
+
+ ServerName {{ website_url }}
+ Redirect / {{ redirect }}
+</VirtualHost>
+
+