Php-fpm-OSXPHP56nginx server permission error, resulting in php link 500 Error

Source: Internet
Author: User
{Code...} view the php-fpm log and find the above prompt. Try to change the user and group of php-fpm to the one matched by the current user. The error persists. Through the lsof-Pni4 | grepLISTEN | grepphp we can see that php-fpm does run as the current user rather than the root user. {Code ...}
[07-Dec-2015 17:07:08] NOTICE: [pool www] 'user' directive is ignored when FPM is not running as root[07-Dec-2015 17:07:08] NOTICE: [pool www] 'group' directive is ignored when FPM is not running as root

Viewphp-fpmIf the above prompt is found in the log, tryphp-fpmOfuserAndgroupModified to the matched user. The error persists.

Passlsof -Pni4 | grep LISTEN | grep phpSeephp-fpmIt does run as the current user rather than the root user.

php-fpm   51546 joshua    7u  IPv4 0xef21d7f98be9663      0t0  TCP 127.0.0.1:9056 (LISTEN)php-fpm   51551 joshua    0u  IPv4 0xef21d7f98be9663      0t0  TCP 127.0.0.1:9056 (LISTEN)php-fpm   51552 joshua    0u  IPv4 0xef21d7f98be9663      0t0  TCP 127.0.0.1:9056 (LISTEN)php-fpm   51553 joshua    0u  IPv4 0xef21d7f98be9663      0t0  TCP 127.0.0.1:9056 (LISTEN)

Reply content:
[07-Dec-2015 17:07:08] NOTICE: [pool www] 'user' directive is ignored when FPM is not running as root[07-Dec-2015 17:07:08] NOTICE: [pool www] 'group' directive is ignored when FPM is not running as root

Viewphp-fpmIf the above prompt is found in the log, tryphp-fpmOfuserAndgroupModified to the matched user. The error persists.

Passlsof -Pni4 | grep LISTEN | grep phpSeephp-fpmIt does run as the current user rather than the root user.

php-fpm   51546 joshua    7u  IPv4 0xef21d7f98be9663      0t0  TCP 127.0.0.1:9056 (LISTEN)php-fpm   51551 joshua    0u  IPv4 0xef21d7f98be9663      0t0  TCP 127.0.0.1:9056 (LISTEN)php-fpm   51552 joshua    0u  IPv4 0xef21d7f98be9663      0t0  TCP 127.0.0.1:9056 (LISTEN)php-fpm   51553 joshua    0u  IPv4 0xef21d7f98be9663      0t0  TCP 127.0.0.1:9056 (LISTEN)

Change the fpm configuration so that fpm can run as you want,

Sudo vim/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. Many; BSD-derived systems allow connections regardless of permissions.; Default Values: user and group are set as the running user;                 mode is set to 0660;listen.owner = nobody;listen.group = nobody;listen.mode = 0660; Unix user/group of processes; Note: The user is mandatory. If the group is not set, the default user's group;       will be used.; RPM: apache Choosed to be able to access some dir as httpduser = apache; RPM: Keep a group allowed to write in log dir.group = apache

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.