mod_sleep 2.1 review
Downloadmod_sleep module simply sleeps a fixed length of time every request
|
|
mod_sleep module simply sleeps a fixed length of time every request. The sleep time can be configured globally, or per < VirtualHost >, < Directory >, or < Location >.
This module serves more as an example than providing any really useful function, though someone did ask for it - sort of.
Configuration:
The commands below can be added to the general Apache configuration file, httpd.conf.
SleepTime duration
Context: server, < VirtualHost >, < Directory >, < Location >
The duration is a number followed by an optional suffix s, m, or h for seconds, minutes, or hours respectively. When no suffix is given the default is seconds.
Installation:
Download either:
mod_sleep100.tgz for Apache 1.3
mod_sleep201.tgz for Apache 2.0
and unpack.
Next, to build this module as DSO library for Apache, just type:
cd (path to)/mod_sleep-2.1
make -f Makefile.dso install
To build as a static module into Apache 2.0:
cd (path to)/apache_2.0.43
mkdir -p modules/com/snert
mv (path to)/mod_sleep-2.1 modules/com/snert/sleep
./buildconf
./configure
--enable-sleep
... (your other configuration options) ...
make install
To build as a static module into Apache 1.3:
cd (path to)/apache_1.3.27
./configure
--add-module=(absoulte path to)/mod_sleep-1.0/mod_sleep.c
--disable-shared=sleep
... (your other configuration options) ...
make install
The following can be added to the global server configuration or any < VirtualHost >, < Directory >, < Location > block within httpd.conf in order for mod_sleep to function:
< IfModule mod_sleep.c >
SleepTime 20s
< /IfModule >
Restart the web server:
apachectl restart
mod_sleep 2.1 search tags