Project

General

Profile

Actions

Bug #2284

closed

alias.url oddity

Added by Feh over 14 years ago. Updated over 14 years ago.

Status:
Invalid
Priority:
Normal
Category:
mod_alias
Target version:
-
ASK QUESTIONS IN Forums:

Description

Hi.

I just found this piece in my configuration file; it has been sitting there for some months and I didn't act on it:

$HTTP["host"] =~ "^git\.(plenz\.com|feh\.name)(:\d+)?$" {    
    setenv.add-environment = ( "GITWEB_CONFIG" => "/etc/lighttpd/gitweb.conf" )    
    # WHAT THE FUCK. If one alias key is a substring of a consecutive key, the
    # server fails to come up. WHO THE HELL DID INVENT THAT?!
    # Solution: Move "/" to last position.
    alias.url = (
        "/gitweb.css"       => "/usr/share/gitweb/gitweb.css",    
        "/git-logo.png"     => "/usr/share/gitweb/git-logo.png",
        "/git-favicon.png"  => "/usr/share/gitweb/git-favicon.png",
        "/" => "/usr/lib/cgi-bin/gitweb.cgi",
    )       
    $HTTP["url"] =~ "^/$" {    
        cgi.assign = ( "" => "" )    
    }       
}

I'm using lighttpd-1.4.19 (ssl) (Jan 31 2010 19:11:17) from Debian. The problem persists up to now. If I move the "/" => ... part to the top, the server fails to come up. Log message:

2011-01-03 02:44:15: (server.c.908) Configuration of plugins failed. Going down.

Julius

Actions #1

Updated by stbuehler over 14 years ago

  • Status changed from New to Invalid
  • Target version deleted (1.4.x)

And it will tell you why it failed. First match wins.

Actions #2

Updated by Feh over 14 years ago

Yes, "first match wins" is a perfectly reasonable choice. However, why should Lighty fail to start up at all? IMO, that's stupid engineering. A warning "directive #5 will never be reached" would be much better.

You might just fix this, it would probably save some people quite some time.

Thanks :-)

Actions

Also available in: Atom