2.7.3. PHP-FPM

For business hosting only

PHP-FPM is only available on business hosting.

PHP-FPM (FastCGI Process Manager) is an alternative implementation of FastCGI mode in PHP. When used in conjunction with nginx, it provides faster request processing than the default nginx + Apache combination.

  • You can use PHP version 7.0 or higher.
  • Rules in .htaccess do not apply.
  • PHP-FPM processes run continuously and consume memory, which is counted toward your hosting account quota. A large number of concurrent requests may require a large amount of RAM.
  • PHP only processes files with the .php extension.
  • The standard index file is index.php. For comparison: when requested to access /html/, Apache will return the contents of the /html/index.html file, if it exists, while PHP-FPM will return a 403 error if the /html/ directory exists, or will forward the request to /index.php if the /html/ directory does not exist. When selecting the configuration of PHP-FPM "Dokuwiki", the standard index file will be considered to be doku.php.
  • The routes are configured as follows:
    • If the request is for a specific file with the extension .php, that file is executed (for example, a request to /path/test.php executes the file /path/test.php; if such a file does not exist, the error "File not found" is returned).
    • If the request goes to the URL of an existing directory, index.php is executes from that directory (for example, a request to /wp-admin/ executes the /wp-admin/index.php file; if there is no index.php file in the directory, a 403 error is returned).
    • All other requests are forwarded to /index.php (the requested URL will be available in $_SERVER['REQUEST_URI']).

After changing the web server to PHP-FPM, you can choose one of the available configuration options:

  • "Default" — requests for *.php files are forwarded directly to FPM (if the file does not exist, a 404 error will occur), while other requests are forwarded to /index.php. Suitable for CMS that do not require specific settings, such as Joomla! or October, as well as Symfony and Laravel frameworks.
  • "Wordpress" — currently the same as "Default". Special settings may be added in the future.
  • "Opencart" — clean URL support in OpenCart format. Works similarly to the default option, except that requests are forwarded to /index.php?route=.
  • "Dokuwiki" — index file doku.php instead of index.php, support for clean URL in DokuWiki format, blocking access to directories /conf/, /bin/, /inc/ and the /install.php file.
  • "ModX" — clean URL support in MODX format.
  • "Moodle" — support for URLs of the form /index.php/path for Moodle.
  • "PrestaShop" — clean URL support in PrestaShop format.
  • "Roundcube" — for the RoundCube mail client.
  • "Bitrix" — for Bitrix CMS.
  1. Check out the specifics of work of PHP-FPM and make sure that your site considers them.
  2. Open the "Site settings" section.
  3. In the "Web server" field, select "PHP-FPM", in the "PHP-FPM configuration" field, select the desired configuration and save the changes:
  4. Wait 10-15 minutes for the changes to take effect.
Content

    (2)