Amazon Linux AMI nginx + php-fpm-7.1

0

I'm trying to install nginx + php-fpm-7.1 but I'm lost with regard to users and permissions.

I did so:

yum install -y nginx php71-fpm php71-devel php71-pdo php71-pear php71-mbstring php71-cli php71-odbc php71-imap php71-gd php71-xml php71-soap php71-mcrypt php71-mysqlnd php71-pecl-redis php71-pecl-imagick telnet;

After installation the configuration files are +/- like this:

nginx.conf

user nginx;

www.conf

user  = apache
group = apache
listen.acl_users = apache,nginx

But when I send files by SFTP, my user and group is ec2-user and if by chance I use it in nginx.conf and in www.conf everything stops working.

  

[crit] 5633 # 0: * 98 connect () to unix: /var/run/php-fpm/www.sock failed   (13: Permission denied) while connecting to upstream

What is the correct way to set up nginx and php-fpm user and group?

Remembering that my site is in / home / ec2-user / site and I want to use php version 7.1

    
asked by anonymous 31.05.2018 / 01:03

0 answers