As discussed in many threads, I have set
client_max_body_size 2M;
in my /etc/nginx/nginx.conf
and
client_max_body_size 100M;
in one of my virtual hosts config.
And it works, as in the upload of files >2MB fails on virtual hosts than don't have the 100M directive.
The problem is that this is not reported by PHP applications, like WordPress. They still show a 100MB limit. And when someone tried to upload something >2MB, they see:
Unexpected response from the server. The file may have been uploaded successfully. Check in the Media Library or reload the page.
Is there a way to communicate the "true" max filesize limit to PHP applications, even if it's set at the webserver level?