Home >Backend Development >PHP Tutorial >Solution to Nginx error connect() failed (111: Connection refused) while connecting to upstream, nginxupstream_PHP tutorial
When I visited the company’s website today, it suddenly reported an error, throwing out some English prompts Take a look at Nginx’s error.log:
cd /usr/local/nginx/logs/ and see the error.log. Next, tail -n 20 error.log and see the error content: connect() failed (111: Connection refused) while connecting to upstream
It can be seen from English that the connection to the PHP process manager failed, so I looked at the status of the PHP process manager, service php-fpm status, and saw that it was in the close status, so I executed service php-fpm start and everything was OK. .