failed (104: Connection reset by peer) while reading response header, record An error occurred in the LNMP environment once.

There is no problem with the compilation, installation and configuration of PHP and nginx, and the processes have also been started. At the end of the visit, An error occurred.

The Nginx error log is as follows:

 Connection reset by peer, Nani? ? How can there be a problem with the configuration of the master, it’s okay, let’s just say the conclusion

In the php-fpm configuration file; listen.allowed_clients = any, preferably a comment or 127.0.0.1, the former means allowing all, the latter means only allowing this machine, once other values ​​are set, it may cause "An error occurred." error occurrence of gateway

This is really a big pit, I hope brothers keep in mind! ! After annotating it, don't forget to restart nginx and php-fpm

 systemctl restart nginx php-fpm

Then the PHP web page can be parsed normally

Guess you like

Origin blog.csdn.net/qq_51233548/article/details/127415315