HHVM outputs status code 200 on fatal errors and I can't use fastcgi_next_upstream because of that
I fixed this by injecting custom error handler for hhvm.
My index.php
for wordpress:
<?php/** * HHVM outputs http status: 200 OK even on fatal errors. * Catch fatal errors on HHVM and put right response code. *///Is this HHVM?if (defined('HHVM_VERSION')) { set_error_handler('catch_fatal_error_hhvm',E_ERROR);}function catch_fatal_error_hhvm() { http_response_code(500); die();}// WordPress view bootstrapperdefine('WP_USE_THEMES', true);require(dirname( __FILE__ ) . '/wordpress/wp-blog-header.php');