New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to deploy as sub URI as seen in doc #1158
Comments
This is still an issue. The documented way to deploy to a sub-uri does not work as documented here: |
@thoughtafter Can you describe your issue in more detail? How exactly does your configuration look like, and what behavior do you observe? Any error messages? |
This works, as does creating a symlink as described above:
This, which is the way it should work according to the documentation, using a location directive, does not work:
Error: "The requested URL /app/ was not found on this server." |
@thoughtafter both your configs work for me (without symlinking anything) on Ubuntu 14.04 with Apache 2.4 and Passenger 5. What system did you test on? |
I have this setup in my virtualhost and seems to be working fine, maybe it can help.
|
This is also Ubuntu 14.04 with Apache 2.4 and Passenger 5.
So the rails application is clearly being created, but it's not accessible at the location path, nor at the root path. |
Works:
By adding location block the app is created but RAILS_RELATIVE_URL_ROOT is not set in the env and thus /demo is attempted to be interpretted as a route and the error is ActionController::RoutingError.
In this example, analogous to my post above, PassengerEnabled has been moved into the Location block. This causes apache to fail to forward to passenger and the error is an apache 404:
So my example above failed because of this last case, that PassengerEnabled doesn't work within a Location block. However, now it is case 2 that interests me, why PassengerBaseURI seems to fail when within a location block. |
Another piece of info: Bugs:
|
@thoughtafter hmm, I copy pasted case 1 and it's working for me (I only changed PassengerAppEnv from demo to development). My app is accessible at localhost/demo/. As for case 2, it's best to paste the exact config when reporting, so that we would have seen you were using |
Speaking of which, maybe I should get rid of PassengerHighPerformance altogether. It was originally written as an optimization in benchmarks, but everybody who benchmarks Passenger nowadays would either use the Nginx integration mode or the Standalone mode with builtin engine. I regularly see people using PassengerHighPerformance while not reading the caveats. |
PassengerHighPerformance should probably be removed if it interferes with mod_alias. At the very least that should be added to known problematic modules along with mod_rewrite and mod_autoindex. Also, bug 1 also appears to be due to PassengerHighPerformance interfering with mod_alias in a way that prevents PassengerEnabled from working properly. Obviously once I realized this system had additional passenger configuration set in a non-obvious included file my plan was to post that, but before doing so I started disabling the options one by one until I disabled PassengerHighPerformance and found that resolved the issues. I agree that people should look for such things not just by grepping for the passenger options but also for include statements that may be outside the apache directory, which is what bit me in this case. I apologize for not having better information sooner. |
@thoughtafter that explains it indeed, no worries. I should also remember to ask about checking for additional config files when it "just works" for me. I'll close this issue, since the docs have changed and it doesn't appear reproducible in 5.x. |
From adrianlzt on February 10, 2014 16:24:51
What steps will reproduce the problem? 1. Follow doc until point 4.3 ( http://www.modrails.com/documentation/Users%20guide%20Apache.html#_deploying_a_rack_based_ruby_application_including_rails_gt_3 )
2. Apache returns 403 What is the expected output? What do you see instead? "Hello world" What version of Phusion Passenger are you using? Which version of Rails? On what operating system? Rails 4.0.2
Apache/2.2.1
Phusion_Passenger/4.0.37
CentOS 6.4 Please provide any additional information below. Using this configuration file por apache:
RailsBaseURI /subapp
<Directory /websites/rack/public>
Allow from all
Options -MultiViews
RailsEnv production
And creating this soft link:
ln -s /websites/rack/public /var/www/html/subapp
Works correctly
Original issue: http://code.google.com/p/phusion-passenger/issues/detail?id=1059
The text was updated successfully, but these errors were encountered: