nginx and php-fpm socket owner

前端 未结 7 1377
孤城傲影
孤城傲影 2020-12-24 14:27

After an update of my system I ran into a bad gateway error of my PHP apps running on Nginx.

1 connect() to unix:/var/run/php-fcgi-vhostname-php-fcgi-

7条回答
  •  眼角桃花
    2020-12-24 15:16

    Just adding here that the listen.acl_users directive should be commented, otherwise, it will override the listen.owner and listen.group values:

    ; 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 = www-data
    listen.group = www-data
    listen.mode = 0660
    
    ; When POSIX Access Control Lists are supported you can set them using
    ; these options, value is a comma separated list of user/group names.
    ; When set, listen.owner and listen.group are ignored
    ;listen.acl_users = apache,nginx
    

提交回复
热议问题