Ticket #1568 (new defect)

Opened 5 months ago

Last modified 5 months ago

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

Reported by: moo Assigned to: jan
Priority: high Milestone: 1.5.0
Component: mod_indexfile Version: 1.5.x-svn
Severity: normal Keywords:
Cc: Blocking:
Need Feedback: 0

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

Attachments

Change History

02/20/2008 12:04:30 PM changed by stbuehler

  • summary changed from indexfile failed for alias'ed url to alias fails for "base-url" if the left side has a trailing slash.

Try {{{ alias.url = (

"/xcache-admin" => "/home/moo/src/xcache/trunk/admin/",

) }}}

02/21/2008 06:05:29 AM changed by moo

thanks, that is the problem and workaround


Add/Change #1568 (alias fails for "base-url" if the left side has a trailing slash)




Change Properties