• 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.

Question Optimizing PHP FPM Handler Settings for Apache and Nginx in Plesk

brother4

Basic Pleskian
Server operating system version
Ubuntu 22.04
Plesk version and microupdate number
Plesk Obsidian 18.0.64
Hello everyone,

I have a question regarding the PHP FPM handlers and their description in the documentation.

In Plesk, I see the following options for executing PHP:
  • FastCGI application (Apache)
  • FPM application (Apache)
  • FPM application (nginx)
  • Dedicated FPM application (Apache)
  • Dedicated FPM application (nginx)
It seems the help documentation might not be completely up-to-date, as it states that the PHP-FPM application (Linux only) is only selectable when PHP processing by nginx is active. However, wouldn’t this option be the "Dedicated FPM Application (Apache)" for Apache?

Regarding the Apache module (mod_php), I am unclear if this corresponds to the "FPM Application (Apache)", which is described as an insecure method due to the Apache process.

PHP Settings

I suspect that to minimize potential issues, one should set PHP disable_functions to:

Code:
opcache_get_status, exec, passthru, shell_exec, system, proc_open, popen, show_source, highlight_file

And possibly also configure open_basedir accordingly:

Code:
{WEBSPACEROOT}{/}{:}{TMP}{/}

Alternatively, should I switch to "Dedicated FPM Application (Apache)"? The settings under PHP FPM pm.max_children are applied per domain, correct? How is this best calculated if there are various domains? On average, a PHP process requires 90 MB, and I have 14 GB of RAM, of which probably only 10 GB should be allocated to PHP in a simple web server setup. So, I would distribute around 160 PHP processes across the different domains? Or can one generally set a maximum of 160 processes on this server?

Thank you!
 
Back
Top