Home >Backend Development >PHP Tutorial >nginx - How to configure multiple php-cgi process pools
Assuming that there are 6 subdomains under nginx, does it mean that I need to open 6 phpcgi process pools? For example 127.0.0.1:9005
Assuming that there are 6 subdomains under nginx, does it mean that I need to open 6 phpcgi process pools? For example 127.0.0.1:9005
Use php-fpm to manage our php parser process. If configured, configure it in fpm/pool/www.conf
Please use php-fpm FastCGI process manager
Not only can it open and manage multiple processes
It can also manage the processing time of each process, the number of processing times, dynamically increase or decrease processes, etc.
Conclusion: No need
phpcgi is a virtual machine of PHP. It will dynamically load PHP code according to the data passed by the CGI protocol. Different domain names may point to different PHP execution codes, but it is not necessary to open multiple CGI pools to distinguish them. Of course, it’s perfectly fine to open more than one.