Troubles using special characters in links with lighttpd

David Demelier demelier.david at gmail.com
Fri May 15 14:08:23 CEST 2015


Hello,

I'm trying to setup cgit with lighttpd, this is my actual
configuration :

$HTTP["host"] == "git.malikania.fr" {
        alias.url = (
                "/static/" => "/usr/local/www/cgit/",
                "/cgit.cgi" => "/usr/local/www/cgit/cgit.cgi",
        )
        url.rewrite-once =
(                                                                                                                                                                     
                "^/static/.*$" => "$0",
                "^/([^?/]+/[^?]*)?(?:\?(.*))?$" => "/cgit.cgi?url=$1&
$2",
        )
        server.document-root = "/usr/local/www/cgit"
        cgi.assign = ( ".cgi" => "/usr/local/www/cgit/cgit.cgi" )
}


I have found several documents about that, this is mainly written from
[1].

Almost everythin works, except directories that contains special
characters that should be escaped. For example, I have a directory named
"C++", and this one will not work from the rewrite rule:

http://git.malikania.fr/code/tree/

If you click on C++, you get an empty directory, however, the resolved
link with appropriate characters works fine:

http://git.malikania.fr/code/tree/C%2b%2b

I have no idea how to fix that, is it a lighttpd problem or a cgit
configuration missing?

Regards,
David.

[1]:
https://github.com/willysr/SlackHacks/blob/master/SlackBuilds/cgit/config/cgit-lighttpd.conf



More information about the CGit mailing list