Apache tips-limit upload file size

tipsApache has an option names LimitRequestBody,this option can limit user sending's content of http request.Option LimiRequestBody can be used in .htaccess & httpd.conf.If you use it in http.conf, may use separately in virtualhost or the directory attribute setting. The LimitRequestBody setting value is lies between (unlimitedly) 0 to 2147483647 (2GB).

For example,I want to limit upload size to 100k for  /home/httpd/html/www.linuxine.com/uploads ,I may add below commands to .htaccess or httpd.conf.

<Directory "/home/httpd/html/www.linuxine.com/uploads">
LimitRequestBody 102400
</Directory>

If you add above commands to .htaccess,it will work once you have added them and saved the file, but if you add it to httpd.conf,it won't work until you have restarted apache.

Creative Commons License
linuxine.com's blog posts is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 United States License