Just upgraded to EA4 and provisioned with PHP71 and FPM. Generally worked though a few migration issues but noticed a bunch of errors in Apache log:
Errors where frequent but sporatic. Eventually determined they were caused by a request for *.php page that didnt exist. User would simply see 'file not found' instead of normal 404 exception page. Relavant directives in httpd.conf:
Presumably the proxy is getting the bad page request before my 404 exception coding can deal with it. How can I intercept these errors and perform proper 404 exception handling?
Code:
proxy_fcgi AH01071: Got error "Primary script unknown
Code:
<IfModule proxy_fcgi_module>
<FilesMatch \.(phtml|php[0-9]*)$>
SetHandler proxy:unix:/opt/cpanel/ea-php71/root/usr/var/run/php-fpm/e052082a6e5649ecf631cbb5460a54c838adacd4.sock|fcgi://my.domain.com/
</FilesMatch>
</IfModule>
Last edited by a moderator: