I think the first few sentences could be improved.
Especially, when you mix both application programming and sys-admin as tags (php and nginx server configuration); you have to spell out the question really clearly.
There tends to be a cognitive bias where one thinks that a person reading has more information than they in fact have. Usually, how you frame it determines how quickly another person can grok your question.
Even as simple as:
I am running Nginx (version number) on Ubuntu (version number) and am trying trying get the proper redirect status via the Nginx error_page config. In In my nginx config file, I have:
error_page 404 /error.php;
error_page 404 /errorI would expect it to return XXX but it instead returns YYY.php;...
I would expect it to return XXX but it instead returns YYY....
Just my opinion.... If it's a straight php question, you can usually just jump into the syntax in question.