nginx从1.2.1更新到1.9.2后,PHP-FPM状态页为空白


PHP-FPM status page is blank after nginx update from 1.2.1 to 1.9.2

我已经使用Nginx 1.2.1一段时间了,由于安全问题,我决定升级到1.9.2。

问题是:php fpm状态页面现在为我提供了一个完全空白的页面HTTP响应代码表示:200可以,但内容=0字节

我尝试了什么:

正在检查Nginx用户/组:它是www:www(就像以前一样)检查Php FPM用户/组:它是www:www(就像以前一样)在能力升级期间,我选择保留我的配置文件

tail/var/log/nginx/error.log说:什么都没有tail/var/log/nginx/mywebsite-error.log说:什么都没有tail/var/log/php-fpm/php5-fpm.log说:除了完成了一些过程跟踪之外,什么都没有,但没有相关的

我在升级之前一直在使用这个代码,没有问题:

    location ~ ^/(php_status|ping)$ {
    # access_log off;
    allow 127.0.0.1;
    allow MY_IP_ADRESS;
    deny all;
    include fastcgi_params;
    fastcgi_pass    unix:/var/run/php5-fpm.sock;
}

因此,我尝试使用语法:

fastcgi_pass 127.0.0.1:9000;

但这导致了nginx的502,我认为问题不存在。

我没有选择了。。。

谢谢你的帮助。

试试这个:

location ~ ^/(php_status|ping)$ {
    # access_log off;
    allow 127.0.0.1;
    allow MY_IP_ADRESS;
    deny all;
    include fastcgi_params;
    # This is important
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_pass    unix:/var/run/php5-fpm.sock;
}

似乎只添加就足够了

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;