Project

General

Profile

Howto cgit » History » Revision 3

Revision 2 (stbuehler, 2011-10-10 14:15) → Revision 3/4 (presbrey, 2011-10-31 21:01)

h1. Howto cgit 

 "cgit":http://hjemli.net/git/cgit/ is a web frontend for git repositories. You need a FastCGI CGI wrapper running (see [[Howto_CGI]]). 

 h2. Lighttpd config 

 <pre> 
 setup { 
	 module.load ( "mod_rewrite", "mod_fastcgi", "mod_vhost" ); 
 } 

 var.vhosts = []; 

 # ... 

 var.vhosts = var.vhosts + [ 
	 "cgit.lighttpd.net" => { 
		 if request.path =^ "/static/" { 
			 alias "/static/" => "/usr/share/cgit"; 
		 } else { 
			 rewrite "/cgit.cgi?url=%{enc:request.path}&%{request.query}"; 
			 docroot "/usr/lib/cgi-bin";         # docroot after rewrite ! 
			 fastcgi "unix:/var/run/lighttpd/sockets/www-cgi.sock"; 
		 } 
	 } 
 ]; 

 # ... 

 vhost.map var.vhosts; 
 </pre> 

 h2. /etc/cgitrc 

 <pre> 
 css=/static/cgit.css 
 virtual-root=/ 
 </pre>