0

My page documents locate in /usr/local/var/www drwxr-xr-x joshua:admin My nginx configure is nginx.conf and my php and php-fpm configure is this file

and I find I can use wordpress(/usr/local/var/www/wordpress) perfectly, but not anchor(/usr/local/var/www/anchor), anchor will shows 500 error.

I get this log from the php-fpm

NOTICE: [pool www] 'user' directive is ignored when FPM is not running as root
NOTICE: [pool www] 'group' directive is ignored when FPM is not running as root

I already tried make the php-fpm.conf file like this

user = joshua
group = admin
listen.owner = joshua
listen.group = admin

but nothing happened, and the error log still the same.

Is there any ways can make it work when FPM is not running as root, because I dont realy want FPM run as root.

0

You need to ensure which user launched master PHP-FPM process, not pool processes.

for example:

root@strangeman:# ps aux | grep php-fpm

root 1135 0.0 1.6 334196 16812 ? Ss Dec13 0:02 php-fpm: master process (/etc/php5/fpm/php-fpm.conf)

This user may be declared in php-fpm startup script

  • I tried a lot, but I still don't know how to launch PHP-FPM as root. Normally, if the /Library/LaunchDaemons/homebrew.mxcl.php56.plist owner by root the PHP-FPM should launch as root, but it still launch as normal user on my mac. I really don't know how to get it work. My homebrew.mxcl.mariadb.plist and homebrew.mxcl.nginx.plist can launch as root by changing this two files to onwer by root. – Joshua Lee Dec 22 '15 at 3:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.