When setting up a fresh website to test, I am able to trigger all template error pages from /document_errors/.
But I am unable to get the error 500 to work.
I created a broken php file with some bad syntax that triggers an error 500 in the browser, I see it in the apache log as well. But it doesn’t load the html template, I just get the default browser error.
Before changing the template or better, creating a new one, you can test it editing the current nginx conf files for your domain.
Edit /home/YourUser/conf/web/YourDomain/nginx.conf and /home/YourUser/conf/web/YourDomain/nginx.ssl.conf and add the directive proxy_intercept_errors on; to the location / block, something like this:
You should add a new location @pass_through and use error_page directive to define the errors that should be resolved by the backend or by the default error pages.
Example modifying nginx.ssl.conf. This example will use the default error pages for errors 403, 410 and 50x but for 404 it will use the backend, in your case, wordpress.
My mistake, I was testing on a 2nd dev instance, and I forgot to remove the global entry for
proxy_intercept_errors on; that I had inside of /etc/nginx/nginx.conf