diff options
author | ponce <matteo.bernardini@gmail.com> | 2011-07-03 13:39:37 -0400 |
---|---|---|
committer | Niels Horn <niels.horn@slackbuilds.org> | 2011-07-14 21:54:01 -0300 |
commit | 769dadaf444a25834210f5f88b222913e9d7f92f (patch) | |
tree | 51c6df74f30dc71ffb23404dc027cf1d92cf4db0 /development/cgit/config | |
parent | 8f35cc6ad9a9a6d52b6fc971dabe0feb72798a73 (diff) |
development/cgit: Added (web frontend for git repositories)
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'development/cgit/config')
-rw-r--r-- | development/cgit/config/cgit-httpd.conf | 44 | ||||
-rw-r--r-- | development/cgit/config/cgit-lighttpd.conf | 20 | ||||
-rw-r--r-- | development/cgit/config/cgit.conf | 2 | ||||
-rw-r--r-- | development/cgit/config/cgitrc.sample | 22 |
4 files changed, 88 insertions, 0 deletions
diff --git a/development/cgit/config/cgit-httpd.conf b/development/cgit/config/cgit-httpd.conf new file mode 100644 index 0000000000000..a579174fd0666 --- /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 + +<Directory /var/www/cgi-bin> + AllowOverride None + Order allow,deny + Allow from all +</Directory> + +## 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/ +#<Location /cgit/cgit.cgi> +# Options FollowSymlinks ExecCGI +# Allow from All +#</Location> +#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: +<VirtualHost *:80> + ServerName cgit.my.domain + SetEnv CGIT_CONFIG /etc/cgitrc + Options FollowSymlinks ExecCGI + DirectoryIndex cgit.cgi + DocumentRoot /var/www/cgi-bin + <Location /> + Options ExecCGI + Allow from All + </Location> + RewriteEngine on + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteRule ^(.*)$ /cgit.cgi?url=$1 [L,QSA] +</VirtualHost> diff --git a/development/cgit/config/cgit-lighttpd.conf b/development/cgit/config/cgit-lighttpd.conf new file mode 100644 index 0000000000000..fc49e5763f557 --- /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 0000000000000..615c7efe970ac --- /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 0000000000000..29d3981a55b89 --- /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 |