Installing using Apache rewrites

Stephen Paul Weber singpolyma at singpolyma.net
Thu Aug 4 17:14:18 CEST 2011


I'm trying to set cgit up on a Debian system using Apache2 with rewrites.  I 
have this:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(?!\/*cgi-bin)\/*(.*) /cgi-bin/cgit.cgi/$1 [PT,L]

ScriptAlias /cgi-bin/ /usr/local/lib/cgi-bin/cgit/
<Directory "/usr/local/lib/cgi-bin/cgit/">
	AllowOverride None
	Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
	Order allow,deny
	Allow from all
</Directory>

It's working except for:
1) The main page does not work.  No matter what rewrites I add I can't seem 
    to make the main page come up
2) The static CSS/image resources are not being loaded, but I think I just 
    need another Alias for them probably
3) Links in the app still link to /cgi-bin/cgit.cgi/, which is ugly

Any thoughts on how to fix these things?

-- 
Stephen Paul Weber, @singpolyma
See <http://singpolyma.net> for how I prefer to be contacted
edition right joseph




More information about the CGit mailing list