Passenger 500 Error Page
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn passenger friendly error pages apache more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags
Passengerfriendlyerrorpages
Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, passenger friendly error pages nginx helping each other. Join them; it only takes a minute: Sign up Passenger+Nginx show custom 500 page up vote 3 down vote favorite 1 I'm using Rails 3.2 with passenger+nginx. I want to display nice custom 500 page
Passenger Nginx Config
when the db server is down. I want to show something when my rails app cannot be started. Here is my nginx: server { listen 80; server_name localhost; root /var/www/store/public; error_page 500 /500.html; # root location / { passenger_enabled on; rails_env production; passenger_use_global_queue on; } } The above configuration doesn't work at all. When it happens, it shows only: Internal Server Error (500) Any idea? ruby-on-rails-3 nginx passenger share|improve this question asked Oct 12 '12 at phusion passenger 10:01 Chamnap 2,74212137 1 I would assume that passenger delivers this error page and nginx is not able to intercept it. Have you tried replacing the error page inside of passenger? That might work in this case. –mariow Jan 3 '13 at 18:28 I can't figure out where is the error page of passenger. Do you know that? –Chamnap Jan 4 '13 at 3:28 2 Unfortunately not as I don't regularly work with Passenger.. I just stumbled over this link, maybe that helps: groups.google.com/d/msg/phusion-passenger/2KLI8Yqnoaw/… –mariow Jan 4 '13 at 11:29 Thanks, @mariow. –Chamnap Jan 5 '13 at 8:07 @Chamnap, did you ever figure this out? I am running into the same issue. –Rafael May 16 '13 at 18:21 add a comment| 3 Answers 3 active oldest votes up vote 2 down vote accepted Phusion Passenger author here. Use passenger_intercept_errors off. share|improve this answer answered Sep 26 '14 at 7:50 Hongli 12.4k75585 That's awesome. –Chamnap Sep 26 '14 at 15:15 add a comment| up vote 1 down vote mariow's link led me to the answer. The error files are in the templates folder. I use rvm, so my templates folder is at /home/forest.handford/.rvm/gems/ruby-2.0.0-p481/gems/passenger-4.0.50/resources/templates/ . Use find / -name templates | grep passenger to find yours. I'm changing undisclosed_error.html.template for my site, as it is the error
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up How to set a custom error page with passenger and apache up vote 0 down vote favorite I am using Capistrano,Apache 2 and Passenger to rollout my rails applications on a weekly basis, this works well. Recently I encountered an error where the passenger side of http://stackoverflow.com/questions/12856648/passengernginx-show-custom-500-page the deployment exposed my stack trace and my server information, I was able to do a rollback and it was only exposed for a moment, but a moment is still venerable. So: How do I disable this?, I have see this so that might answer that question but it leads to more: I want to use some Rails Custom error pages to display errors for all the 500's and the 404, essentially if passenger explodes or you encounter a broken route (so a rails error) I want http://stackoverflow.com/questions/26368302/how-to-set-a-custom-error-page-with-passenger-and-apache you to see a custom error page, not a rails error page, not a passenger error page.v I was reading this documentation on passenger and apache but it didn't provide any examples of how you might do this. My goal is that if for some reason you encounter a rails error or a deployment goes wrong that you don't see the rails stack trace or the passenger stack trace. that you see, instead, a custom error page. ruby-on-rails apache passenger share|improve this question asked Oct 14 '14 at 18:58 SeekingTruth 245315 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote Nice thing to do during a deployment process is to redirect any requests to a static page saying "We'll be back in 10 minutes". You can follow this answer to do it manually or use a gem capistrano/maintenance. The idea is that you'd have a capistrano task. By running this task a static html page is being created on the server in public directory. Apache is configured to watch whether this page exists, and if it does - all requests are redirected to it with 503 status. share|improve this answer answered Oct 14 '14 at 21:05 Michael Radionov 5,14911643 that doesnt help though if you are just wondering through the app and then boom you hit a route not found rails stack trace error. I want you to see an error page but not a stack trace page. –SeekingTruth Oct 14 '14 at 22:06 That has got nothi
Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the http://serverfault.com/questions/75811/customer-passenger-error-pages company Business Learn more about hiring developers or posting ads with us Server Fault Questions Tags Users Badges Unanswered Ask Question _ Server Fault is a question and answer site for system and network administrators. Join them; https://groups.google.com/d/topic/phusion-passenger/67U9hEU_Bm4 it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Customer Passenger Error Pages up vote 2 error page down vote favorite How do you replace the Passenger Application failed to load error messages. They are lovely, but I'd rather not display them when we move our application to production. It'd be better to just show them on the dev box and maintenance page on the live site. For clarification, this is the call stack page passenger displays when your rails app fails to load. I'd rather not modify the passenger template files passenger friendly error directly. Passenger doesn't seem to be respecting: ErrorDocument 500 /500.html apache-2.2 ruby-on-rails phusion-passenger share|improve this question asked Oct 19 '09 at 7:08 Adam 161115 add a comment| 3 Answers 3 active oldest votes up vote 2 down vote You have to include the Passenger directive: PassengerFriendlyErrorPages off additionally to the ErrorDocument directives for Apache that you want, in order to disable the Passenger error page. share|improve this answer answered Jul 12 '11 at 18:52 Carlos Paramio 1212 add a comment| up vote 1 down vote If it's the 500 error you're getting / wanting to show something different, you should be able to just change the 500.html page in your rails app under the public folder. Sorry if you already, but that sounds like what you're trying to change. share|improve this answer answered Oct 24 '09 at 23:52 Stephen Korecky add a comment| up vote 1 down vote /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/templates (Your lib/gem path may vary.) share|improve this answer answered Nov 2 '09 at 12:52 Teflon Ted 300517 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and term
GoogleВойтиСкрытые поляПоиск групп или сообщений