Minimal Apache httpd module that delays requests selected by Apache config
before the request is passed to handlers such as mod_proxy_fcgi.
The module does not inspect User-Agent or URI itself. Use Apache <If expr>
for matching, and put PauseDelayMs inside that block.
The delay runs in the fixups hook, after Apache has evaluated request config
sections such as <If expr>, and before the content handler/proxy handler runs.
make
sudo make installThis installs the module to /usr/local/lib/apache2/modules/mod_pause.so.
If apxs has another name on the server:
make APXS=/usr/bin/apxs2
sudo make install APXS=/usr/bin/apxs2To install under another prefix:
sudo make install PREFIX=/opt/apacheLoadModule pause_module /usr/local/lib/apache2/modules/mod_pause.so
<IfModule pause_module>
<If "%{HTTP_USER_AGENT} =~ m#developers\.facebook\.com#i && %{REQUEST_URI} =~ m#^/shop/#">
PauseDelayMs 1000
</If>
</IfModule>Then reload Apache.