nginx 访问php一直出现502

在配置时太急,摘录了别人的 server配置
#fastcgi_pass unix:/tmp/php-cgi.sock;
#upload filesize limit
#client_max_body_size 10m;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;

最后改成自己的就OK了

location ~ .*\.(php|php5)?$
{
try_files $uri =404;
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fcgi.conf;
}

你可能感兴趣的:(nginx 访问php一直出现502)