#!/bin/bash # Compilation et installation de Nginx + OpenSSL/PCRE/ZLIB statiques mkdir -p nginx-static cd nginx-static ################################################## NGINX_VERSION="1.19.6" FAKE_NGINX_NAME="Fuck you W3 Server" SSL_VERSION="1.1.1i" PCRE_VERSION="8.44" ZLIB_VERSION="1.2.11" OPTS=" --with-threads --with-http_ssl_module --with-http_v2_module --with-http_stub_status_module --with-http_sub_module --with-http_auth_request_module --with-openssl=../openssl-${SSL_VERSION} --with-pcre=../pcre-${PCRE_VERSION} --with-zlib=../zlib-${ZLIB_VERSION} --with-http_gzip_static_module --add-module=../headers-more-nginx-module " ################################################## apt-get -y install build-essential git ################################################## [ -d nginx ] || mkdir nginx cd nginx ################################################## [ -f nginx-${NGINX_VERSION}.tar.gz ] || wget "http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" tar -xzf nginx-${NGINX_VERSION}.tar.gz if [ -d headers-more-nginx-module ] ; then cd headers-more-nginx-module git pull https://github.com/openresty/headers-more-nginx-module.git cd .. else git clone https://github.com/openresty/headers-more-nginx-module.git fi [ -f openssl-${SSL_VERSION}.tar.gz ] || wget "http://www.openssl.org/source/openssl-${SSL_VERSION}.tar.gz" [ -d openssl-${SSL_VERSION} ] && rm -rf openssl-${SSL_VERSION} tar -xzf openssl-${SSL_VERSION}.tar.gz [ -f pcre-${PCRE_VERSION}.tar.gz ] || wget "https://ftp.pcre.org/pub/pcre/pcre-${PCRE_VERSION}.tar.gz" [ -d pcre-${PCRE_VERSION} ] && rm -rf pcre-${PCRE_VERSION} tar -xzf pcre-${PCRE_VERSION}.tar.gz [ -f zlib-${ZLIB_VERSION}.tar.gz ] || wget "http://zlib.net/zlib-${ZLIB_VERSION}.tar.gz" [ -d zlib-${ZLIB_VERSION} ] && rm -rf zlib-${ZLIB_VERSION} tar -xzf zlib-${ZLIB_VERSION}.tar.gz ################################################## cd nginx-${NGINX_VERSION} sed -i "s/