Topic: lighttpd, fastcgi, strip-request-uri and anchoring

I have a config like this:

$HTTP["url"] =~ "^/vmail/" {
        server.document-root = "/home/chris/app/vmail/current/public/"
                alias.url = (   
                                "/vmail/" => "/home/chris/app/vmail/current/public/"
                server.error-handler-404 = "/vmail/dispatch.fcgi"
                fastcgi.server = ( ".fcgi" =>
                                ( ( "socket" => "/tmp/vmail.socket1",
                                    "max-procs" => 1,
                                    "bin-path" => "/home/chris/app/vmail/current/public/dispatch.fcgi",
                                    "strip-request-uri" => "/vmail/"

and I have a controller named vmailboxes (legacy table name, just trying to make it work for now).  It all worked in dev mode with script/server, and when it put it on lighttpd that controller would not work, log revealed it was trying to get "boxes/list".  So I had a suspicion strip-request-uri might be doing a global replace (like s/foo//g), and it did seem to work better with "/^vmail/", but I'm still not sure if this paramater is a path, or a regex.  I had some other issues with the other controllers after this, I'm still trying to pin down, probably related.

I had followed this when I set it up: … rails-apps

and I notice on the first app did have the trailing slash, and did not in the second.  Does anybody know if strip-request-uri supports real regexes with anchoring?  I could just rename this controller, but this could come up again, pretty easily if I just a get method on a form and a user has a variable that matches.

Re: lighttpd, fastcgi, strip-request-uri and anchoring

was scanning the source, and found it does append the trailing / if it's missing:


                if ('/' != host->strip_request_uri->ptr[host->strip_request_uri->used - 2]) {
                        /* fix the user-input to have / as last char */
                        buffer_append_string(host->strip_request_uri, "/");

for now it seems to be working as /^vmail$/, but I still don't think I have it right