On a fresh AWS Linux HVM box, I ran the commands:
sudo yum update
sudo yum install git nginx php-fpm
I then tried to sudo service start php-fpm
, but got the error:
Starting php-fpm: [10-Sep-2014 20:52:39] ERROR: [pool www] cannot get uid for user 'apache'
[10-Sep-2014 20:52:39] ERROR: FPM initialization failed
Where am I going wrong and where is the apache user coming from?
The apache
user comes from php-fpm.conf
file. It does not matter that you run it as root, the service will start as the user which is configured in this file.
Find your php-fpm.conf
file. It should be somwhere in /etc
. Edit it and change lines
user = apache
group = apache
to
user = www-data
group = www-data
I'm assuming your default nginx configuration also uses the www-data
user.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With