php5.3.15 php-fpm配置笔记

[root@web1]# vi /usr/local/php/etc/php-fpm.conf

[global]
pid = /usr/local/php/var/run/php-fpm.pid
error_log = /usr/local/php/var/log/php-fpm.log
log_level = notice

[www]
listen = /tmp/php-cgi.sock
user = www
group = www
pm = dynamic
pm.max_children = 160 //最大启用多少个进程,根据自己服务器的配置调整
pm.start_servers = 30
pm.min_spare_servers = 20
pm.max_spare_servers = 40
pm.max_requests = 10240
;chroot = /home/wwwroot/
env[TMP] = /tmp/
env[TMPDIR] = /tmp/
env[TEMP] = /tmp/
php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f i@iamle.com //设置php mail发送参数
php_admin_value[open_basedir] = /home/wwwroot/:/usr/local/php/:/tmp/:/var/tmp/:/proc/ //这几个很重要了,限制php访问目录~
php_admin_value[session.save_path] = /tmp/
php_admin_value[upload_tmp_dir] = /tmp/

打赏

发表评论

电子邮件地址不会被公开。 必填项已用*标注