summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Scherer <misc@zarb.org>2014-12-12 16:53:31 +0100
committerMichael Scherer <misc@zarb.org>2014-12-12 16:53:31 +0100
commit19e0f115f0dcb82cbf2127a7ef8ee65159e08c54 (patch)
treecbf8621028222c060daf0e2e54dbaf940bcc60d3
parent491c6c291e2da69ec65d88f78b76e725ad573d5a (diff)
Add a custom vhost, with a hardocded name for now
-rw-r--r--roles/cgit/tasks/main.yml3
-rw-r--r--roles/cgit/templates/vhost.conf13
2 files changed, 16 insertions, 0 deletions
diff --git a/roles/cgit/tasks/main.yml b/roles/cgit/tasks/main.yml
index ea9972f..cdbaf6e 100644
--- a/roles/cgit/tasks/main.yml
+++ b/roles/cgit/tasks/main.yml
@@ -10,3 +10,6 @@
- copy: mode=0644 src=cgit.httpd.conf dest=/etc/httpd/conf.d/cgit.conf
notify: restart httpd
+# TODO clean once the mess with domain name is solved
+- template: src=vhost.conf dest=/etc/httpd/conf.d/git.theopensourceway.org.conf
+ notify: restart httpd
diff --git a/roles/cgit/templates/vhost.conf b/roles/cgit/templates/vhost.conf
new file mode 100644
index 0000000..bf9a536
--- /dev/null
+++ b/roles/cgit/templates/vhost.conf
@@ -0,0 +1,13 @@
+{% for i in '80', '443' %}
+<VirtualHost *:{{ i }}>
+
+ Alias /cgit-data /usr/share/cgit
+ ScriptAlias /cgit /var/www/cgi-bin/cgit
+
+ RedirectMatch ^/$ /cgit/
+
+ # TODO clean it
+ ServerName git.theopensourceway.org
+
+</VirtualHost>
+{% endfor %}