[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: mod_throttle



I just thought I'd post this here for any of those who are using mod_throttle and are having problems with the ThrottleRuntimeFile setting in the chroot.

Basically, it doesn't work because of the chroot (mod_throttle isn't aware of the chroot, so at apache startup, before its chrooted, it reads the file outside of the chroot, eg /var/www/mod_throttle/throttle.log, but on apache shutdown it will write to the same path inside the chroot, eg /var/www/var/www/mod_throttle/throttle.log

So basically, each and every time you restart apache, all the throttle info is lost.

I simply wrote a shellscript (if it can even be call that, it's pathetic, really) to restart apache, which also copies over the throttle log to where mod_throttle is expecting it to be.

A simple

apachectl stop
sleep 1
cp /var/www/var/www/mod_throttle/throttle.log /var/www/mod_throttle
env -i apachectl start


pretty much does the trick for me.

Just thought I'd mention this. It had me puzzled for a while, so I'm kind of guessing I might not be the only one who ran into this (and if I am, well then I'll just carry on talking to myself.)


- Bram

Yes yes, blabla, "rewrite mod_throttle to work with the chroot instead" blabla. I would if I could (I tried, but I'm about as good at coding as most of you are at playing the harp).



Visit your host, monkey.org