How do you set PassengerFriendlyErrorPages in .htaccess?

willnode asked:

I have a working server setup with Apache running with Phusion Passenger. Because the friendly error page turned off by default (good for production apps), it’s hard to spot the error when it’s happen.

I want to enable PassengerFriendlyErrorPages specific for some sites, using .htaccess:

PassengerFriendlyErrorPages on

But then Apache results in 500 error:

/home/demo/public_html/.htaccess: PassengerFriendlyErrorPages not allowed here

Is there something I miss? (note the documentation says the context can be in .htaccess so it made me confused)

PS: httpd.conf works, though it’s not my option here.

My answer:


The <Directory> containing the .htaccess file must itself allow this, with AllowOverride Options.


View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.