White screen of death errors I have come across an error that I have been having difficulty fixing.
I am suspicious the problem is the "Primary script unknown" error, but I am lost. There is an reoccurring Fatal Error, but it is a core file that has never been modified..

Any help would be greatly appreciated.

See below for an example of the nginx error log.


  2016/01/09 08:08:17 [error] 1082#0: *315 FastCGI sent in stderr: "Primary script  unknown" while reading response header from upstream, client: 188.68.224.62, server: , request: "GET http://dhg.pisz.pl/httptest.php HTTP/1.1", upstream:  "fastcgi://unix:/var/run/php5-fpm.sock:", host: "dhg.pisz.pl"
The error you've shown is from someone running a hacking script.

The nginx documentation offers many solutions to avoid running bad php scripts in their Pitfalls and Common Mistakes FAQ, but the one I like is the try_files directive to only run scripts that exist on your server otherwise return a 404 Not Found status code.

location ~* \.php$ {
    try_files $uri =404;
    fastcgi_pass backend;
    # [...]
}