• notice
  • Congratulations on the launch of the Sought Tech site

Centos8 nginx plus php7.4 does not listen to port 9000 and reports error 500 solution

Today, lnmp was built on centos8: the ring of nginx+php7.4+mysql8 was installed under centos8, and after the results were all set up, it was found that the access error was 500. Then I checked and found that it did not listen to port 9000, because it defaulted to the unix file mode, so there was the following centos8 nginx plus php7.4 did not listen to port 9000 and reported an 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 =, 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 = corresponds to fastcgi_pass;

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~~~


Technical otaku

Sought technology together

Related Topic


Leave a Reply