How to Configure PHP | php-fpm nginx
PHP-FPM[1](FastCGIProcessManager)isanalternativetoFastCGIimplementationofPHPwithsomeadditionalfeaturesusefulforsiteswithhightraffic.ItisthepreferredmethodofprocessingPHPpageswithNGINXandisfasterthantraditionalCGIbasedmethodssuchasSUPHPormod_phpforrunningaPHPscript.ThemainadvantageofusingPHP-FPMisthatitusesaconsiderableamountoflessmemoryandCPUascomparedwithanyothermethodsofrunningPHP.TheprimaryreasonisthatitdemonizesPHP,therebytransformingittoabackgroundprocesswhileprovidingaCLIscriptformanag...
PHP-FPM[1] (FastCGI Process Manager) is an alternative to FastCGI implementation of PHP with some additional features useful for sites with high traffic. It is the preferred method of processing PHP pages with NGINX and is faster than traditional CGI based methods such as SUPHP or mod_php for running a PHP script. The main advantage of using PHP-FPM is that it uses a considerable amount of less memory and CPU as compared with any other methods of running PHP. The primary reason is that it demonizes PHP, thereby transforming it to a background process while providing a CLI script for managing PHP request.
PHP-FPM NGINX Configuration Prerequisites You can open a SSH session to your Ubuntu 18.04 system using root or a sudo[2] enabled user. You have already installed NGINX[3] and PHP in your Ubuntu 18.04 system. NGINX PHP-FPM Configuration Steps Install PHP-FPM Configure PHP-FPM Pool Configure NGINX for PHP-FPM Test NGINX PHP-FPM Configuration 1. Install PHP-FPMNginx doesn’t kno...