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

Var dette svaret til hjelp?

 Print

Les også disse

SQL 2005 Express Update

Posted by boonchuan, 05-04-2007, 07:50 AMI am using SQL 2005 Express Management Console in the...

javascripts/PHP with brakets on checkboxes

Posted by raulgonzalez, 02-14-2011, 12:44 PMHello, I have the HTML code below which I like to...

ASP.net vs PHP

Posted by porov, 03-01-2007, 03:06 AMWhat is better? I hear asp.net is better for large scale...

Would this be Secure?

Posted by aldo, 01-09-2008, 03:19 AMI currently only use cookies for my user systems, I see...

Avoiding cleartext passwords for mysql connection

Posted by DataCentric, 02-08-2011, 03:48 PMHey guys, Any bright ideas on how to better secure...