Code Monkey home page Code Monkey logo

Comments (13)

FooBarWidget avatar FooBarWidget commented on May 25, 2024

From honglilai on April 22, 2008 10:10:18

Summary: mod_alias is incompatible (Alias directive ignored for subdirectory based apps)
Labels: -Type-Defect Type-Enhancement

from passenger.

FooBarWidget avatar FooBarWidget commented on May 25, 2024

From honglilai on April 22, 2008 10:11:03

Labels: ConflictingModule

from passenger.

FooBarWidget avatar FooBarWidget commented on May 25, 2024

From deanholdren on September 12, 2008 11:26:37

Here is a working patch (with tests) to add mod_alias support.

Basically it replaces the body of getPublicDirectory with a sub request to get the filename for the BaseURI,
which goes through the Alias rules.

Obviously, I'm worried about performance, though, doing a subrequest inside this method. I'm new to Apache
modules, so I was hoping someone could take this and add some sort of caching, maybe a persistent table of
BaseURIs to filename, it really only needs to calculate this once per app.

This should add support for any module that uses the translate_name hook.

Attachment: mod_alias.patch

from passenger.

FooBarWidget avatar FooBarWidget commented on May 25, 2024

From honglilai on September 22, 2008 05:03:25

Thanks for the patch. I haven't had the chance to take a look at it yet but it's on
my todo list.

I invite anyone who cares to review this patch and test whether it works, and to post
a +1 if it does.

Labels: -Type-Enhancement Type-Patch Milestone-2.1.0

from passenger.

FooBarWidget avatar FooBarWidget commented on May 25, 2024

From margusk on September 24, 2008 02:38:21

Submitting the patch here also (originally from https://code.google.com/p/phusion-passenger/issues/detail?id=136 )

Attachment: patch2.zip

from passenger.

FooBarWidget avatar FooBarWidget commented on May 25, 2024

From nirvdrum on February 06, 2009 17:53:16

I've updated the original author's patch to work with the latest git master (as of
Feb. 6, 2009). I tried to address the second patch author's concerns about
performing a sub-URI request on every request. What I do instead is assume that
mod_alias isn't used at first and stat the path to see if it exists. If it doesn't
then I proceed with the sub-URI request.

The downside is that the path is stat'd twice: once here, and once in Hooks.cpp when
getting the canonical path. I don't see a huge performance ramification though.
And it avoids the change in directives and otherwise incompatibility with mod_alias
that the second author proposed.

Also available on GitHub: http://github.com/nirvdrum/passenger/commit/8f52c36380e267ee773452dcc19964a61559867a It would be great if this could be merged in. Or, if not, an explanation why. I
spent a lot of time realizing I needed to actually add a symlink and then had to add
a cap recipe to create said symlink.

Attachment: mod_alias.patch

from passenger.

FooBarWidget avatar FooBarWidget commented on May 25, 2024

From honglilai on November 18, 2009 01:55:34

Labels: -Milestone-2.1.0 Milestone-3.0.0

from passenger.

FooBarWidget avatar FooBarWidget commented on May 25, 2024

From mikelococo on October 03, 2010 11:56:29

Just a me-too comment to confirm that folks are getting bitten by this issue during deployments.

  1. A doc update should really be done. I read the guide, including the conflicting modules section [1] and found no mention of mod_alias conflicts. I then lost half a day troubleshooting before finding this bug.
  2. Pushing these patches through to fix the conflict would be much preferred, though.

As justfication, I'll note that mod_alias is very widely used. Both RH and Debian-based distros are now packaging web-apps in /usr/share/appname. This means that if you're using a packaged application to serve your DocumentRoot (for example a CMS like wordpress or Drupal or whatever) then your DocumentRoot will be /usr/share/appname where files are supposed to be managed by the package manager. In such cases, using symlinks feels very awkward and aliases are preferable.

[1] http://www.modrails.com/documentation/Users%20guide%20Apache.html#conflicting_apache_modules

from passenger.

FooBarWidget avatar FooBarWidget commented on May 25, 2024

From Sergey.Zhuga on May 02, 2011 16:17:30

Why can't you disable the Passenger for alias that you need? Like that:

<Location /alias>
PassengerEnabled off

Alias /alias /path/to/alias/files

<Directory "/path/to/alias/files">
...

from passenger.

FooBarWidget avatar FooBarWidget commented on May 25, 2024

From honglilai on March 02, 2013 14:58:01

This issue has persisted for long enough. I believe that in the future we should get rid of the old RailsBaseURI behavior and let people use it in combination with mod_alias. It's more typing work but probably also more intuitive.

Labels: -Milestone-3.0.0

from passenger.

FooBarWidget avatar FooBarWidget commented on May 25, 2024

From honglilai on November 15, 2013 07:27:29

Sorry for the long wait guys. This issue has been fixed for a while now, though I'm not sure in which version. I tested with 4.0.24 and it works. I've updated the manual with correct instructions on how to use Alias to do sub-URI deploys: http://www.modrails.com/documentation/Users%20guide%20Apache.html#deploying_rack_to_sub_uri

Status: Fixed
Labels: Milestone-4.0.24

from passenger.

FooBarWidget avatar FooBarWidget commented on May 25, 2024

From honglilai on November 15, 2013 07:28:15

Issue 703 has been merged into this issue.

from passenger.

FooBarWidget avatar FooBarWidget commented on May 25, 2024

From honglilai on November 15, 2013 07:28:30

Issue 734 has been merged into this issue.

from passenger.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.