Answer the question
In order to leave comments, you need to log in
502 NGINX error - how to run PHP-FPM?
Installed VDS on Ubuntu 18.04. I set up a bunch of Nginx + PHP-FPM + MySQL.
I get a 502 Bad Gateway error.
PHP-FPM service does not start even though it was installed.
PHP 7.2.10-0ubuntu0.18.04.1 (cli) (built: Sep 13 2018 13:45:02) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.10-0ubuntu0.18.04.1, Copyright (c) 1999-2018, by Zend Technologies
sudo apt-get install php-fpm
Reading package lists... Done
Building dependency tree
Reading state information... Done
php-fpm is already the newest version (1:7.2+60ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
sudo service php-fpm start
Failed to start php-fpm.service: Unit php-fpm.service not found.
Answer the question
In order to leave comments, you need to log in
But the service in Ubuntu is not called by the package name :)
Try `ls -la /etc/init.d/php*` - the output of this command will give a hint about the name of the service
.
In your case, it will most likely be started either by sudo service php7-fpm restart or by sudo service php7.2-fpm restart
.
Well, yes, 502 is not the fact that it is connected with an unlaunched fpm. You need to look at the nginx logs, there may be a hint
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question