Hi
On some case if an user try to override ErroDocument feature in its .htacess, As ErrorDocument 404 /404.php
Any wrong url with php extension will be catch by fpm and not errordocument, as we have set a <FilesMatch \.php$> on Virtualhost. This directive as precedence about .htaccess
Looks natural to change this behavior and we have two options to change fpm template :
<FilesMatch \.php$>
<If \"-f %{REQUEST_FILENAME}\">
SetHandler "proxy:unix:/run/php/php7.3-user.sock|fcgi://localhost"
</If>
</FilesMatch>
ProxyErrorOverride On
ProxyErrorOverride looks easier, but I'm not sure about errodocument managed directly by an CMS.
If test looks more accurate but could impact performance.
To discuss before provide any global solution
Hi
On some case if an user try to override ErroDocument feature in its .htacess, As
ErrorDocument 404 /404.phpAny wrong url with php extension will be catch by fpm and not errordocument, as we have set a
<FilesMatch \.php$>on Virtualhost. This directive as precedence about .htaccessLooks natural to change this behavior and we have two options to change fpm template :
ProxyErrorOverride OnProxyErrorOverride looks easier, but I'm not sure about errodocument managed directly by an CMS.
If test looks more accurate but could impact performance.
To discuss before provide any global solution