Author |
Message |
[SMK]-RuStY

Joined: 19 Feb 2006
Posts: 7
|
Posted:
Sun May 14, 2006 6:28 am |
  |
Anyone know how to limit the rate of speed at which people can download files? |
|
|
  |
 |
Joshua Meadows (DemoRic)
support

Joined: 29 Dec 2004
Posts: 783
Location: S.E. Kansas
|
Posted:
Sun May 14, 2006 12:46 pm |
  |
http://www.ivn.cl/apache/
Mod bandwidth mod_bw works well for this.
Download the correct one for your apache server at
http://www.ivn.cl/apache/
You can use it to limit bandwidth by virtual host and by file type.
Example Filetype:
Code: | ## ------------ Basic Mod Bandwidth Settings ---------------
<IfModule mod_bw.c>
#http://www.ivn.cl/apache/
#BandWidthDebug Off
ForceBandWidthModule Off
#AddOutputFilterByType BW_MOD text/html text/plain
#MinBandWidth all 4096
BandWidth all 0
MaxConnection all 150
LargeFileLimit .jpg 256 73728
LargeFileLimit .png 256 73728
LargeFileLimit .mp3 256 65536
LargeFileLimit .wav 256 65536
LargeFileLimit .zip 256 73728
LargeFileLimit .rar 256 73728
LargeFileLimit .bmp 256 65536
LargeFileLimit .avi 256 65536
LargeFileLimit .swf 256 10240
BandWidthError 510
#ErrorDocument 510 /bandwidth.htm
#BandWidth all 0
#MaxConnection all 48
</IfModule>
## --------------------------------------------------------- |
|
|
|
    |
 |
[SMK]-RuStY

Joined: 19 Feb 2006
Posts: 7
|
Posted:
Sun May 14, 2006 5:35 pm |
  |
could you show me what the code would look like if all i want to do is limit the bandwidth rate on all file types on just one virtual host? |
|
|
  |
 |
dawg
support

Joined: 11 Apr 2004
Posts: 180
|
Posted:
Mon May 15, 2006 10:58 am |
  |
[SMK]-RuStY wrote: | could you show me what the code would look like if all i want to do is limit the bandwidth rate on all file types on just one virtual host? |
Why not take the time to learn --
Check out the ReadMe Files:
http://www.ivn.cl/apache/#bandwidth |
|
|
  |
 |
[SMK]-RuStY

Joined: 19 Feb 2006
Posts: 7
|
Posted:
Tue May 16, 2006 5:02 am |
  |
Been tryin all nite still can't get it to work.
Anyone who'd like to help a brotha out my aim is rustydusty1717 ill be on tommorow nite (tuesday nite) so anyone feels the need to waste some time send me a msg  |
|
|
  |
 |
Joshua Meadows (DemoRic)
support

Joined: 29 Dec 2004
Posts: 783
Location: S.E. Kansas
|
Posted:
Tue May 16, 2006 10:50 pm |
  |
Quote from bw_mod.txt
Quote: | 3.4 - BandWidth [From] [bytes/s]
This takes 2 parameters. From is the origin of the connections. It could
be a full host, part of a domain, an ip address, a network mask (i.e
192.168.0.0/24 or 192.168.0.0/255.255.255.0) or all.
The second parameter indicates the total speed available to the Origin.
If speed is 0, there is no limit.
Example :
BandWidth localhost 10240
BandWidth 192.168.218.5 0
( Order is relevant. First entries have precedence )
3.5 - MinBandWidth [From] [bytes/s]
This takes 2 parameters. From is the origin of the connections. It could
be a full host, part of a domain, an ip address, a network mask (i.e
192.168.0.0/24 or 192.168.0.0/255.255.255.0) or all.
The second parameter indicates the minimun speed each client will have.
What does this mean ? If you have a total of 100kbytes speed, and you put
MinBandWidth at 50kbytes, it doesnt matter how many clients you have, all
of them will have at minimun 50kbytes of total speed to download.
If speed is 0, you will be using the default minimun (256 bytes/s).
There is a special value of -1. This value means that each client, will
have a top speed determined by the BandWidth directive. See the examples.
Examples :
BandWidth all 102400
MinBandWidth all 50000
The example above, will have a top speed of 100kb for the 1º
client. If more clients come, it will be splitted accordingly but
everyone will have at least 50kb (even if you have 50 clients)
BandWidth all 50000
MinBandWidth all -1
This example, makes everyone have 50kb as top speed. |
Note you can do the bandwidth limiting inside your virutal host or outside of your virutal host area. |
|
|
    |
 |
[SMK]-RuStY

Joined: 19 Feb 2006
Posts: 7
|
Posted:
Wed May 17, 2006 3:02 am |
  |
Demoric wrote: | Quote from bw_mod.txt
Quote: | 3.4 - BandWidth [From] [bytes/s]
This takes 2 parameters. From is the origin of the connections. It could
be a full host, part of a domain, an ip address, a network mask (i.e
192.168.0.0/24 or 192.168.0.0/255.255.255.0) or all.
The second parameter indicates the total speed available to the Origin.
If speed is 0, there is no limit.
Example :
BandWidth localhost 10240
BandWidth 192.168.218.5 0
( Order is relevant. First entries have precedence )
3.5 - MinBandWidth [From] [bytes/s]
This takes 2 parameters. From is the origin of the connections. It could
be a full host, part of a domain, an ip address, a network mask (i.e
192.168.0.0/24 or 192.168.0.0/255.255.255.0) or all.
The second parameter indicates the minimun speed each client will have.
What does this mean ? If you have a total of 100kbytes speed, and you put
MinBandWidth at 50kbytes, it doesnt matter how many clients you have, all
of them will have at minimun 50kbytes of total speed to download.
If speed is 0, you will be using the default minimun (256 bytes/s).
There is a special value of -1. This value means that each client, will
have a top speed determined by the BandWidth directive. See the examples.
Examples :
BandWidth all 102400
MinBandWidth all 50000
The example above, will have a top speed of 100kb for the 1º
client. If more clients come, it will be splitted accordingly but
everyone will have at least 50kb (even if you have 50 clients)
BandWidth all 50000
MinBandWidth all -1
This example, makes everyone have 50kb as top speed. |
Note you can do the bandwidth limiting inside your virutal host or outside of your virutal host area. |
Sorry this is my first time doing anything of this sort...i just run phpbb forums and psychostats for my cs server. Where do i put this info and what would i put if i want the maximum upload speed total no matter how many clients to be 75 kilobits/s. |
|
|
  |
 |
Joshua Meadows (DemoRic)
support

Joined: 29 Dec 2004
Posts: 783
Location: S.E. Kansas
|
Posted:
Wed May 17, 2006 11:54 pm |
  |
I'll break it down some.
Step #1 download the bandwidth module and copy it to apache2triad\modules
Step #2 Open the httpd.conf file in apache2triad\conf and add
Quote: | LoadModule bw_module modules/mod_bw.so |
Step #3 somewhere either in the virtual host you want to limit or before you specify virtual hosts (to apply globaly) add
Quote: | <IfModule mod_bw.c>
BandWidth all 75000
MinBandWidth all -1
</IfModule> |
|
|
|
    |
 |
[SMK]-RuStY

Joined: 19 Feb 2006
Posts: 7
|
Posted:
Thu May 18, 2006 1:49 am |
  |
alrighty perfect one last thing...i got "mod_bw.dll" in my modules and u've got "mod_bw.so" how i get the .so file instead? |
|
|
  |
 |
Joshua Meadows (DemoRic)
support

Joined: 29 Dec 2004
Posts: 783
Location: S.E. Kansas
|
Posted:
Thu May 18, 2006 10:55 pm |
  |
just rename it to .so, or change the entry in your httpd.conf to .dll
They are both the same it's just windows programers tend to use the system default of dll, and many people prefer to change it to .so to stay with apache's prefered file extension for modules. |
|
|
    |
 |
[SMK]-RuStY

Joined: 19 Feb 2006
Posts: 7
|
Posted:
Fri May 19, 2006 12:01 am |
  |
k i can't get it work i dont know why...if someone wants to get ahold of me on aim: rustydusty1717 to help me or msn smk_rusty@hotmail.com that'd be so awesome ty. |
|
|
  |
 |
Joshua Meadows (DemoRic)
support

Joined: 29 Dec 2004
Posts: 783
Location: S.E. Kansas
|
Posted:
Fri Oct 06, 2006 5:19 pm |
  |
|
    |
 |
|