From 769dadaf444a25834210f5f88b222913e9d7f92f Mon Sep 17 00:00:00 2001 From: ponce Date: Sun, 3 Jul 2011 13:39:37 -0400 Subject: development/cgit: Added (web frontend for git repositories) Signed-off-by: dsomero --- development/cgit/config/cgit-httpd.conf | 44 ++++++++++++++++++++++++++++++ development/cgit/config/cgit-lighttpd.conf | 20 ++++++++++++++ development/cgit/config/cgit.conf | 2 ++ development/cgit/config/cgitrc.sample | 22 +++++++++++++++ 4 files changed, 88 insertions(+) create mode 100644 development/cgit/config/cgit-httpd.conf create mode 100644 development/cgit/config/cgit-lighttpd.conf create mode 100644 development/cgit/config/cgit.conf create mode 100644 development/cgit/config/cgitrc.sample (limited to 'development/cgit/config') diff --git a/development/cgit/config/cgit-httpd.conf b/development/cgit/config/cgit-httpd.conf new file mode 100644 index 0000000000..a579174fd0 --- /dev/null +++ b/development/cgit/config/cgit-httpd.conf @@ -0,0 +1,44 @@ +# sample folder and virtual host configurations for httpd. +# edit, move it to /etc/httpd/extra and include it in +# /etc/httpd/httpd.conf with a line +# +# Include /etc/httpd/extra/cgit-httpd.conf +# +# uncomment also the line +# +# AddHandler cgi-script .cgi + + + AllowOverride None + Order allow,deny + Allow from all + + +## Version 1 (default): under /cgi-bin/cgit.cgi address +#ScriptAlias /cgi-bin/cgit.cgi /var/www/cgi-bin/cgit.cgi +#Alias /cgit/ /var/www/cgi-bin/ +# +# Options FollowSymlinks ExecCGI +# Allow from All +# +#RewriteEngine on +#RewriteCond %{REQUEST_FILENAME} !-f +#RewriteCond %{REQUEST_FILENAME} !-d +#RewriteRule ^/cgit/(.*)$ /cgit/cgit.cgi?url=$1 [L,QSA] + +# Version 2: cgit as a handler to whole vhost: + + ServerName cgit.my.domain + SetEnv CGIT_CONFIG /etc/cgitrc + Options FollowSymlinks ExecCGI + DirectoryIndex cgit.cgi + DocumentRoot /var/www/cgi-bin + + Options ExecCGI + Allow from All + + RewriteEngine on + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteRule ^(.*)$ /cgit.cgi?url=$1 [L,QSA] + diff --git a/development/cgit/config/cgit-lighttpd.conf b/development/cgit/config/cgit-lighttpd.conf new file mode 100644 index 0000000000..fc49e5763f --- /dev/null +++ b/development/cgit/config/cgit-lighttpd.conf @@ -0,0 +1,20 @@ +# sample virtual host configuration for lighttpd. +# edit, move to /etc/lighttpd/ and include it in /etc/lighttpd/lighttpd.conf +# with a line +# +# include "cgit-lighttpd.conf" + +$HTTP["host"] == "cgit.my.domain" { + alias.url = ( + "/static/" => "/var/www/cgi-bin/", + "/cgit.cgi" => "/var/www/cgi-bin/cgit.cgi", + ) + url.rewrite-once = ( + "^/static/.*$" => "$0", + "^/([^?/]+/[^?]*)?(?:\?(.*))?$" => "/cgit.cgi?url=$1&$2", + ) + cgi.assign = ( + "/var/www/cgi-bin/cgit.cgi" => "", + ) +} + diff --git a/development/cgit/config/cgit.conf b/development/cgit/config/cgit.conf new file mode 100644 index 0000000000..615c7efe97 --- /dev/null +++ b/development/cgit/config/cgit.conf @@ -0,0 +1,2 @@ +CGIT_SCRIPT_PATH = /var/www/cgi-bin +CACHE_ROOT = /var/cache/cgit diff --git a/development/cgit/config/cgitrc.sample b/development/cgit/config/cgitrc.sample new file mode 100644 index 0000000000..29d3981a55 --- /dev/null +++ b/development/cgit/config/cgitrc.sample @@ -0,0 +1,22 @@ +# sample /etc/cgitrc file: two repos are defined +# you can see a demo here http://cgit.ponce.cc/ + +root-title=ponce's repository browser +root-desc=a fast interface to these git repositories +virtual-root=/ +snapshots=tar.gz + +#css=/static/cgit.css +#logo=/static/cgit.png + +# repository specific data +repo.url=slackbuilds +repo.path=/path/to/repo/.git +repo.desc=slackbuilds.org fork for slackware-current +repo.owner=my.address _at_ my.isp +# the default branch here is set to current (default if omitted is master) +repo.defbranch=current +repo.clone-url=git://github.com/Ponce/slackbuilds.git + +# if you need to display other repositories you can more config blocks +# like the one above -- cgit v1.2.3