通过多个pool方式独立
[root@localhost etc]# cat php-fpm.conf |grep -vE "^;|^$" include=/etc/php-fpm.d/*.conf [global] pid = /run/php-fpm/php-fpm.pid error_log = /var/log/php-fpm/error.log daemonize = yes
[root@localhost log]# cd /etc/php-fpm.d/ [root@localhost php-fpm.d]# ll total 8 -rw-r--r-- 1 root root 705 Dec 22 03:27 www1.conf -rw-r--r-- 1 root root 705 Dec 22 03:27 www2.conf [root@localhost php-fpm.d]# cat * [www1] user = www-data group = www-data listen = 127.0.0.1:9000 pm = dynamic pm.max_children = 200 pm.start_servers = 10 pm.min_spare_servers = 10 pm.max_spare_servers = 20 pm.max_requests = 5000 pm.status_path = /php-status ping.path = /php-ping ping.response = pong access.log = /dev/null slowlog = /data/www/test/log/$pool-slow.log request_slowlog_timeout = 1 rlimit_files = 102400 php_admin_value[error_log] = /data/www/test/log/$pool-error.log php_admin_flag[log_errors] = on php_admin_flag[display_errors] = off php_admin_value[post_max_size] = 50M php_admin_value[upload_max_filesize] = 50M php_admin_value[session.save_handler] = files php_admin_value[session.save_path] = /data/www/test/session [www2] user = www-data group = www-data listen = 127.0.0.1:9001 pm = dynamic pm.max_children = 200 pm.start_servers = 10 pm.min_spare_servers = 10 pm.max_spare_servers = 20 pm.max_requests = 5000 pm.status_path = /php-status ping.path = /php-ping ping.response = pong access.log = /dev/null slowlog = /data/www/test/log/$pool-slow.log request_slowlog_timeout = 1 rlimit_files = 102400 php_admin_value[error_log] = /data/www/test/log/$pool-error.log php_admin_flag[log_errors] = on php_admin_flag[display_errors] = off php_admin_value[post_max_size] = 50M php_admin_value[upload_max_filesize] = 50M php_admin_value[session.save_handler] = files php_admin_value[session.save_path] = /data/www/test/session
原创文章,转载请注明。本文链接地址: https://www.rootop.org/pages/5383.html