Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing Passenger Default Error Page for Nginx

Currently if there's a problem launching a Rails app on our server, users are taken to a Passenger error page with an error like "Ruby (Rack) application could not be started".

Is it possible to customize this error page and display something else so users of a live site don't see this?

I'm using nginx for the server.

Thanks

like image 344
stringo0 Avatar asked Dec 01 '11 18:12

stringo0


1 Answers

The users guide contains some good information on the various config options. There is an option to disable the friendly error pages which is what I think you may be seeing.

To disable the startup error message specify the following line in your config file:

passenger_friendly_error_pages off

You can place this inside the http block, server block or location block. If you place it in the http block it would disable it by default for all of the virtual hosts on that server. You can however override the setting in the server block by placing the same option inside a http block.

like image 54
Devin M Avatar answered Sep 28 '22 18:09

Devin M