nginx + php5-fpm doesn't work properly. I see a white screen only

This SO Q&A sounds like it might be your issue, titled: nginx showing blank PHP pages.

Your location stanza should look similar to this:

location ~ \.php$ {
    include /path/to/fastcgi_params;
    fastcgi_pass  127.0.0.1:9000;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME /path/to/www/dir$fastcgi_script_name;
}

You have to pay special attention to the path to the script you're referencing for fastcgi_param.

References

  • NGINX WITH PHP-FPM GENERATING BLANK PAGE
  • Index» Networking, Server, and Protection» PHP-FPM 5.3.3 + Nginx blank page

This might be useful to others facing this problem,

You also can add into your nginx conf file fastcgi_params the following line, so you don't need to specify path to the variable SCRIPT_FILENAME

fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;

This is very handy specially when you have many virtual hosts.

Tags:

Nginx