To restricts Users from uploading File Size, we
can configure Apache with LimitRequestBody Directive. You can add
this directive using .htaccess file or httpd.conf file under virtual
host or directory configuration options. You can set value (in bytes)
from 0 (unlimited) to 2147483647 (2GB) that are allowed in a request
body.
For example, limit
/var/www/html/example.com/uploads to 200K, you might use the
following directive (add to .htaccess or httpd.conf file):
<Directory
“/var/www/html/example.com/uploads”>
LimitRequestBody 204800
</Directory>
Restart Apache Server, if added to httpd.conf.
# service httpd restart
No comments:
Post a Comment