I've configured nginx with php-fpm on Ubuntu (and everything works pretty well).
One thing I encountered is that HTTP status code 200 is sent, when a PHP parse error occurs. The error log contains the following entry:
[error] 3205#0: *2854 FastCGI sent in stderr: "PHP Parse error: syntax error, unexpected T_REQUIRE_ONCE in /var/www/.../index.php on line 32" while reading response header from upstream, client: 1.2.3.4, server: example.com; request: "GET / HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "example.com"
I was not able to figure out, why not a code 50x is sent. I have not configured any error_page settings and I read the documentation of error_page. I also tried it to set the status code (with error_page 500 =500 /50x.html and so on). But always status 200 is returned.
I can send status headers from PHP (header('HTTP/1.1 404 Not Found')
), this works. However, for errors issued by the PHP interpreter (also uncaught exceptions), the server's response doesn't take into account that an error occurred.