使用自定义配置重新启动php fpm进程
我的服务器上运行的是定制php进程使用自定义配置重新启动php fpm进程,php,Php,我的服务器上运行的是定制php进程/etc/php/7.1/fpm/master.d/custom_name.conf root 2620 0.0 2.6 412440 26808 ? Ss May31 0:33 php-fpm: master process (/etc/php/7.1/fpm/master.d/custom_name.conf) root 6822 0.0 0.0 13384 916 pts/1 S+ 19:5
/etc/php/7.1/fpm/master.d/custom_name.conf
root 2620 0.0 2.6 412440 26808 ? Ss May31 0:33 php-fpm: master process (/etc/php/7.1/fpm/master.d/custom_name.conf)
root 6822 0.0 0.0 13384 916 pts/1 S+ 19:58 0:00 grep php
root 27575 0.0 1.1 410680 11828 ? Ss May31 0:33 php-fpm: master process (/etc/php5/fpm/php-fpm.conf)
www-data 27578 0.0 0.5 410680 5760 ? S May31 0:00 php-fpm: pool www
www-data 27579 0.0 0.5 410680 5760 ? S May31 0:00 php-fpm: pool www
和config存在于目录/etc/php/fpm/master.d/custom_name.conf
中。
但我甚至不知道如何重新启动这项服务。我更改了文件配置并尝试了服务php7.1-fpm stop
,但该过程仍然有效
如果我尝试服务php7.1-fpm start
或服务php7.1-fpm restart
进程/etc/php/7.1/fpm/php fpm.conf
出现,但旧进程仍在工作。也许命令服务php7.1-fpm
有参数,我可以在其中传递额外的配置数据。master.d
目录中的配置文件示例
下面是这个文件的配置文件/etc/php/7.1/fpm/master.d/custom_name.conf
:
[global]
pid = /run/php7.1-fpm.custom_name.pid
error_log = /var/log/php7.1-fpm.log
[custom_name]
user = custom_name
group = custom_name
listen = /var/run/php7.1-fpm.custom_name.sock
listen.owner = www-data
listen.group = www-data
pm = ondemand
pm.max_children = 50
pm.start_servers = 5
pm.min_spare_servers = 5
pm.max_spare_servers = 20
pm.status_path = /fpm-status
chdir = /
catch_workers_output = yes
php_admin_value[session.save_path] = /var/www/custom_name.com/sessions
php_admin_value[open_basedir] = /var/www/custom_name.com/code/public:/tmp:/usr/share/php:/var/www/tools/
php_admin_flag[log_errors] = on
php_admin_flag[opcache.enable] = on
提前感谢最后,霍斯特告诉我如何重新启动此过程:
sudo service php7.2-fpm@custom_name restart
重新启动web服务IE
服务apache2 restart
应该会自动重新启动进程,不是吗?@Zak我试图重新启动apache2,php进程正在工作。您是否尝试过/etc/init.d/php7.1-fpm restart
?我在Ubuntu上,所以你的语法可能有点不同。@Zak是的,我试过了。我不知道,但可能hoster使用了命令start-stop-daemon