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 (Edit: still same error):
/home/area51/public_html/public/.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.
EDIT: My apache config, as I don't know why it still not working. (Yes I'm aware about systemctl restart httpd
)
I put the .htaccess
in /home/area51/public_html/public
<VirtualHost 10.0.1.6:80>
SuexecUserGroup "#1083" "#1083"
ServerName area51.dom.my.id
ServerAlias www.area51.dom.my.id
DocumentRoot /home/area51/public_html/public
ErrorLog /var/log/virtualmin/area51.dom.my.id_error_log
CustomLog /var/log/virtualmin/area51.dom.my.id_access_log combined
DirectoryIndex index.html index.php
<Directory /home/area51/public_html/public>
RewriteEngine On
allow from all
AllowOverride All
Require all granted
</Directory>
RemoveHandler .php
RemoveHandler .php7.2
<FilesMatch \.php$>
SetHandler proxy:fcgi://localhost:8014
</FilesMatch>
</VirtualHost>