Project

General

Profile

Actions

Bug #1568

closed

alias fails for "base-url" if the left side has a trailing slash

Added by moo about 16 years ago. Updated almost 8 years ago.

Status:
Obsolete
Priority:
Normal
Category:
mod_indexfile
Target version:
ASK QUESTIONS IN Forums:

Description

config:


server.modules                 = (
    "mod_redirect",
    "mod_rewrite",
    "mod_access",
    "mod_alias",
    "mod_indexfile",
    "mod_status",
    "mod_setenv",
    "mod_uploadprogress",
    "mod_deflate",
    "mod_magnet",
    "mod_webdav",
    "mod_dirlisting",
    "mod_cgi",
    "mod_proxy_core",
    "mod_proxy_backend_fastcgi",
    "mod_proxy_backend_http",
    "mod_rrdtool",
    "mod_accesslog",
    "mod_cgi",
    "mod_staticfile",
    "mod_chunked",
    # 21
)

$HTTP["host"] == "dev" {
    alias.url = (
        "/xcache-admin/" => "/home/moo/src/xcache/trunk/admin/",
    )
    $HTTP["url"] =~ "^/xcache-admin/" {
        # block 7
        $PHYSICAL["existing-path"] =~ "\.(php|asp)$" {
            # block 8
            proxy-core.backends = ("unix:/var/run/lighttpd/php.socket")
            proxy-core.protocol = "fastcgi" 

        }
    }
}

request to: http://dev/xcache-admin/ (which failed)

log:


response.c.227: (trace) -- splitting Request-URI
response.c.228: (trace) Request-URI  : /xcache-admin/
response.c.229: (trace) URI-scheme   : http
response.c.230: (trace) URI-authority: dev
response.c.231: (trace) URI-path     : /xcache-admin/
response.c.232: (trace) URI-query    : (null)
response.c.286: (trace) -- sanitizing URI
response.c.287: (trace) URI-path     : /xcache-admin/
mod_access.c.138: (trace) -- handling file in mod_access
mod_webdav.c.461: (trace) -- skipping /xcache-admin/ in mod_webdav, not enabled
response.c.403: (trace) -- before doc_root
response.c.404: (trace) Doc-Root     : /var/www/localhost/htdocs
response.c.405: (trace) Rel-Path     : /xcache-admin/
response.c.406: (trace) Path         : /var/www/localhost/htdocs/xcache-admin
response.c.459: (trace) -- after doc_root
response.c.460: (trace) Doc-Root     : /var/www/localhost/htdocs
response.c.461: (trace) Rel-Path     : /xcache-admin/
response.c.462: (trace) Path         : /var/www/localhost/htdocs/xcache-admin
response.c.481: (trace) -- logical -> physical
response.c.482: (trace) Doc-Root     : /var/www/localhost/htdocs
response.c.483: (trace) Rel-Path     : /xcache-admin/
response.c.484: (trace) Path         : /var/www/localhost/htdocs/xcache-admin
response.c.502: (trace) -- handling physical path
response.c.503: (trace) Path         : /var/www/localhost/htdocs/xcache-admin
response.c.565: (trace) -- file not found
response.c.566: (trace) Path         : /var/www/localhost/htdocs/xcache-admin

request to: http://dev/xcache-admin/ (which is ok because mod_indexfile not not used here)

log:


response.c.227: (trace) -- splitting Request-URI
response.c.228: (trace) Request-URI  : /xcache-admin/index.php
response.c.229: (trace) URI-scheme   : http
response.c.230: (trace) URI-authority: dev
response.c.231: (trace) URI-path     : /xcache-admin/index.php
response.c.232: (trace) URI-query    : (null)
response.c.286: (trace) -- sanitizing URI
response.c.287: (trace) URI-path     : /xcache-admin/index.php
mod_access.c.138: (trace) -- handling file in mod_access
mod_webdav.c.461: (trace) -- skipping /xcache-admin/index.php in mod_webdav, not enabled
response.c.403: (trace) -- before doc_root
response.c.404: (trace) Doc-Root     : /var/www/localhost/htdocs
response.c.405: (trace) Rel-Path     : /xcache-admin/index.php
response.c.406: (trace) Path         : /var/www/localhost/htdocs/xcache-admin
response.c.459: (trace) -- after doc_root
response.c.460: (trace) Doc-Root     : /var/www/localhost/htdocs
response.c.461: (trace) Rel-Path     : /xcache-admin/index.php
response.c.462: (trace) Path         : /var/www/localhost/htdocs/xcache-admin/index.php
response.c.481: (trace) -- logical -> physical
response.c.482: (trace) Doc-Root     : /var/www/localhost/htdocs
response.c.483: (trace) Rel-Path     : /xcache-admin/index.php
response.c.484: (trace) Path         : /home/moo/src/xcache/trunk/admin/index.php
response.c.502: (trace) -- handling physical path
response.c.503: (trace) Path         : /home/moo/src/xcache/trunk/admin/index.php
response.c.511: (trace) -- file found
response.c.512: (trace) Path         : /home/moo/src/xcache/trunk/admin/index.php
response.c.664: (trace) -- handling subrequest
response.c.665: (trace) Path         : /home/moo/src/xcache/trunk/admin/index.php
mod_access.c.199: (trace) -- handling file in mod_access
mod_proxy_core.c.2173: (trace) handling it in mod_proxy_core: physical.path=/home/moo/src/xcache/trunk/admin/index.php
mod_staticfile.c.327: (trace) -- checking file for static file
response.c.676: (trace) -- subrequest finished
plugin.c.387: (trace) -- plugins_call_...: plugin 'mod_proxy_core' returns 4
plugin.c.387: (trace) -- plugins_call_...: plugin 'mod_proxy_core' returns 4
plugin.c.389: (trace) -- plugins_call_...: plugin 'mod_proxy_core' returns 4
Actions #1

Updated by stbuehler about 16 years ago

Try {{{
alias.url = (
"/xcache-admin" => "/home/moo/src/xcache/trunk/admin/",
)
}}}

Actions #2

Updated by moo about 16 years ago

thanks, that is the problem and workaround

Actions #3

Updated by gstrauss almost 8 years ago

  • Description updated (diff)
  • Assignee deleted (jan)
  • Priority changed from High to Normal
  • Missing in 1.5.x set to Yes

I don't think this is a bug.

FYI: mod_indexfile in lighttpd 1.4.x does not handle the request unless the URL ends in '/', and if the URL ends in '/' it will match the mod_alias directive that ends in '/'

Actions #4

Updated by gstrauss almost 8 years ago

  • Status changed from New to Obsolete
Actions

Also available in: Atom