Sorcy
Sorcy

Reputation: 143

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

I've been using Nginx 1.2.1 for a while now, and because of security issues, I decided to upgrade to 1.9.2.

Problem is : php-fpm status page is now serving me a fully blank page. HTTP response code says : 200 ok, but content = 0 bytes

What I tried :

Checking Nginx user / group : it's www:www (as it was before) Checking Php-FPM user / group : it's www:www (as it was before) During aptitude upgrade, I chose to keep my config files

tail /var/log/nginx/error.log says : nothing tail /var/log/nginx/mywebsite-error.log says : nothing tail /var/log/php-fpm/php5-fpm.log says : nothing except some process trace finished but nothing relevant

I've been using this code before the upgrade, no problem :

    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;
}

Therefore, I tried using the syntax :

fastcgi_pass 127.0.0.1:9000;

but that leads to a 502 from nginx and I don't think the issue is there.

I'm running out of options ...

Thanks you for your help.

Upvotes: 7

Views: 6259

Answers (2)

Yurii
Yurii

Reputation: 321

Seems it's enough to add only

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

Upvotes: 15

TuanNguyen
TuanNguyen

Reputation: 1046

Try this:

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;
}

Upvotes: 33

Related Questions