使用PHP 5.5的502 Bad Gateway

时间:2014-07-29 11:41:26

标签: php nginx gateway php-5.5

我已将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;
}

}

我该如何解决?

1 个答案:

答案 0 :(得分:0)