Uzyskaj Nginx do wywołania pliku PHP, aby obsłużyć błędy 404 w php-fpm

Próbuję skonfigurować Nginx, aby wysłać WSZYSTKIE 404s do pliku php w celu dalszego przetwarzania. Nie działa. Z try_files otrzymuję domyślne 404 i bez plików try_files nie otrzymuję żadnego pliku wejściowego. Oto, co mam do tej pory:

server {
    listen 192.168.100.44:80;

    location / {
        index  index.html;
    }
    root /var/www/test.example.com;

    error_page  404              /404.php;

    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;

    # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    #
    location ~ \.php$ {
        #try_files      $uri = 404;
        fastcgi_pass   unix:/tmp/php5-fpm.sock;
        fastcgi_index  index.php;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        include        fastcgi_params;
    }
}

questionAnswers(1)

yourAnswerToTheQuestion