Apache2Triad Help, Support and Development Forum Index Search Profile Log in to check your private messages Log in Register Memberlist Attachments Statistics Crew/Ranks Archive
 Bandwidth Limit
Google
Post new topic Reply to topic
Author Message
[SMK]-RuStY
 
 


Joined: 19 Feb 2006
Posts: 7

PostPosted: Sun May 14, 2006 6:28 am Reply with quoteBack to top

Anyone know how to limit the rate of speed at which people can download files?
View user's profileSend private message
Joshua Meadows (DemoRic)
support
support


Joined: 29 Dec 2004
Posts: 783
Location: S.E. Kansas

PostPosted: Sun May 14, 2006 12:46 pm Reply with quoteBack to top

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>
## ---------------------------------------------------------
View user's profileSend private messageYahoo MessengerICQ Number
[SMK]-RuStY
 
 


Joined: 19 Feb 2006
Posts: 7

PostPosted: Sun May 14, 2006 5:35 pm Reply with quoteBack to top

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?
View user's profileSend private message
dawg
support
support


Joined: 11 Apr 2004
Posts: 180

PostPosted: Mon May 15, 2006 10:58 am Reply with quoteBack to top

[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
View user's profileSend private message
[SMK]-RuStY
 
 


Joined: 19 Feb 2006
Posts: 7

PostPosted: Tue May 16, 2006 5:02 am Reply with quoteBack to top

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 Razz
View user's profileSend private message
Joshua Meadows (DemoRic)
support
support


Joined: 29 Dec 2004
Posts: 783
Location: S.E. Kansas

PostPosted: Tue May 16, 2006 10:50 pm Reply with quoteBack to top

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.
View user's profileSend private messageYahoo MessengerICQ Number
[SMK]-RuStY
 
 


Joined: 19 Feb 2006
Posts: 7

PostPosted: Wed May 17, 2006 3:02 am Reply with quoteBack to top

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.
View user's profileSend private message
Joshua Meadows (DemoRic)
support
support


Joined: 29 Dec 2004
Posts: 783
Location: S.E. Kansas

PostPosted: Wed May 17, 2006 11:54 pm Reply with quoteBack to top

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>
View user's profileSend private messageYahoo MessengerICQ Number
[SMK]-RuStY
 
 


Joined: 19 Feb 2006
Posts: 7

PostPosted: Thu May 18, 2006 1:49 am Reply with quoteBack to top

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?
View user's profileSend private message
Joshua Meadows (DemoRic)
support
support


Joined: 29 Dec 2004
Posts: 783
Location: S.E. Kansas

PostPosted: Thu May 18, 2006 10:55 pm Reply with quoteBack to top

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.
View user's profileSend private messageYahoo MessengerICQ Number
[SMK]-RuStY
 
 


Joined: 19 Feb 2006
Posts: 7

PostPosted: Fri May 19, 2006 12:01 am Reply with quoteBack to top

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.
View user's profileSend private message
Joshua Meadows (DemoRic)
support
support


Joined: 29 Dec 2004
Posts: 783
Location: S.E. Kansas

PostPosted: Fri Oct 06, 2006 5:19 pm Reply with quoteBack to top

http://www.gknw.net/development/apache/
Is a good place to get mod_bw also.
View user's profileSend private messageYahoo MessengerICQ Number
Display posts from previous:      
Post new topic Reply to topic


 Jump to:   



View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Powered by phpBB © 2001, 2002 phpBB Group :: FI Theme
All times are GMT