Menu

#8 Alias fails with DBDocRoot

WontFix
None
Medium
Other
2017-02-24
2013-02-10
Anonymous
No

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.

Related

Tickets: #6

Discussion

  • Anonymous

    Anonymous - 2013-02-11

    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".

     
  • Anonymous

    Anonymous - 2013-02-11

    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.

     
  • Anonymous

    Anonymous - 2013-02-12

    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: #6

  • Tom Donovan

    Tom Donovan - 2017-02-24
    • Description has changed:

    Diff:

    
    
    • status: Accepted --> WontFix
    • assigned_to: Tom Donovan
    • OpSys: -->
    • Type: Defect --> Other
     

Log in to post a comment.

MongoDB Logo MongoDB
Gen AI apps are built with MongoDB Atlas
Atlas offers built-in vector search and global availability across 125+ regions. Start building AI apps faster, all in one place.