summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
Diffstat (limited to 'roles')
-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 %}