aboutsummaryrefslogtreecommitdiff
path: root/templates/apache/vhosts
diff options
context:
space:
mode:
Diffstat (limited to 'templates/apache/vhosts')
-rw-r--r--templates/apache/vhosts/cgit.erb30
-rw-r--r--templates/apache/vhosts/git.erb1
2 files changed, 31 insertions, 0 deletions
diff --git a/templates/apache/vhosts/cgit.erb b/templates/apache/vhosts/cgit.erb
new file mode 100644
index 0000000..d2d393d
--- /dev/null
+++ b/templates/apache/vhosts/cgit.erb
@@ -0,0 +1,30 @@
+# begin vhost for cgit
+<VirtualHost *:80>
+ ServerName git.<%= domain %>
+ ServerAlias gitweb.<%= domain %>
+
+ ServerSignature Off
+
+ Alias /cgit.css /var/www/htdocs/cgit/cgit.css
+ Alias /cgit.png /var/www/htdocs/cgit/cgit.png
+
+ ScriptAlias /cgi-bin/ /var/www/htdocs/cgit/
+
+ DocumentRoot /var/git/repositories
+ <Directory /var/git/repositories>
+ AllowOverride None
+ Options +ExecCGI
+ Order allow,deny
+ Allow from all
+
+ DirectoryIndex /cgi-bin/cgit.cgi
+
+ RewriteEngine on
+ RewriteCond %{REQUEST_FILENAME} !-f
+ RewriteRule ^.*$ /cgi-bin/cgit.cgi/$0 [L,PT]
+ </Directory>
+
+ ErrorLog /var/log/apache2/cgit.openezx.org/error.log
+ CustomLog /var/log/apache2/cgit.openezx.org/access.log common
+</VirtualHost>
+# end vhost for git
diff --git a/templates/apache/vhosts/git.erb b/templates/apache/vhosts/git.erb
index 25aecd1..89173ac 100644
--- a/templates/apache/vhosts/git.erb
+++ b/templates/apache/vhosts/git.erb
@@ -3,6 +3,7 @@
# Recipe based on http://josephspiros.com/2009/07/26/configuring-gitweb-for-apache-on-debian
ServerName git.<%= domain %>
+ ServerAlias gitweb.<%= domain %>
SetEnv GITWEB_CONFIG /etc/gitweb.conf
HeaderName HEADER
DocumentRoot /var/git/repositories