I have an AWS server running on Amazon Linux.
I used this guide to install php7 (bottom of the page): https://forums.aws.amazon.com/thread.jspa?messageID=695576
I would like to use nginx instead of Apache, so I've also installed the php70w-fpm and nginx packages. However, when I service start php-fpm
, it does not create a php-fpm.sock file anywhere on my server. I have checked in /var/run and have also ran find / -name "*.sock"
which only returns /var/run/rpcbind.sock
.
fpm/php. ini will be used when PHP is run as FPM -- which is the case with an nginx installation. And you can check that calling phpinfo() from a php page served by your webserver.
The major advantage of PHP-FPM is that it relies on the concept of pool management. Each pool of PHP-FPM can be viewed as a full instance of PHP, having a configuration, limit and restrictions of its own.
Edit: The real solution here is that the listen in www.conf
and fastcgi_pass
in nginx configuration have to match. Whether you use sockets or tcp is up to you.
The answer was to not use a .sock
file at all.
/etc/php-fpm.d/www.conf
it has:listen = 127.0.0.1:9000
fastcgi_pass 127.0.0.1:9000;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
Make sure you have the following folder and that it's writable.
/var/run/php-fpm
then in your www.conf
you put:
listen = /var/run/php-fpm/php-fpm.sock
then run:
sudo service php-fpm restart
nginx.conf
:
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
sudo service nginx restart
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