[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FYI: mod_throttle
- To: misc_(_at_)_openbsd_(_dot_)_org
- Subject: Re: FYI: mod_throttle
- From: Per Engelbrecht <per_(_at_)_xterm_(_dot_)_dk>
- Date: Sat, 05 Feb 2005 15:46:41 +0100
Bram Van Dam wrote:
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,
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.
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.)
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).
Would that be a 12 or a 27 string one ?
Ok I'll cut the crap. I think it's brilliant when people from time to
time share their this_works experiences with the rest of us on the list.
I for one, saves all tips & tricks mails like this one.
It has proven itself handy quite a few times.
In short, thumbs up Bram.
Visit your host, monkey.org