php5-fpm broken with nginx 1.8 on wheezy
Closed this issue · 5 comments
i just installed nginx 1.8 and my site broke.
I found that from the new fastcgi_params
file, SCRIPT_FILENAME is missing which is required for fpm.
As i see here:
dotdeb-nginx/debian/nginx-common.NEWS
Line 47 in bb80b41
debian package maintainers removed the this distro-extra-included line from the default config which now synced with dotdeb-nginx.
So there is two way of solving this problem:
2) Always define SCRIPT_FILENAME parameter in your config, like this:
location ~ ^/index\.php(/|$) {
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
- Put back the line
fastcgi_param SCRIPT_FILENAME $request_filename;
to your fastcgi_params file.
Recommended solution is to switch from fastcgi_params to fastcgi.conf
Debian introduce fastcgi.conf in release 1.6.1 (or 1.6.2 I can't remember). So the solution is to switch from fastcgi_params to fastcgi.conf.
Migrating from fastcgi_params
to fastcgi.conf
fixes the problem.
where do I find this fastcgi.conf
?