• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

"Custom error documents" not working when PHP run as a "FPM application"

vkleinhenz

New Pleskian
When PHP runs as a FPM application, the server displays "File not found." for missing files. Checking "Custom error documents", defining "ErrorDocument" in .htaccess or "Additional Apache directives" all have no effect. Is there any way to get around this bug?
 
My setup is as follows:
OS ‪Ubuntu 14.04.4 LTS‬
Plesk version 12.5.30 Update #25
PHP 7.0.4
If I run PHP 7.0.4 as a FPM application, the error message is "File not found." (no HTML formatting, just the string). PHP 7.0.4 as a FastCGI application, however, returns the error documents defined in .htaccess.
 
This doesn't work. As I mentioned twice before, the response I get is just "File not found." in plain text. The status of these missing .php pages is "HTTP/1.1 404 Not Found" but no error page is displayed. Apparently, the ".php" in the URLs screws something up. I tested this with and without .htaccess in the root folder.
 
Last edited:
vkleinhenz, thanks for reporting.
I was able to reproduce the problem in our local environment. The issue is reported to development team as PPP-21577 for your reference.
Also, adding directive
Code:
ProxyErrorOverride on
into Additional Apache directives (Domain -> Apache & nginx Settings) solved the problem for me
 
error description? some details would be useful. Try to inspect webserver and vhost logs.
 
Not sure if that is a related error:

[Tue Mar 22 05:34:31.575192 2016] [proxy_fcgi:error] [pid 1072:tid 139939186419456] [client 8.37.71.109:35253] AH01071: Got error 'Primary script unknown\n'


I'm getting these errors in my browser:

The ... page isn’t working

... didn’t send any data.
ERR_EMPTY_RESPONSE
 
Hi,

adding ProxyErrorOverride solved the issue for me, thank you!

Instead of adding this option via additional Apache directives to each domain separately, I created a custom web server configuration file:
/opt/psa/admin/conf/templates/custom/service/php_over_fpm.php

Code:
<IfModule mod_proxy_fcgi.c>
    <Files ~ (\.php$)>
        ProxyErrorOverride on
        SetHandler proxy:<?php echo $VAR->domain->physicalHosting->fpmSocket ?>|fcgi://127.0.0.1:9000
    </Files>
</IfModule>

I hope this will get fixed soon...
 
Back
Top