aboutsummaryrefslogtreecommitdiffstats
path: root/roles/git/templates/etc_apache2_sites-available_cgit.j2
diff options
context:
space:
mode:
Diffstat (limited to 'roles/git/templates/etc_apache2_sites-available_cgit.j2')
-rw-r--r--roles/git/templates/etc_apache2_sites-available_cgit.j227
1 files changed, 27 insertions, 0 deletions
diff --git a/roles/git/templates/etc_apache2_sites-available_cgit.j2 b/roles/git/templates/etc_apache2_sites-available_cgit.j2
new file mode 100644
index 0000000..af59a34
--- /dev/null
+++ b/roles/git/templates/etc_apache2_sites-available_cgit.j2
@@ -0,0 +1,27 @@
+<VirtualHost *:80>
+ ServerName {{ cgit_domain }}
+
+ Redirect permanent / https://{{ cgit_domain }}/
+</VirtualHost>
+
+<VirtualHost *:443>
+ ServerName {{ cgit_domain }}
+ SSLEngine On
+
+ DocumentRoot /var/www/htdocs/cgit/
+ <Directory "/var/www/htdocs/cgit/">
+ AllowOverride None
+ Options +ExecCGI
+ Order allow,deny
+ Allow from all
+ </Directory>
+
+ Alias /cgit.png /var/www/htdocs/cgit/cgit.png
+ Alias /cgit.css /var/www/htdocs/cgit/cgit.css
+ Alias /favicon.ico /var/www/htdocs/cgit/favicon.ico
+ Alias /robots.txt /var/www/htdocs/cgit/robots.txt
+ ScriptAlias / /var/www/htdocs/cgit/cgit.cgi/
+
+ CustomLog /var/log/apache2/cgit_access.log combined
+ ErrorLog /var/log/apache2/cgit_error.log
+</VirtualHost>