Un site en Rails sous Lighttpd (avec mod_fastcgi)

30 Nov 2007

server.modules = (
    [...],
    "mod_fastcgi"
)

static-file.exclude-extensions = ( [...], ".fcgi" )

fastcgi.server             = (
    [...],
    ".fcgi" => (
        "localhost" => (
        "socket" => "/tmp/rails-fastcgi.socket",
        "bin-path" => "/usr/local/bin/rails",
        "min-procs" => 1,
        "max-procs" => 10
        )
    )
)

$HTTP["host"] =~ "^(www.)?mywebsite.net" {
    server.document-root = "/home/mickael/www/public/"
    accesslog.filename = "/home/mickael/log/access.log"
    server.indexfiles = ( "dispatch.fcgi", "index.html" )
    server.error-handler-404 = "/dispatch.fcgi"
    fastcgi.server = (
        ".fcgi" => (
            "localhost" => (
                "socket" => "/tmp/rails-fastcgi.socket",
                "bin-path" => "/home/mickael/www/public/dispatch.fcgi",
                "min-procs" => 1,
                "max_procs" => 2
            )
        )
    )
}