php 解决:502 bad gateway

    xiaoxiao2021-03-26  29

    写好上线没什么想法,活动开始,网站慢慢被更多人知道,访问的越来越多,每天最高16W的访问量,突然投诉多了,说:502 bad gateway

    搞了一天多时间,最后终于试出来了:网上有关502的解决方法太多了,我都去试了,帖子抄袭太多,看了很多很多,试了很多很多

    最后就找到一篇帖子解决了,我这种情况的问题:http://www.digitalwhores.net/ubuntu-2/error-502-connect-to-unixvarrunphp5-fpm-sock-failed-11-resource-temporarily-unavailable-while-connecting-to-upstream/   当然它的端口和我的端口值不一样

    ERROR 502 – connect() to unix:/var/run/php5-fpm.sock failed (11: Resource temporarily unavailable) while connecting to upstream

    November 24, 2015 Hosting, Linux, Ubuntu 502, nginx

     

    2015/11/24 12:01:49 [error] 48055#0: *14094117 connect() to unix:/var/run/php5-fpm.sock failed (11: Resource temporarily unavailable) while connecting to upstream, client:

    Once again, i’m struggling with nginx + php-fpm

    sudo nano /etc/php5/fpm/pool.d/www.conf

    search for

    listen = /var/run/php5-fpm.sock

    and replace it for

    listen = 127.0.0.1:7777

    On the *.conf files of sites-enabled (/etc/nginx/sites-enabled/)

    replace (or comment)

    fastcgi_pass unix:/var/run/php5-fpm.sock;

    with

    fastcgi_pass 127.0.0.1:7777;

    转载请注明原文地址: https://ju.6miu.com/read-517748.html

    最新回复(0)