Php-fpm configuration file 1. clear the original configuration file
>/Usr/local/php/etc/php-fpm.conf
2. edit the configuration file
Vim/usr/local/php/etc/php-fpm.conf
Write the following content
[Global] pid =/usr/local/php/var/run/php-fpm.piderror_log =/usr/local/php/var/log/php-fpm.log [www] listen =/tmp/php-fcgi.sockuser = php-fpmgroup = php-fpmpm = dynamicpm. max_children = 50pm. start_servers = 20pm. min _spare_servers = 5. max_spare_servers = 35pm. max_requests = 500rlimit_files = 1024
3. check whether the configuration file is correct.
/Usr/local/php/sbin/php-fpm-t
4. use multiple pools to add the www1 pool
[Www1] listen =/tmp/php-fcgi.sockuser = php-fpmgroup = php-fpmpm = dynamicpm. max_children = 50pm. start_servers = 20pm. min _spare_servers = 5. max_spare_servers = 35pm. max_requests = 500rlimit_files = 1024 when multiple pools are used, you must listen to the port in the VM configuration file and change the corresponding pool. 5. configure the website performance log and add the following two lines of slowlog =/tmp/www_slow.logrequest_slowlog _ 1
6. restrict nginx access paths
Add the following lines
Php_admin_value [open_basedir] =/usr/local/nginx/html:/tmp