Project

General

Profile

cgit + rewrite not working

Added by anilsson over 14 years ago

Hi.

I'm having some trouble installing cgit v0.8.3 on my box.
I'm trying to serve cgit from http://url.com/git/ but it will only respond to http://url.com/git/cgit.cgi. When i go to /git or /git/ it just gives me a 404 (as it should, because it's not really a directory).
The alias.url and cgi.assign lines in the config do their respective jobs as intended, but I'm suspecting the server completely disregards the rewrite statements for some reason, as I've tried putting all sorts of stuff in and it completely disregards every last line. I've tried mod_rewrite on other dirs, so it's not corrupt or anything like that, and i get no errors in the log file.

Here is my lighttpd.conf: http://pastebin.com/f922d136
I'm running lighttpd version 1.4.19 on Debian Lenny (2.6.26-2-686)

Please help
Thanks


Replies (3)

RE: cgit + rewrite not working - Added by gauteh over 14 years ago

rewrite doesn't work from within $HTTP["url"]

http://forum.lighttpd.net/topic/1092#3028

- gaute

RE: cgit + rewrite not working - Added by gauteh over 14 years ago

i'm doing what you want by using only rewriting:

- note that im using a userdir, but should be trivial to use /git/ instead..

cgi.assign = (".cgi" => "" )

setenv.add-environment = (
"CGIT_CONFIG" => "/home/gaute/public_html/.cgitrc"
)
url.access-deny += ( ".cgitrc" )

url.rewrite-once = (
"^/~gaute/git/([^?/]+/[^?]*)?(?:\?(.*))?$" => "/cgit/cgit.cgi?url=$1&$2",
)

RE: cgit + rewrite not working - Added by anilsson over 14 years ago

Thanks mate, I got it working.
(If anyone has the same problem, here is what worked: http://pastebin.com/f1305ed26)

    (1-3/3)