0

我已将 PHP 5.3 更新为 PHP 5.5,但我看到“502 Bad Gateway”。

这是我的错误日志:

2014/07/29 15:37:22 [error] 8123#0: *3 connect() failed (111: Connection refused) while connecting to upstream, client: 82.58.55.99, server: localhost, request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "185.25.204.86"

这是我的 nginx 配置:

server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;

root /var/www;
index index.php index.html index.htm;

server_name localhost;

location / {
        try_files $uri $uri/ /index.html;
}

location /doc/ {
        alias /usr/share/doc/;
        autoindex on;
        allow 127.0.0.1;
        allow ::1;
        deny all;
}

error_page 404 /404.html;

location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini

        # With php5-cgi alone:
        fastcgi_pass 127.0.0.1:9000;
        # With php5-fpm:
        fastcgi_index index.php;
        include fastcgi_params;
}

}

我该如何解决?

4

1 回答 1

0

也许它会很适合你: http ://wildlyinaccurate.com/solving-502-bad-gateway-with-nginx-php-fpm

于 2014-07-29T11:47:38.590 回答