Comments (13)
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.
From honglilai on April 22, 2008 10:11:03
Labels: ConflictingModule
from passenger.
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.
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.
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.
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.
From honglilai on November 18, 2009 01:55:34
Labels: -Milestone-2.1.0 Milestone-3.0.0
from passenger.
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.
- 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.
- 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.
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.
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.
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.
From honglilai on November 15, 2013 07:28:15
Issue 703 has been merged into this issue.
from passenger.
From honglilai on November 15, 2013 07:28:30
Issue 734 has been merged into this issue.
from passenger.
Related Issues (20)
- Automation: How to communicate a selection via <space> as required for `assenger-config validate-install`
- Passenger Socket IO - Apache Return Error 101 HOT 1
- Debian 12 (bookworm) support HOT 1
- Ruby Permissions Issue HOT 12
- Unknown directive: "passenger_enabled" in nginx.conf server block HOT 6
- Security update fails and Ubuntu APT ignores the APT link HOT 2
- IOError: stream closed in another thread HOT 2
- Would be great to have a 6.0.19 release! HOT 2
- DeprecationWarning in wsgi-loader.py: imp module is deprecated in favor of importlib HOT 1
- Issues with cookies when using latest Passenger and Rack 3 (w/ Ruby on Rails 7.1) HOT 20
- mod_passenger dependency issues HOT 1
- Feature Request - Log crashes to stderr instead of files HOT 2
- Fails to recognise Nestjs app start HOT 2
- Uninitialized constant Rackup::Handler::Rack (NameError) [Rack 3] HOT 1
- Error loading libssl.so.1.1 when starting Phusion Passenger Standalone HOT 1
- Bad Signing Key for Debian Bullseye HOT 3
- Restarting doesn't remove deleted environment variables in rbenv-vars HOT 1
- Hooks not being registered HOT 4
- String conversion while handling native Ruby support lib LoadErrors can cause errors HOT 1
- Feature request: Ability to configure path to error renderer template
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from passenger.