Disabling Passenger built-in error handler

Overview

Passenger provides a user-friendly, on-screen error handler to assist debugging a Python/Ruby/Node.js application. During production, however, this may result in unnecessary and possibly dangerous information disclosure. You can turn off Passenger’s built-in logger and use Apache’s generic error handler by adding the following line to your .htaccess file located within the public/ folder of your app:

PassengerErrorOverride On

Errors can then be viewed through /var/log/httpd/passenger.log

Error message generated when Passenger is set to handle error messages (default).

Error message generated when Passenger is set to handle error messages (default).

Generic Apache error handler when PassengerErrorOverride is set to Off.

Generic Apache error handler when PassengerErrorOverride is set to Off.

Leave a Reply