Installation mod_throttle/Apache sous Debian

Mercredi, 13 septembre 2006


(2 votes, Note: 2.5 sur 5) 2 Votes | Average: 2.5 out of 52 Votes | Average: 2.5 out of 52 Votes | Average: 2.5 out of 52 Votes | Average: 2.5 out of 52 Votes | Average: 2.5 out of 5
Loading ... Loading ...
Catégorie: Faq/Tutos
par Nicolas Martinez
Nombre de lectures: 1,220 fois
gnl

Le mod_throttle permet de limiter la bande passante et la charge d’un virtualhost.
Cependant, n’étant pas considéré comme “libre” ;( , il n’est pas présent dans les packages Debian.

Voici comment l’installer pour Apache 1.3:

serveur:~# apt-get install apache-dev

(pour l’apxs, sinon cela ne s’installe pas) Installation :

serveur:~# wget http://www.snert.com/Software/mod_throttle/mod_throttle312.tgz
serveur:~# tar xvfz mod_throttle312.tgz
serveur:~# cd mod_throttle-3.1.2
serveur:~mod_throttle-3.1.2# make install

Rajouter dans httpd.conf :

LoadModule throttle_module libexec/mod_throttle.so
AddModule mod_throttle.c

< IfModule mod_throttle.c>

ThrottlePolicy none

< Location /throttle-ip >
SetHandler throttle-client-ip
< /Location>

< Location /throttle-status >
SetHandler throttle-status
< /Location>

< Location /throttle-me >
SetHandler throttle-me
< /Location>

< /IfModule>

Configuration pour un virtualhost :

< VirtualHost * >
ServerAdmin webmaster@domaine.com
ServerName domaine.com
ServerAlias www.domaine.com
DocumentRoot /home/domaine/www
# 2Go de bande passante pour 30 jours
ThrottlePolicy Volume 2G 30d
# 50 requetes par seconde et par ip
ThrottlePolicy Request 50 1
< /VirtualHost>

Valider par:

serveur:~# apachectl restart

Site Officiel : http://www.snert.com/Software/mod_throttle/

Laisser un commentaire

Vous devez vous identifier pour laisser un commentaire.