Nginx connect() failed error

后端 未结 5 1616
生来不讨喜
生来不讨喜 2020-12-23 22:53

I don\'t know why I got this error every time I tried to open the page:

2013/04/06 17:52:19 [error] 5040#0: *1 connect() failed (111: Connection refused) whi         


        
5条回答
  •  情歌与酒
    2020-12-23 23:24

    update your configurations as mentioned before:

    location ~ .php$ {
    try_files $uri =404;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_index index.php;
    include fastcgi_params;
    }
    

    but don't forget to restart both nginx server and php-fpm after updating

    sudo /etc/init.d/nginx restart
    sudo /etc/init.d/php-fpm restart
    

提交回复
热议问题