Skip to content

Instantly share code, notes, and snippets.

@sfan5 sfan5/
Last active Dec 26, 2018

What would you like to do?
Compiles nginx statically linked with libressl
#!/bin/bash -e
NGINX_CONFIG="--with-pcre-jit --with-threads --with-http_ssl_module --with-http_v2_module"
[ -f libressl.tar.gz ] || \
wget$LIBRESSL_VERSION.tar.gz \
-O libressl.tar.gz
[ -d libressl ] || {
mkdir libressl
tar -xz --strip-components=1 -f libressl.tar.gz -C libressl
cd libressl
./configure --prefix=/ --with-openssldir=/etc/ssl --disable-shared
make -j4
make DESTDIR=$PWD/_install install
cd ..
[ -f nginx.tar.gz ] || \
wget$NGINX_VERSION.tar.gz -O nginx.tar.gz
[ -d nginx ] || {
mkdir nginx
tar -xz --strip-components=1 -f nginx.tar.gz -C nginx
sed 's|/\.openssl/|/_install/|g' -i nginx/auto/lib/openssl/conf
echo >nginx/auto/lib/openssl/make
cd nginx
./configure $NGINX_CONFIG --with-openssl=$PWD/../libressl
make -j4
cd ..
echo "Done."
echo "If you want to install nginx system-wide run:"
echo " \$ cd nginx; sudo make install"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.