Just to make picture fuller. Another solution is to create two system parameters:
- error_page_header (Name: "HTTP header for 404", Value: "HTTP/1.0 404 Not Found", Type: text, Namespace: core, Lang string: site)
- unauthorized_page_header: (Name: "HTTP header for 403", Value: "HTTP/1.0 403 Forbidden", Type: text, Namespace: core, Lang string: site)
I think this solution is more flexible since it changes headers only for 404 and 403 statuses.
According to
this post (in Russian), the problem occures on hostings with Apache+Nginx. MODX Revo sends all the headers as HTTP/1.1, and Nginx gives HTTP/1.0 to Apache. So, Apache tries to respond to HTTP/1.0 with HTTP/1.1, mocks it up and adds chunks to headers, which is treated as errors by Nginx.
Thanks to
Viktor Dolgy fo the solution and the explaination.