#sudo https://github.com/openresty/headers-more-nginx-
module/archive/${HEADERS_MORE_VER}${EXT_TAR} >>
${INSTALL_LOG_FILE_PATH} 2>&1 && \
# sudo tar xzf $HEADERS_MORE_TAR >>
${INSTALL_LOG_FILE_PATH} 2>&1
sudo wget https://github.com/openresty/headers-more-nginx-
module/archive/v0.33.tar.gz >> ${INSTALL_LOG_FILE_PATH} 2>&1 && \
sudo tar xzf v0.33.tar.gz >> ${INSTALL_LOG_FILE_PATH} 2>&1
# Download (third party) NGINX modules: cache purge and GeoIP2
# The GeoIP module included with NGINX only works with v1 MaxMind
database files
# V2 database files are far superior, see here for more info:
# https://dev.maxmind.com/geoip/geoip2/whats-new-in-geoip2/
sudo git clone --recursive https://github.com/FRiCKLE/ngx_cache_purge.git
>> ${INSTALL_LOG_FILE_PATH} 2>&1
sudo git clone --recursive https://github.com/leev/ngx_http_geoip2_module.git
>> ${INSTALL_LOG_FILE_PATH} 2>&1
# Remove archive files
sudo rm -rf *.tar.gz >> ${INSTALL_LOG_FILE_PATH} 2>&1
echo "$(date +"%d-%b-%Y-%H-%M-%S") | Building NGINX from source..."
|& tee -a ${INSTALL_LOG_FILE_PATH}
# Configure the build options for NGINX
cd $NGINX_SRC_FOLDER_PATH
sudo ./configure \
--prefix=/usr/share/nginx \
--sbin-path=/usr/sbin/nginx \