Project

General

Profile

HTTP["url"] behave different than HTTP["host"]

Added by calebripley over 11 years ago

Hello,

i am using lighttpd 1.4.28 (ssl) within Ubuntu 12.04 LTS. I to use the following configuration. If I use $HTTP["host"] instead of HTTP["url"] everything works fine, but now i am forced to use an subfolder instead.

$HTTP["url"] =~ "^/wirelib($|/)" {
    server.document-root = "/home/wirelib/public" 
    fastcgi.server = (
        "/mysite.fcgi" => (
            "main" => (
                # Use host / port instead of socket for TCP fastcgi
                "host" => "127.0.0.1",
                "port" => 3001,
                "check-local" => "disable",
            )
        ),
    )
    alias.url = (
        "/static" => "/home/wirelib/WireLib2012/static/",
        "/media" => "/home/wirelib/virtenv/lib/python2.7/site-packages/django/contrib/admin/media/",
    )

    url.rewrite-once = (
        "^(/media.*)$" => "$1",
        "^/favicon\.ico$" => "/media/favicon.ico",
        "^(/.*)$" => "/mysite.fcgi$1",
    )
}

Why behaves $HTTP["host"] different to HTTP["url"]? And what is wrong in my configuration? The response to this configuration is just an 404. The fcgi is running and is working.

greetings
CalebRipley


Replies (1)

RE: HTTP["url"] behave different than HTTP["host"] - Added by nitrox over 11 years ago

Docs_ModRewrite

Glad we pointed this out for you!

regards,
nitrox

    (1-1/1)