limit the speed for certain file type ?
Posted by ttgt, 04-19-2009, 12:07 PM i have a server and let friends put images on it, i find some people put big .zip and .iso files on it, it make my server waste many bandwinth and make the images show lower and lower, can i install any software to do the control, to make "if user browse .zip or .iso files, they can only use the 1Mb bandwidth, if the content is images or html,the speed is no limit", is it possible? thanx
Posted by osphere, 04-19-2009, 12:45 PM I think that adding a rule would be kind of complicated.... Maybe you can just block the files with .zip or .iso? Or in your upload script, limit the max size a file can have?
Posted by ttgt, 04-19-2009, 12:49 PM i have two centos server,one offer cpanel and another one offer directadmin on them, so,there is no script installed. they can upload the files from ftp, i just want to limit the useage for downlinking ( server -> user ) thanx
Posted by squirrelhost, 04-19-2009, 12:54 PM If you're using apache2, maybe have a look at bw_mod: http://bwmod.sourceforge.net/ I think it can throttle by filetype. Download it and have a look. (saw a comment about this here: http://www.podcastalley.com/forum/sh...d.php?t=125564) the documentation includes an example, i.e. Example : LargeFileLimit .avi 500 10240 This limits .avi files over (or equal to) 500kb to 10kbytes/s Last edited by squirrelhost; 04-19-2009 at 01:04 PM.
Posted by Deem3n®, 04-21-2009, 07:45 AM Try to serve these static files using nginx. For speed limiting - look at directive limit rate