I want to generate a "Request Entity Too Large" error when users upload very big files on my server. With mod-php, this is simply:
<FilesMatch "^(upload|replace)$">
LimitRequestBody 3000000
</FilesMatch>
With php-fpm, I tried"
<LocationMatch "^/(upload|replace)$">
LimitRequestBody 3000000
</LocationMatch>
But, it didn't work. Next, I tried setting a proxy environment variable in VirtualHost
:
SetEnv proxy-sendchunked
ProxyPassMatch ^/([^\.]+)$ fcgi://127.0.0.1:9000${docroot}/$1
It didn't work too. Can anyone tell me how to achieve this? Thanks.