summaryrefslogtreecommitdiff
path: root/roles/web_server/templates/virtualhost.conf.tmpl
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-04-21 16:34:57 +0300
committerLars Wirzenius <liw@liw.fi>2017-04-21 16:34:57 +0300
commitbc0d7897d1f4a88d5d60b9460a3fd52a3fc196bc (patch)
tree1c7c784c3dfe9277f06a43342dd117cfd204859a /roles/web_server/templates/virtualhost.conf.tmpl
parent62f6d8f4af75970358c661528310d397d57ec8ee (diff)
downloaddebian-ansible-bc0d7897d1f4a88d5d60b9460a3fd52a3fc196bc.tar.gz
Add web_server and git_server roles
Need git_server for the new QvarnLabs git server, and the git server relies on the web server for cgit.
Diffstat (limited to 'roles/web_server/templates/virtualhost.conf.tmpl')
-rw-r--r--roles/web_server/templates/virtualhost.conf.tmpl14
1 files changed, 14 insertions, 0 deletions
diff --git a/roles/web_server/templates/virtualhost.conf.tmpl b/roles/web_server/templates/virtualhost.conf.tmpl
new file mode 100644
index 0000000..6afdd41
--- /dev/null
+++ b/roles/web_server/templates/virtualhost.conf.tmpl
@@ -0,0 +1,14 @@
+<VirtualHost *:80>
+ ServerName {{ item.domain }}
+{% if item.alias is defined %}
+ ServerAlias {{ item.alias }}
+{% endif %}
+ ServerAdmin {{ item.ownermail }}
+ DocumentRoot /srv/http/{{ item.domain }}
+ ErrorLog /var/log/apache2/{{ item.domain }}/error.log
+ CustomLog /var/log/apache2/{{ item.domain }}/access.log combined
+ <Directory /srv/http/{{ item.domain }}>
+ Options +SymlinksIfOwnerMatch +Indexes
+ Require all granted
+ </Directory>
+</VirtualHost>