【发布时间】:2020-05-24 05:46:59
【问题描述】:
我有一个在 CENTOS 8 上运行的服务器,带有 Apache 4.2 和 PHP-FPM。
当我重新启动 PHP-FPM 服务时,我收到 403 禁止错误。
这是因为/run/php-fpm/www.sock 的所有者变为root 而不是运行Apache 的用户。
我尝试编辑 /etc/php-fpm.d/www.conf 文件,但没有成功
; Set permissions for unix socket, if one is used. In Linux, read/write
; permissions must be set in order to allow connections from a web server.
; Default Values: user and group are set as the running user
; mode is set to 0660
listen.owner = apache
listen.group = apache
listen.mode = 0660
如何在不更改套接字所有者的情况下重新启动 PHP-FPM?
【问题讨论】: