Allows ab to bypass or invalidate cdn/web cache by passing random parameters

Shortcut using docker

https://github.com/j3ffrw/httpd/tree/cache_buster/2.4/alpine

Details of building Apache Benchmarch(httpd) from source

Linux Mint 19.1

  1. Build openssl
wget https://www.openssl.org/source/old/1.1.1/openssl-1.1.1e.tar.gz
tar xvzf openssl-1.1.1e.tar.gz

cd openssl-1.1.1e
mkdir /opt/ssl
./config --prefix=/opt/ssl --openssldir=/opt/ssl no-ssl2 shared zlib
make -j4
make install
  1. Test openssl
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ssl/lib /opt/ssl/bin/openssl version -a
echo "" | LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/ssl/lib /opt/ssl/bin/openssl s_client -connect www.google.com:443
  1. Build httpd 2.4.43
wget https://downloads.apache.org//httpd/httpd-2.4.43.tar.gz
tar xvzf httpd-2.4.43.tar.gz

cd httpd-2.4.43/srclib
wget https://downloads.apache.org//apr/apr-1.7.0.tar.gz
tar xvzf apr-1.7.0.tar.gz
ln -s apr-1.7.0 apr
wget https://downloads.apache.org//apr/apr-util-1.6.1.tar.gz
tar xvzf apr-util-1.6.1.tar.gz
ln -s apr-util-1.6.1 apr-util
cd ..
# Apply ab.c.patch if desired
# https://github.com/j3ffrw/httpd/blob/cache_buster/2.4/alpine/ab.c.patch

./configure --with-included-apr --enable-static-ab --with-ssl=/opt/ssl/ --enable-ssl-staticlib-deps --enable-mods-static=ssl --enable-ssl
make -j4
  1. Test ab
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/ssl/lib ./support/ab -V

References: https://chrismiles.livejournal.com/21720.html https://rainbow.chard.org/2012/09/14/using-ab-to-benchmark-with-different-or-random-requests/