Centos8 nginx plus php7.4 does not listen to port 9000 and reports error 500 solution
The first step is to check whether port 9000 is listening:
netstat -ant | grep 9000 _
If not found and your php-fpm service has been started, then your php-fpm is not using network mode;
Of course, you can also directly check the connection method of the listen configuration in /etc/php-fpm.d/www.conf
vim /etc/php-fpm.d/www.conf _ _ _ _ _ _ _ _ _ _ _
If it is: listen = /run/php-fpm/www.sock, it means Unix sock connection
If it is: listen = 127.0.0.1:9000, it means the network mode
According to the settings here, modify the response at the place where nginx calls the PHP proxy.
listen = /run/php-fpm/www.sock corresponds to fastcgi_pass unix:/run/php-fpm/www.sock;
listen = 127.0.0.1:9000 corresponds to fastcgi_pass 127.0.0.1:9000;
After the setting is complete, restart the nginx service and it will be OK
systemctl restart nginx.service
OK tutorial is here, continue to move bricks~~~
0 Comments