Blog hébergé par Yves et Iris :-)

Aller au contenu | Aller au menu | Aller à la recherche

Nginx and php-fpm with Debian Jessie

With the new Debian Jessie, I found that my PHP pages would all be displayed as blank pages, even though all regular HTML pages would display correctly.

This comes from the fact that the SCRIPT_FILENAME parameter has been removed from the /etc/nginx/fastcgi_params file. A new file, named /etc/nginx/fastcgi.conf, does reintroduce this parameter, but with the official value “$document_root$fastcgi_script_name”, instead of the former value “$request_filename”.

I really do not understand why the new value is the official one upstream, since it does not play well with aliases. So, first, I referenced fastcgi.conf instead of fastcgi_params, since the former seems to be the preferred file now ; and second, I changed my Nginx configuration to define SCRIPT_FILENAME this way:

fastcgi_param SCRIPT_FILENAME $request_filename;

Commentaires

1. Le dimanche 10 mai 2015, 15:14 par dethegeek

Well... I share your point of view. I'm fighting since several hours to find why my setup works fine on Wheezy, but no longer on Jessie.

Thank you for sharing this piece of knowledge ;)

Ajouter un commentaire

Le code HTML est affiché comme du texte et les adresses web sont automatiquement transformées.

La discussion continue ailleurs

URL de rétrolien : http://yalis.fr/cms/index.php/trackback/74

Fil des commentaires de ce billet