Blog of Raivo Laanemets

Stories about web development, freelancing and personal computers.

Nginx 1.8 and blank PHP pages

I do not always maintain PHP sites but when I do, I usually break them with upgrades. This time I upgraded Nginx 1.6 to 1.8 on a Debian Wheezy installation and had a set of WordPress sites returning empty responses. The issue can be resolved by adding

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

or equivalent to your FastCGI conf. Where exactly, depends how you installed Nginx, or what distro you use. On Debian Wheezy with Dotdeb repo it goes into the /etc/nginx/fastcgi_params file.


I really hope that one day I have no PHP installations to maintain.


No comments have been added so far.

Email is not displayed anywhere.
URLs (max 3) starting with http:// or https:// can be used. Use @Name to mention someone.