Can be done!
I spent some time sorting this very problem this weekend. I am using the stock build of apache with all sorts of other bits in it.
Assuming you're on OS 10.2.3 with Apache 1.3.27, what you need is build yourself a copy of mod_bandwidth. This is freely available from here:
http://www.cohprog.com/v3/bandwidth/intro-en.html
For some reason, the build didn't work for me as per the instructions on the author's website. With a little pushing & pulling, the following worked for me - in all cases don't in clude the quotes:
1. Download the file mod_bandwidth.c to your desktop
2. Open a terminal type 'cd Desktop'
3. Type 'su' & give it your password when asked
4. Type this, with no line breaks, replacing 'mrwalker' with your username:
'gcc -DDARWIN -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -g -Os -pipe -DHARD_SERVER_LIMIT=2048 -DEAPI -DSHARED_MODULE -I/usr/include/httpd -c /Users/mrwalker/Desktop/mod_bandwidth.c'
5. Type this:
'cc -bundle -undefined suppress -flat_namespace -Wl,-bind_at_load -o /usr/libexec/httpd/mod_bandwidth.so mod_bandwidth.o'
6. You should now have a file /usr/libexec/httpd/mod_bandwidth.so. Confirm by typing 'cd /usr/libexec/httpd', then 'ls -l'. Make it world executable: 'chmod +x mod_bandwidth.so'
7. Add the following lines to /etc/httpd/httpd.conf by typing 'pico /etc/httpd/httpd.conf'
Below all the other LoadModule lines, add:
'LoadModule bandwidth_module /usr/libexec/httpd/mod_bandwidth.so'
Below all the other AddModule lines, type
'AddModule mod_bandwidth.c'
8. In the global configuration (or virtual host container if you're using them) add the lines
BandWidthModule On
BandWidth all 1024
This will limit the total number of connections to 1024 bytes per second. Change the 1024 as appropriate.
See
http://www.cohprog.com/v3/bandwidth/doc-en.html for more config options. I advise adding something like 'LargeFileLimit 8196 0', which will ignore the limit for files below 8k.
9. Type Ctrl-o to save the file & Ctrl-x to exit the pico editor.
10. Add the required temp directories:
mkdir /tmp/apachebw
mkdir /tmp/apachebw/link
mkdir /tmp/apachebw/master
chmod -R 777 /tmp/apachebw
11. Restart apache: 'apachectl restart'
If I typed everything right & you followed me, we're done!
-mrwalker