]> gitweb.fluxo.info Git - puppet-bootstrap.git/commitdiff
Git and cgit vhosts
authorSilvio Rhatto <rhatto@riseup.net>
Sat, 20 Jun 2015 16:41:53 +0000 (13:41 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sat, 20 Jun 2015 16:41:53 +0000 (13:41 -0300)
README.md
templates/apache/vhosts/cgit.erb [new file with mode: 0644]
templates/apache/vhosts/git.erb

index 67dad5fd0b5ed9ef1affb3bb879a8448d05f6908..b432f520d216e24260068b0206c34436a793364e 100644 (file)
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@ This is a multi-purpose but very specific puppet module which can be used:
 
 * As the base repository for a puppet infrastructure.
 * As a standalone provisioner for boxes, with Vagrant support.
-* It can be optionally used together with the Hydra Suite from https://git.sarava.org/?p=hydra.git
+* It can be optionally used together with the Hydra Suite from https://git.sarava.org/hydra.git
 
 Setting up a new puppetmaster repository
 ----------------------------------------
diff --git a/templates/apache/vhosts/cgit.erb b/templates/apache/vhosts/cgit.erb
new file mode 100644 (file)
index 0000000..d2d393d
--- /dev/null
@@ -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
index 25aecd1bf004cd0d9cfb26b40f3286625ef164fa..89173acd313ea1a5baafc0b8ba91d6a8bffb7a9b 100644 (file)
@@ -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