+++ /dev/null
-
-
-per-virtualhost bandwidth limiting configuration
- Next, you may define virtualhosts bandwidth limits, URL locations and path to the scoreboard file for individual virtualhosts:
-
-# specify default 'bandwidth exceeded' location
-CBandDefaultExceededURL http://haha.org/bandwidth_exceeded.html
-
-<VirtualHost *:80>
- DocumentRoot /var/www/xyz.org/
- ServerName xyz.org
- CustomLog /var/log/apache2/xyz.org.access combined
- ErrorLog /var/log/apache2/xyz.org.access.error
- RewriteEngine On
- RewriteOptions inherit
-
- # 100MB virtualhost bandwidth limit
- CBandLimit 100000
-
- # redirect to http://abc.org/bandwidth_exceeded.html
- # when the limit has been reached
- CBandExceededURL http://abc.org/bandwidth_exceeded.html
-
- # virtualhost's scoreboard file
- CBandScoreboard /var/run/apache2/xyz.org.scoreboard
-</VirtualHost>
-
-
-
-per-user bandwidth limiting configuration (only in 0.9.1 version)
- In 0.9.1 you can define limits for users and assign virtualhosts to them
-
-
-# define user 'dembol'
-<CBandUser dembol>
- # 200MB bandwidth limit for user 'dembol'
- CBandUserLimit 200000
-
- # redirect to http://abc.org/bandwidth_exceeded.html
- # when the limit has been reached
- CBandUserExceededURL http://abc.org/bandwidth_exceeded.html
-
- # user's scoreboard file
- CBandUserScoreboard /var/run/apache2/dembol.scoreboard
-</CBandUser>
-
-
-
-# assign virtualhost 'xyz.org' to user 'dembol'
-<VirtualHost *:80>
- ServerName xyz.org
- # Specify virtualhost owner
- CBandUser dembol
-</VirtualHost>
-
-# assign virtualhost 'aga.org' to user 'dembol'
-<VirtualHost *:80>
- ServerName aga.org
- # Specify virtualhost owner
- CBandUser dembol
-</VirtualHost>
-
-
-
-per-user and per-virtualhost bandwidth limiting configuration (only in 0.9.1 version)
- In 0.9.1 you can also mix per-user and per-virtualhost bandwidth limiting techniques
-
-
-# define user 'dembol'
-<CBandUser dembol>
- # 200MB bandwidth limit for user 'dembol'
- CBandUserLimit 200000
-
- # redirect to http://abc.org/bandwidth_exceeded.html
- # when the limit has been reached
- CBandUserExceededURL http://abc.org/bandwidth_exceeded.html
-
- # user's scoreboard file
- CBandUserScoreboard /var/run/apache2/dembol.scoreboard
-</CBandUser>
-
-
-# assign virtualhost 'xyz.org' to user 'dembol'
-<VirtualHost *:80>
- ServerName xyz.org
- # Specify virtualhost owner
- CBandUser dembol
-
- # 100MB virtualhost bandwidth limit
- CBandLimit 100000
-
- # redirect to http://abc.org/bandwidth_exceeded.html
- # when the limit has been reached
- CBandExceededURL http://abc.org/bandwidth_exceeded.html
-
- # virtualhost's scoreboard file
- CBandScoreboard /var/run/apache2/xyz.org.scoreboard
-</VirtualHost>
-
-# assign virtualhost 'aga.org' to user 'dembol'
-<VirtualHost *:80>
- ServerName aga.org
- # Specify virtualhost owner
- CBandUser dembol
-</VirtualHost>