Originally created by: ashishpa...@gmail.com
Originally owned by: Thomas.D...@gmail.com
What steps will reproduce the problem?
1. Define an alias pointing to a directory outside the original Document Root
2. Call DBDocRoot to set the new Document Root.
3. Serving a file through the alias fails.
What version of the product are you using? On what operating system?
Windows 7 / Apache 2.2.21
Please provide any additional information below.
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: Thomas.D...@gmail.com
I will configure Apache 2.2 and attempt to verify this.
When you say "Serving a file through the alias fails", could you explain more fully what you mean? Did Apache fail to find the file where the Alias said it should?
When an Apache Alias directive applies to a request, the Alias determines where the file is. No document root (neither the original per DocumentRoot, nor the replacement supplied by a DBDocRoot query) applies to the request.
See: http://httpd.apache.org/docs/2.2/mod/mod_alias.html#alias
"Alias ... allows documents to be stored in the local filesystem other than under the DocumentRoot".
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: ashishpa...@gmail.com
Yes, it could not find the file at the location where the Alias said it should. I tried it a couple of times, by commenting out the DBDocRoot directive. When its commented out the alias works, as soon as I uncomment it, I get an error.
View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: Thomas.D...@gmail.com
Confirmed with httpd-2.2.21 on Windows.
Similar to issue #6 - interaction with other modules which also translate URIs to filenames. There is no practical way to influence all other name-translation modules in a predictable way.
The most practical fix is to disable any docroot lookup if any other module (e.g. mod_rewrite, mod_alias, mod_proxy, mod_userdir, mod_vhost_alias, etc.) has already set a directory or a full path for the request. In other words - mod_vhost_dbd will run last, and will only perform a query and set a docroot if no other module has already selected a file path for the request.
Testing code change (small/easy) and writing doc change (bigger/harder). Unfortunately, this change may break some existing apps which depend on interaction between mod_vhost_dbd and mod_rewrite.
Summary: Alias fails with DBDocRoot
Owner: Thomas.D...@gmail.com
Status: Accepted
Related
Tickets:
#6View and moderate all "tickets Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Tickets"
Originally posted by: Thomas.D...@gmail.com
Issue 6 has been merged into this issue.
Related
Tickets:
#6Diff: