Created
February 8, 2016 20:25
-
-
Save womd/ddbafa91d25c804b66e7 to your computer and use it in GitHub Desktop.
Setup notes for mod_cban
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| userful docs: | |
| build info: http://www.34m0.com/2011/12/installing-and-configuring-cband-for.html | |
| configuration: http://dembol.org/blog/mod_cband/faq/ | |
| cerators page: http://dembol.org/blog/mod_cband/ (some links down ) | |
| download from: | |
| wget http://downloads.sourceforge.net/project/cband/mod-cband/mod-cband-0.9.6.1/mod-cband-0.9.6.1.tgz | |
| other resources: | |
| http://ubuntuforums.org/archive/index.php/t-899897.html - thead that showed th solution | |
| building: | |
| -- excerpt -- | |
| Add -lm to the APXS OPTS in Makefile.in like so: | |
| APXS_OPTS=-lm -Wc,-Wall -Wc,-DDST_CLASS=@DST_CLASS@ | |
| -- end excerpt -- | |
| configuration in vhost: | |
| --excerpt-- | |
| Configuration | |
| In order to improve performance of Cband, add the following to /etc/apache2/mods-available/cband.conf | |
| CBandScoreFlushPeriod 1 | |
| CBandRandomPulse On | |
| Add sym link in mods-enabled folder | |
| ln -s ../mods-available/cband.conf cband.conf | |
| Make directory to store the accumulated data | |
| mkdir /var/www/scoreboard | |
| Change ownership of directory to the apache user | |
| chown www-data:www-data /var/www/scoreboard/ | |
| Configure access to cband-status. Cband provides a status page, which you must activate via the apache configuration. It is likely you should restrict access to this page by some means. For unrestricted access to this page add the following to cband.conf | |
| <Location /cband-status> | |
| SetHandler cband-status | |
| </Location> | |
| <Location /cband-status-me> | |
| SetHandler cband-status-me | |
| </Location> | |
| In your browser, navigate to http://server/cband-status and observe your new cband status page | |
| Now add cband configuration for one or more virtual hosts, restart apache, and refresh your cband status page | |
| <IfModule mod_cband.c> | |
| CBandLimit 6G | |
| CBandPeriod 4W | |
| CBandPeriodSlice 1W | |
| CBandSpeed 500kbps 10 30 | |
| CBandExceededSpeed 128kbps 5 15 | |
| CBandScoreboard /var/www/scoreboard/domain.com.scoreboard | |
| </IfModule> | |
| If you would like to do something more with all the data Cband is collecting you can retrieve an XML representation by using a url of the form: | |
| http://server/cband-status?xml | |
| --end excrpt-- | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment