summaryrefslogtreecommitdiffstats
path: root/roles/httpd/templates/vhost.conf
diff options
context:
space:
mode:
Diffstat (limited to 'roles/httpd/templates/vhost.conf')
-rw-r--r--roles/httpd/templates/vhost.conf21
1 files changed, 21 insertions, 0 deletions
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 @@
+<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 %}
+
+ <Directory "{{ document_root }}">
+ AllowOverride All
+ </Directory>
+
+ ServerName {{ website_url }}
+ DocumentRoot {{ document_root }}
+ Include /etc/httpd/conf.d/{{ website_url}}.conf.d/*conf
+</VirtualHost>
+
+