Skip to content

Instantly share code, notes, and snippets.

@dcoles
Created July 16, 2019 01:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dcoles/db6cf6117ad513dbe947f77f67fb09cb to your computer and use it in GitHub Desktop.
Save dcoles/db6cf6117ad513dbe947f77f67fb09cb to your computer and use it in GitHub Desktop.
Nginx out-of-tree build
#!/bin/bash
# Helper script for development build of Nginx
set -e
NGINX_SRC=/home/dcoles/src/nginx
BASEDIR="$(dirname "$(realpath "$0")")"
cd "${BASEDIR}"
mkdir -p build
ln -s -f "${NGINX_SRC}"/{auto,conf,docs,src} build
cd build
if [[ ! -e Makefile ]]; then
auto/configure --prefix="${BASEDIR}"/build/r --with-debug \
--add-module="${BASEDIR}"/nginx/cdn_access \
--add-module="${BASEDIR}"/nginx/cdn_gslb
fi
make
make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment