3 <TITLE>CohProg SaRL - Network Consulting</TITLE>
4 <!--INCLUDE="/v3/template/style.txt"-->
5 <style type="text/css">
9 background-image:url("/v3/graph/bgmain.jpg");
13 background-image:url("/v3/graph/bgtop.gif");
17 background-image:url("/v3/graph/empty.gif");
21 font-family: arial, verdana, helvetica, sans-serif;
27 font-family: verdana, helvetica, sans-serif;
33 font-family: verdana, helvetica, sans-serif;
40 <!--INCLUDE="/v3/javascript/script-en.txt"-->
41 <style type="text/css">
43 text-decoration: none;
52 font-family: verdana, helvetica, sans-serif;
60 border: 1px solid black;
64 background-color: lightgrey;
65 layer-background-color: lightgrey;
66 font-family: verdana, helvetica, sans-serif;
72 <SCRIPT LANGUAGE="JavaScript">
73 <!-- Original: Fredrik Fridsten (fredrik.fridsten@home.se) -->
74 <!-- Web Site: http://hem.passagen.se/dred -->
76 <!-- This script and many more are available free online at -->
77 <!-- The JavaScript Source!! http://javascript.internet.com -->
82 // The input variables to the toggle function are the number of the submenu to open/close,
83 // starting with 0, and the number of pixels to move the objects below.
84 // For example toggle(1,60) opens/closes the second submenu and moves the objects below 60 pixels.
86 var nom = 9; // Number of menus
87 var submenuheigh = 13;
88 var submenuspacing = 10;
89 var usePictures = 1; // use pictures? 1 = yes, 0 = no
91 var ttls = new Array(); // An array for the title objects
92 var subs = new Array(); // An array for the submenu objects
96 var mimageo = new Array();
97 var mimagec = new Array();
99 mimageo[1] = '/v3/menu/home-en.jpg';
100 mimageo[2] = '/v3/menu/hosting-en.jpg';
101 mimageo[3] = '/v3/menu/line-en.jpg';
102 mimageo[4] = '/v3/menu/produces-en.jpg';
103 mimageo[5] = '/v3/menu/consulting-en.jpg';
104 mimageo[6] = '/v3/menu/support-en.jpg';
105 mimageo[7] = '/v3/menu/info-en.jpg';
106 mimageo[8] = '/v3/menu/webmail-en.jpg';
107 mimageo[9] = '/v3/menu/mod-en.jpg';
109 mimagec[1] = '/v3/menu/home-en.jpg';
110 mimagec[2] = '/v3/menu/hosting-en.jpg';
111 mimagec[3] = '/v3/menu/line-en.jpg';
112 mimagec[4] = '/v3/menu/produces-en.jpg';
113 mimagec[5] = '/v3/menu/consulting-en.jpg';
114 mimagec[6] = '/v3/menu/support-en.jpg';
115 mimagec[7] = '/v3/menu/info-en.jpg';
116 mimagec[8] = '/v3/menu/webmail-en.jpg';
117 mimagec[9] = '/v3/menu/mod-en.jpg';
119 if (document.layers) {
128 for (var i = 1; i <= nom; i++) {
129 ttls[i] = ('title' + i);
130 subs[i] = ('submenu' +i);
132 function picopen(n) {
133 title = ('title' + n);
135 if (document.layers) {
136 document.layers[title].document.images[pic].src = mimageo[n];
138 else if (document.all) {
139 document.all(pic).src = mimageo[n];
142 function picclose(n) {
143 title = ('title' + n);
145 if (document.layers) {
146 document.layers[title].document.images[pic].src = mimagec[n];
148 else if (document.all) {
149 document.all(pic).src = mimagec[n];
154 function lasttoggle(n,move) {
156 menu = ('submenu' + n);
157 if (document.layers) {
158 submenu = document.layers[menu];
160 else if (document.all) {
161 submenu = document.all(menu).style;
163 if (submenu.visibility == visible) {
164 submenu.visibility = hidden;
165 picclose(n); // Remove this if you don't use pictures
166 for (var i = (n+1); i <= nom; i++) {
167 if (document.layers) {
168 document.layers[ttls[i]].top -= move;
169 document.layers[subs[i]].top -= move;
171 else if (document.all) {
172 document.all(ttls[i]).style.pixelTop -= move;
173 document.all(subs[i]).style.pixelTop -= move;
179 function toggle(n,tmove) {
180 move = (tmove*submenuheigh)+submenuspacing;
181 menu = ('submenu' + n);
182 if (document.layers) {
183 submenu = document.layers[menu];
185 else if (document.all) {
186 submenu = document.all(menu).style;
188 if (submenu.visibility == visible) {
189 submenu.visibility = hidden;
190 if (usePictures) picclose(n);
191 for (var i = (n+1); i <= nom; i++) {
192 if (document.layers) {
193 document.layers[ttls[i]].top -= move;
194 document.layers[subs[i]].top -= move;
196 else if (document.all) {
197 document.all(ttls[i]).style.pixelTop -= move;
198 document.all(subs[i]).style.pixelTop -= move;
203 submenu.visibility = visible;
204 if (usePictures) picopen(n);
206 lasttoggle(lastn,lastmove);
208 for (var i = (n+1); i <= nom; i++) {
209 if (document.layers) {
210 document.layers[ttls[i]].top += move;
211 document.layers[subs[i]].top += move;
214 document.all(ttls[i]).style.pixelTop += move;
215 document.all(subs[i]).style.pixelTop += move;
226 <SCRIPT LANGUAGE="JavaScript">
227 function open() {return true;}
230 <!--INCLUDE="/v3/template/header.txt"-->
231 <BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="0000FF" VLINK="blueviolet" BACKGROUND="/v3/graph/bg.gif" TOPMARGIN="0" LEFTMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
232 <!--INCLUDE="/v3/template/top-en.txt"-->
233 <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH="100%" HEIGHT="100%">
235 <TD VALIGN=TOP bgcolor=black width=83 height=90><img src="/v3/graph/topleft.jpg" width=83 height=90></TD>
236 <TD VALIGN=TOP bgcolor=black width=134 height=90><img src="/v3/graph/topcohprog1.jpg" width=134 height=90></TD>
237 <TD VALIGN=TOP bgcolor=black width=277 height=90 class=top><img src="/v3/graph/topcohprog2.jpg" width=277 height=90></TD>
238 <TD VALIGN=TOP width="100%" class=top><IMG SRC="/v3/graph/empty.gif" width=1 height=90></TD>
241 <TD valign=top width=83 height="100%"><img src="/v3/graph/left1.jpg" width=83 height=171></TD>
242 <TD bgcolor=white valign=top width=134 height="100%"><img src="/v3/graph/left2.jpg" width=134 height=171></TD>
243 <TD HEIGHT="100%" width="100%" colspan=2 valign=top class=main>
244 <!-- Being page content -->
249 <table border=0 cellspacing=0 cellpadding=0 width="480">
251 <td class=normal colspan=3><img src="/v3/graph/blue1.gif" width=100 height=2></td>
253 <td valign=top class=normal rowspan=2><img src="/v3/graph/blue1.gif" width=2 height=50></td>
254 <td valign=top width="100%" bgcolor="lightgrey" class=normal>
255 <table border=0 width="100%" cellpadding=20 cellspacing=0>
257 <div class=ctitle>Mod_bandwidth documentation</div><P>
260 <b class=ctextbold>Installation :</b><P>
261 WARNING: It is very important to give the lowest priority to mod_bandwidth
262 so other modules will have the time to do their job before the documents
263 are transmited ! For that reason, it is important to follow those steps :<P>
265 <LI> <b class=ctextbold>APACI installation</b><br>
267 <LI>Copy the file mod_bandwidth.c to your Apache source directory.<br>
268 <LI>Run the ./configure script with the following directives : --add-module=mod_bandwidth.c \<br>--permute-module=BEGIN:bandwidth<br>
269 <LI>Compile and install Apache.<P>
271 <b class=ctextbold>Manual installation</b><br>
273 <LI>Copy the file mod_bandwidth.c to the "src/modules/extra" directory of your Apache sources.<br>
274 <LI>Copy the "src/Configuration.tmpl" file to "src/Configuration"<br>
275 <LI>Edit the "src/Configuration" file and add near the begining :<br>
276 AddModule modules/extra/mod_bandwidth.o<br>
277 (This is the reverse of old Apache versions)<br>
278 <LI>Run the "./Configure" script<br>
279 <LI>Compile and install Apache
282 <LI>Create the needed directories and make sure that they are "read/write/execute" for the user under which Apache run. By default, mod_bandwidth use the following directories but they can be changed using the BandWidthDataDir configuration directive:<P>
284 /tmp/apachebw/link<br>
285 /tmp/apachebw/master<P>
287 Note that if any of those directories doesn't exist, or if they can't
288 be accessed by the server, the module is totaly disabled except for
289 logging an error message in the logfile.
291 Be careful that on some systems the content of the /tmp directory
292 is deleted at boot time or every so often by a cronjob. If that the
293 case, either disable this feature or change the location of the
294 directories used by the module using the BandWidthDataDir configuration directive.
297 <b class=ctextbold>Global configuration directives :</b><P>
300 <LI><b class=ctextbold>BandWidthDataDir</b><br>
301 Syntax : BandWidthDataDir <directory><br>
302 Default : "/tmp/apachebw"<br>
303 Context : server config
305 Sets the name of the root directory used by mod_bandwidth to store
306 its internal temporary information. Don't forget to create the needed
307 directories : <directory>/master and <directory>/link<P>
308 <LI><b class=ctextbold>BandWidthModule</b><br>
309 Syntax : BandWidthModule <On|Off><br>
311 Context : per server config<P>
313 Enable or disable totaly the whole module. By default, the module is
314 disable so it is safe to compile it in the server anyway.
316 PLEASE, NOTE THAT IF YOU SET A BANDWIDTH LIMIT INSIDE A VIRTUALHOST
317 BLOCK, YOU ALSO __NEED__ TO PUT THE "BandWidthModule On" DIRECTIVE
318 INSIDE THAT VIRTUALHOST BLOCK !
320 IF YOU SET BANDWIDTH LIMITS INSIDE DIRECTORY BLOCKS (OUTSIDE OF
321 ANY VIRTUALHOST BLOCK), YOU ONLY NEED TO PUT THE "BandWidthModule On"
322 DIRECTIVE ONCE, OUTSIDE OF ANY VIRTUALHOST OR DIRECTORY BLOCK.
324 <LI><b class=ctextbold>BandWidthPulse</b><br>
325 Syntax : BandWidthPulse <microseconds><br>
327 Context : per server config<P>
329 Change the algorithm used to calculate bandwidth and transmit data.
330 In normal mode (old mode), the module try to transmit data in packets
331 of 1KB. That mean that if the bandwidth available is of 512B, the
332 module will transmit 1KB, wait 2 seconds, transmit another 1KB and
335 Seting a value with "BandWidthPulse", will change the algorithm so
336 that the server will always wait the same amount of time between
337 sending packets but the size of the packets will change.
338 The value is in microseconds.
339 For example, if you set "BandWidthPulse 1000000" (1 sec) and the
340 bandwidth available is of 512B, the sever will transmit 512B,
341 wait 1 second, transmit 512B and so on.
343 The advantage is a smother flow of data. The disadvantage is
344 a bigger overhead of data transmited for packet header.
345 Setting too small a value (bellow 1/5 of a sec) is not realy
346 useful and will put more load on the system and generate more
347 traffic for packet header.
349 Note also that the operating system may do some buffering on
350 it's own and so defeat the purpose of setting small values.
352 This may be very useful on especialy crowded network connection :
353 In normal mode, several seconds may happen between the sending of
354 a full packet. This may lead to timeout or people may believe that
355 the connection is hanging. Seting a value of 1000000 (1 sec) would
356 guarantee that some data are sent every seconds...
359 <b class=ctextbold>Directory / VirtualServer configuration directives</b><P>
361 <LI><b class=ctextbold>BandWidth</b><br>
362 Syntax : BandWidth <domain|ip|all> <rate><br>
364 Context : per directory, .htaccess<P>
366 Limit the bandwidth for files in this directory and
367 sub-directories based on the remote host <domain> or
368 <ip> address or for <all> remote hosts.
370 Ip addresses may now be specified in the network/mask format.
371 (Ie: 192.168.0.0/21 )
373 The <rate> is in Bytes/second.
374 A <rate> of "0" means no bandwidth limit.
376 Several BandWidth limits can be set for the same
377 directory to set different limits for different
378 hosts. In this case, the order of the "BandWidth"
379 keywords is important as the module will take the
380 first entry which matches the client address.
383 <Directory /home/www><BR>
384 BandWidth ecp.fr 0<BR>
385 BandWidth 138.195 0<BR>
386 BandWidth all 1024<BR>
387 </Directory><P>
389 This will limit the bandwith for directory /home/www and
390 all it's subdirectories to 1024Bytes/sec, except for
391 .ecp.fr or 138.195..where no limit is set.
393 <LI><b class=ctextbold>LargeFileLimit</b><br>
394 Syntax : LargeFileLimit <filesize> <rate><br>
396 Context : per directory, .htaccess<P>
398 Set a maximal <rate> (in bytes/sec) to use when transfering
399 a file of <filesize> KBytes or more.
401 Several "LargeFileLimit" can be set for various files sizes
402 to create range. The rate used for a given file size will be
403 the one of the matching range.
405 A <rate> of "0" mean that there isn't any limit based on
408 A <rate> of "-1" mean that there isn't any limit for that type
409 of file. It's override even a BandWidth limit. I found this usefull
410 to give priority to very small files (html pages, very small pictures)
411 while seting limits for larger files... (users with their video files
415 If the following limits are set :<BR>
416 LargeFileLimit 200 3072<BR>
417 LargeFileLimit 1024 2048<P>
419 That's mean that a file of less than 200KBytes won't be
420 limited based on his size. A file with a size between
421 200KBytes (included) and 1023Kbytes (included) will be
422 limited to 3072Bytes/sec and a file of 1024Kbytes or more
423 will be limited to 2048Bytes/sec.
425 <LI><b class=ctextbold>MinBandWidth</b><br>
426 Syntax : MinBandWidth <domain|ip|all> <rate><BR>
427 Default : all 256<BR>
428 Context : per directory, .htaccess<P>
430 Set a minimal bandwidth to use for transfering data. This
431 over-ride both BandWidth and LargeFileLimit rules as well
432 as the calculated rate based on the number of connections.
434 The first argument is used in the same way as the first
435 argument of BandWidth.
437 <rate> is in bytes per second.
439 A rate of "0" explicitly means to use the default minimal
440 value (256 Bytes/sec).
442 A rate of "-1" means that the minimal rate is equal to the
443 actual rate defined by BandWidth and LargeFileLimit.
444 In fact, that means that the final rate won't depend
445 of the number of connections but only on what was defined.
448 If BandWidth is set to "3072" (3KBytes/sec) and MinBandWidth
449 is set to "1024" (1KBytes/sec) that means :<BR>
450 - if there is one connection, the file will be transfered
451 at 3072 Bytes/sec.<BR>
452 - if there is two connections, each files will be transfered
453 at 1536 Bytes/sec.<BR>
454 - if there is three or more connections, each files will be
455 transfered at 1024 Bytes/sec. (Minimal of 1024 Bytes/sec).
457 If MinBandWidth is set to "-1" that means :<BR>
458 - if there is one connection, the file will be transfered
459 at 3072 Bytes/sec.<BR>
460 - if there is two or more connections, each files will be
461 transfered at 3072 Bytes/sec. In effect, the rate doesn't
462 depend anymore on the number of connections but only on
463 the configuration values.
465 Note that the total transfer rate will never exceed your physical
466 bandwidth limitation.
468 Note : If both a "BandWidth" and a "LargeFileLimit" limit apply,
469 the lowest one will be used. (But never lower than the
472 If both a virtual server limit is defined and another
473 apply for a directory under this virtual server, the
474 directory limit will over-ride it.
476 If a limit is defined outside a Directory or VirtualHost
477 directive, it will act as default on a per virtual server
478 basis. (Ie: each virtual server will have that limit,
479 _independantly_ of the other servers)
482 <B class=ctextbold>Runing Apache with mod_bandwidth :</B><P>
483 For correct results, it is important that there isn't any "dead" links in
484 the "link" directory of mod_bandwidth when you start the server.<P>
485 It may be a good idee to run the "cleanlink.pl" script we provide to
486 automaticaly remove dead links<br>
491 <td valign=bottom width=2 class=normal rowspan=2><img src="/v3/graph/blue1.gif" width=2 height=50></td>
493 <td colspan=2 class=normal align=right><img src="/v3/graph/blue1.gif" width=100 height=2></td>
496 <!-- End page content -->
497 <!--INCLUDE="/v3/template/footer-en.txt"-->
503 <div class="title" id="title1" style="top: 260px">
504 <a class="mlink" href="http://www.cohprog.com/"><img name="pic1" src="/v3/menu/home-en.jpg" border="0"></a>
507 <div class="title" id="title2" style="top: 285px">
508 <a class="mlink" href="#" onclick="javascript: toggle(2,7); return false"><img name="pic2" src="/v3/menu/hosting-en.jpg" border="0"></a>
511 <div class="submenu" id="submenu2" style="top: 305px">
512 <a class="mlink" href="http://www.cohprog.com/v3/webhosting/intro-en.html" ><img src="/v3/graph/arrow.jpg" border=0>Introduction</a><br>
513 <a class="mlink" href="http://www.cohprog.com/v3/webhosting/mailprices-en.html" ><img src="/v3/graph/arrow.jpg" border=0>E-mail / DNS</a><br>
514 <a class="mlink" href="http://www.cohprog.com/v3/webhosting/webprices-en.html" ><img src="/v3/graph/arrow.jpg" border=0>Hosting prices</a><br>
515 <a class="mlink" href="http://www.cohprog.com/v3/webhosting/coprices-en.html" ><img src="/v3/graph/arrow.jpg" border=0>Co-location and<br><img src="/v3/graph/empty.gif" width="9" border=0>Dedicated hosting</a><br>
516 <a class="mlink" href="http://www.cohprog.com/v3/webhosting/domain-en.html" ><img src="/v3/graph/arrow.jpg" border=0>Domain registration</a><br>
517 <a class="mlink" href="http://www.cohprog.com/v3/webhosting/whois-en.html" ><img src="/v3/graph/arrow.jpg" border=0>Domain availability</a>
520 <div class="title" id="title3" style="top: 310px">
521 <a class="mlink" href="#" onclick="javascript: toggle(3,3); return false"><img name="pic3" src="/v3/menu/line-en.jpg" border="0"></a>
524 <div class="submenu" id="submenu3" style="top: 330px">
525 <a class="mlink" href="http://www.cohprog.com/v3/dsl/intro-en.html" ><img src="/v3/graph/arrow.jpg" border=0>Intoduction</a><br>
526 <a class="mlink" href="http://www.cohprog.com/v3/dsl/location-en.html" ><img src="/v3/graph/arrow.jpg" border=0>POP Locations</a><br>
527 <a class="mlink" href="http://www.cohprog.com/v3/dsl/prices-en.html" ><img src="/v3/graph/arrow.jpg" border=0>Prices</a>
530 <div class="title" id="title4" style="top: 335px">
531 <a class="mlink" href="#" ><img name="pic4" src="/v3/menu/produces-en.jpg" border="0"></a>
534 <div class="submenu" id="submenu4" style="top: 355px">
535 <a class="mlink" href="" ><img src="/v3/graph/arrow.jpg" border=0>Database</a><br>
536 <a class="mlink" href="" ><img src="/v3/graph/arrow.jpg" border=0>Shopping cart</a><br>
537 <a class="mlink" href="" ><img src="/v3/graph/arrow.jpg" border=0>On-line auction</a><br>
540 <div class="title" id="title5" style="top: 360px">
541 <a class="mlink" href="#" ><img name="pic5" src="/v3/menu/consulting-en.jpg" border="0"></a>
544 <div class="submenu" id="submenu5" style="top: 380px">
545 <a class="mlink" href="" ><img src="/v3/graph/arrow.jpg" border=0>Network</a><br>
546 <a class="mlink" href="" ><img src="/v3/graph/arrow.jpg" border=0>Administration</a><br>
547 <a class="mlink" href="" ><img src="/v3/graph/arrow.jpg" border=0>Development</a><br>
550 <div class="title" id="title6" style="top: 385px">
551 <a class="mlink" href="#" onclick="javascript: toggle(6,4); return false"><img name="pic6" src="/v3/menu/support-en.jpg" border="0"></a>
554 <div class="submenu" id="submenu6" style="top: 405px">
555 <a class="mlink" href="http://www.cohprog.com/v3/support/linefaq-en.html" ><img src="/v3/graph/arrow.jpg" border=0>E-mail/Line FAQ</a><br>
556 <a class="mlink" href="http://www.cohprog.com/v3/support/webfaq-en.html" ><img src="/v3/graph/arrow.jpg" border=0>Webhosting FAQ</a><br>
557 <a class="mlink" href="http://www.cohprog.com/v3/support/stat-en.html" ><img src="/v3/graph/arrow.jpg" border=0>Web statistics</a><br>
558 <a class="mlink" href="mailto:support@cohprog.com" ><img src="/v3/graph/arrow.jpg" border=0>Email support</a><br>
561 <div class="title" id="title7" style="top: 410px">
562 <a class="mlink" href="#" onclick="javascript: toggle(7,3); return false"><img name="pic7" src="/v3/menu/info-en.jpg" border="0"></a>
565 <div class="submenu" id="submenu7" style="top: 430px">
566 <a class="mlink" href="http://www.cohprog.com/v3/info/about-en.html" ><img src="/v3/graph/arrow.jpg" border=0>About us</a><br>
567 <a class="mlink" href="http://www.cohprog.com/v3/info/customers-en.html" ><img src="/v3/graph/arrow.jpg" border=0>Our customers</a><br>
568 <a class="mlink" href="http://www.cohprog.com/v3/info/contact-en.html" ><img src="/v3/graph/arrow.jpg" border=0>Contact us</a><br>
571 <div class="title" id="title8" style="top: 435px">
572 <a class="mlink" href="#" onclick="javascript: toggle(8,3); return false"><img name="pic8" src="/v3/menu/webmail-en.jpg" border="0"></a>
575 <div class="submenu" id="submenu8" style="top: 455px">
576 <a class="mlink" href="http://webmail.cohprog.com" ><img src="/v3/graph/arrow.jpg" border=0>Login</a><br>
577 <a class="mlink" href="https://webmail.cohprog.com" ><img src="/v3/graph/arrow.jpg" border=0>Secure login</a><br>
578 <a class="mlink" href="http://www.cohprog.com/v3/webmail/help-en.html" ><img src="/v3/graph/arrow.jpg" border=0>Help</a><br>
581 <div class="title" id="title9" style="top: 485px">
582 <a class="mlink" href="#" onclick="javascript: toggle(9,4); return false"><img name="pic9" src="/v3/menu/mod-en.jpg" border="0"></a>
585 <div class="submenu" id="submenu9" style="top: 505px">
586 <a class="mlink" href="http://www.cohprog.com/v3/bandwidth/intro-en.html" ><img src="/v3/graph/arrow.jpg" border=0>Introduction</a><br>
587 <a class="mlink" href="http://www.cohprog.com/v3/bandwidth/doc-en.html" ><img src="/v3/graph/arrow.jpg" border=0>Documentation</a><br>
588 <a class="mlink" href="http://www.cohprog.com/v3/bandwidth/download-en.html" ><img src="/v3/graph/arrow.jpg" border=0>Download</a><br>
589 <a class="mlink" href="http://www.cohprog.com/v3/bandwidth/faq-en.html" ><img src="/v3/graph/arrow.jpg" border=0>FAQ</a><br>
592 <!--INCLUDE="/v3/javascript/menu-en.txt"-->
596 <td colspan=2><br></td>
599 <tr><td align=center class=normal>
600 <a href="/v3/webhosting/intro-en.html">Web hosting</a> |
601 <a href="/v3/dsl/intro-en.html">Leased lines</a> |
604 <a href="/v3/support/">Support</a> |
605 <a href="/v3/info/about-en.html">About us</a> |
606 <a href="/v3/info/contact-en.html">Contact us</a>
608 <tr><td align=center class=normal>
609 <a href="/v3/info/customers-en.html">Our customers</a> |
610 <a href="/v3/webmail/help-en.html">Webmail</a> |
611 <a href="/v3/bandwidth/intro-en.html">Apache mod_bandwidth</a>
619 <TD><br></TD><TD colspan=2>
620 <font size="2">Copyright ©2000 CohProg Sàrl. All rights reserved.</font></td></tr>