PassengerPreStart, PassengerFriendlyErrorPages, and PassengerMinInstances - Three essential configuration parameters in Phusion Passenger 3.0
This setting will make your users and the Google bot happy by starting your application as soon as Apache/nginx starts:
When combined with the PassengerMinInstances parameter, Passenger will keep at least one instance alive at all times:
This setting makes hackers unhappy by disabling Passenger's default error page, which contains sensitive information:
Read passenger's Apache documentation for details.
Passenger's nginx module has a slightly different naming convention:
passenger_min_instances 1 passenger_friendly_error_pages on
Plus you need to put the passenger_pre_start inside an http directive. I just put them all in passenger.conf:
If you don't put it where it belongs, you'll get this error:
Starting nginx: [emerg]: "passenger_pre_start" directive is not allowed here in /opt/nginx/conf/sites/xxx.com:7
Read Passenger's nginx documentation for details.