add submodules
This commit is contained in:
parent
c446c1df35
commit
e6b032c68d
|
@ -0,0 +1,42 @@
|
|||
[submodule "lib/openssl-patch"]
|
||||
path = lib/openssl-patch
|
||||
url = https://github.com/hakasenyang/openssl-patch.git
|
||||
[submodule "lib/ngx_cache_purge"]
|
||||
path = lib/ngx_cache_purge
|
||||
url = https://github.com/FRiCKLE/ngx_cache_purge.git
|
||||
[submodule "lib/ngx_devel_kit"]
|
||||
path = lib/ngx_devel_kit
|
||||
url = https://github.com/simpl/ngx_devel_kit.git
|
||||
[submodule "lib/headers-more-nginx-module"]
|
||||
path = lib/headers-more-nginx-module
|
||||
url = https://github.com/openresty/headers-more-nginx-module.git
|
||||
[submodule "lib/echo-nginx-module"]
|
||||
path = lib/echo-nginx-module
|
||||
url = https://github.com/openresty/echo-nginx-module.git
|
||||
[submodule "lib/ngx_http_substitutions_filter_module"]
|
||||
path = lib/ngx_http_substitutions_filter_module
|
||||
url = https://github.com/yaoweibin/ngx_http_substitutions_filter_module.git
|
||||
[submodule "lib/redis2-nginx-module"]
|
||||
path = lib/redis2-nginx-module
|
||||
url = https://github.com/openresty/redis2-nginx-module.git
|
||||
[submodule "lib/srcache-nginx-module"]
|
||||
path = lib/srcache-nginx-module
|
||||
url = https://github.com/openresty/srcache-nginx-module.git
|
||||
[submodule "lib/set-misc-nginx-module"]
|
||||
path = lib/set-misc-nginx-module
|
||||
url = https://github.com/openresty/set-misc-nginx-module.git
|
||||
[submodule "lib/ngx_http_auth_pam_module"]
|
||||
path = lib/ngx_http_auth_pam_module
|
||||
url = https://github.com/sto/ngx_http_auth_pam_module.git
|
||||
[submodule "lib/nginx-module-vts"]
|
||||
path = lib/nginx-module-vts
|
||||
url = https://github.com/vozlt/nginx-module-vts.git
|
||||
[submodule "lib/ngx_brotli"]
|
||||
path = lib/ngx_brotli
|
||||
url = https://github.com/eustas/ngx_brotli.git
|
||||
[submodule "lib/zlib"]
|
||||
path = lib/zlib
|
||||
url = https://github.com/cloudflare/zlib.git
|
||||
[submodule "lib/nginx-rtmp-module"]
|
||||
path = lib/nginx-rtmp-module
|
||||
url = https://github.com/arut/nginx-rtmp-module.git
|
12
.travis.yml
12
.travis.yml
|
@ -15,12 +15,18 @@ script:
|
|||
- sudo apt-get install -y --force-yes git nginx curl wget
|
||||
- export NGINX_RELEASE="1"
|
||||
- sudo bash nginx-build.sh $TRAVIS_BRANCH
|
||||
- sudo bash -c 'cat /tmp/nginx-ee.log'
|
||||
- sudo bash -c 'tail -n 50 /tmp/nginx-ee.log'
|
||||
- export NGINX_RELEASE="2"
|
||||
- sudo bash nginx-build.sh $TRAVIS_BRANCH
|
||||
- sudo bash -c 'cat /tmp/nginx-ee.log'
|
||||
- sudo bash -c 'tail -n 50 /tmp/nginx-ee.log'
|
||||
- export NGINX_RELEASE="1"
|
||||
- export PAGESPEED="y"
|
||||
- export NAXSI="y"
|
||||
- export RTMP="y"
|
||||
- sudo bash nginx-build.sh $TRAVIS_BRANCH
|
||||
- sudo bash -c 'cat /tmp/nginx-ee.log'
|
||||
- sudo bash -c 'tail -n 50 /tmp/nginx-ee.log'
|
||||
- export NGINX_RELEASE="2"
|
||||
- export PAGESPEED="y"
|
||||
- export NAXSI="y"
|
||||
- export RTMP="y"
|
||||
- sudo bash -c 'tail -n 50 /tmp/nginx-ee.log'
|
73
README.md
73
README.md
|
@ -1,17 +1,19 @@
|
|||
# Nginx-EE
|
||||
|
||||
## Compile and install the latest nginx releases from source with additional modules with EasyEngine, Plesk Onyx or from scratch
|
||||
|
||||
![nginx-ee](https://raw.githubusercontent.com/VirtuBox/nginx-ee/master/nginx-ee.png)
|
||||
|
||||
[![Build Status](https://travis-ci.com/VirtuBox/nginx-ee.svg?branch=master)](https://travis-ci.com/VirtuBox/nginx-ee) [![](https://img.shields.io/github/license/VirtuBox/nginx-ee.svg)](https://github.com/VirtuBox/nginx-ee/blob/master/LICENSE) [![](https://img.shields.io/github/stars/VirtuBox/nginx-ee.svg)](https://github.com/VirtuBox/nginx-ee)
|
||||
|
||||
Automated Nginx compilation with additional modules for EasyEngine v3, Plesk Onyx or from scratch
|
||||
|
||||
---
|
||||
|
||||
## Features
|
||||
|
||||
* Compile the latest Nginx Mainline or Stable Release
|
||||
* Compile the latest Nginx release : stable or mainline
|
||||
* Install Nginx or replace Nginx package previously installed
|
||||
* Nginx official modules selection
|
||||
* Nginx Third-party Additonal selection
|
||||
* Nginx Third-party module selection
|
||||
* Brotli Support
|
||||
* TLS v1.3 support (Final)
|
||||
* Cloudflare HPACK (for Mainline release only)
|
||||
|
@ -23,18 +25,18 @@
|
|||
Nginx current mainline release : **v1.15.7**
|
||||
Nginx current stable release : **v1.14.2**
|
||||
|
||||
* ngx_cache_purge
|
||||
* headers-more-nginx-module
|
||||
* [ngx_cache_purge](https://github.com/FRiCKLE/ngx_cache_purge)
|
||||
* [headers-more-nginx-module](https://github.com/openresty/headers-more-nginx-module)
|
||||
* [ngx_brotli](https://github.com/eustas/ngx_brotli)
|
||||
* srcache-nginx-module
|
||||
* ngx_http_substitutions_filter_module
|
||||
* [srcache-nginx-module](https://github.com/openresty/srcache-nginx-module)
|
||||
* [ngx_http_substitutions_filter_module](https://github.com/yaoweibin/ngx_http_substitutions_filter_module)
|
||||
* [nginx_dynamic_tls_records](https://github.com/nginx-modules/ngx_http_tls_dyn_size)
|
||||
* Openssl 1.1.2-dev
|
||||
* [OpenSSL](https://github.com/openssl/openssl)
|
||||
* [ipscrub](http://www.ipscrub.org/)
|
||||
* ngx_http_auth_pam_module
|
||||
* [ngx_http_auth_pam_module](https://github.com/sto/ngx_http_auth_pam_module)
|
||||
* [virtual-host-traffic-status](https://github.com/vozlt/nginx-module-vts)
|
||||
|
||||
optional modules :
|
||||
Optional modules :
|
||||
|
||||
* [ngx_pagespeed](https://github.com/apache/incubator-pagespeed-ngx) (latest-beta or latest-stable)
|
||||
* [naxsi WAF](https://github.com/nbs-system/naxsi)
|
||||
|
@ -67,9 +69,6 @@ optional modules :
|
|||
- [Nginx modules](#nginx-modules)
|
||||
- [Override list of modules built by default with nginx-ee](#override-list-of-modules-built-by-default-with-nginx-ee)
|
||||
- [Override list of third-party modules built by default with nginx-ee](#override-list-of-third-party-modules-built-by-default-with-nginx-ee)
|
||||
- [Troubleshooting](#troubleshooting)
|
||||
- [TLSv1.2 + TLSv1.3](#tlsv12--tlsv13)
|
||||
- [TLSv1.0 + TLSv1.1 + TLSv1.2 + TLSv1.3](#tlsv10--tlsv11--tlsv12--tlsv13)
|
||||
- [Nginx configurations](#nginx-configurations)
|
||||
- [Roadmap](#roadmap)
|
||||
|
||||
|
@ -78,21 +77,22 @@ optional modules :
|
|||
### Interactive install
|
||||
|
||||
```bash
|
||||
bash <(wget -qO - https://raw.githubusercontent.com/VirtuBox/nginx-ee/master/nginx-build.sh)
|
||||
bash <(wget -O - https://raw.githubusercontent.com/VirtuBox/nginx-ee/master/nginx-build.sh) --interactive
|
||||
```
|
||||
|
||||
### Non interactive install
|
||||
|
||||
```bash
|
||||
bash <(wget -qO - https://raw.githubusercontent.com/VirtuBox/nginx-ee/master/nginx-build.sh) [options] ...
|
||||
bash <(wget -O - https://raw.githubusercontent.com/VirtuBox/nginx-ee/master/nginx-build.sh) [options] ...
|
||||
```
|
||||
|
||||
#### Options available
|
||||
|
||||
Nginx release (required) :
|
||||
Build options :
|
||||
|
||||
* `--mainline` : compile nginx mainline release
|
||||
* `--stable` : compile nginx stable release
|
||||
* `--full` : compile nginx mainline release with all additional modules
|
||||
|
||||
Additional modules (optional)
|
||||
|
||||
|
@ -106,7 +106,7 @@ Example :
|
|||
Compile Nginx mailine release with pagespeed stable
|
||||
|
||||
```bash
|
||||
bash <(wget -qO - https://raw.githubusercontent.com/VirtuBox/nginx-ee/master/nginx-build.sh) --mainline --pagespeed
|
||||
bash <(wget -O - https://raw.githubusercontent.com/VirtuBox/nginx-ee/master/nginx-build.sh) --mainline --pagespeed
|
||||
```
|
||||
|
||||
### Nginx modules
|
||||
|
@ -187,43 +187,6 @@ export OVERRIDE_NGINX_ADDITIONAL_MODULES="--add-module=/usr/local/src/ngx_http_s
|
|||
bash <(wget -qO - https://raw.githubusercontent.com/VirtuBox/nginx-ee/master/nginx-build.sh)
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
TLS v1.3 do not work or browser show error message `ERR_SSL_VERSION_OR_CIPHER_MISMATCH` :
|
||||
|
||||
Update nginx ssl_ciphers in `/etc/nginx/nginx.conf` for EasyEngine servers or `/etc/nginx/conf.d/ssl.conf` for Plesk servers
|
||||
|
||||
### TLSv1.2 + TLSv1.3
|
||||
|
||||
```nginx
|
||||
##
|
||||
# SSL Settings
|
||||
##
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_ciphers 'TLS13+AESGCM+AES128:EECDH+AES128';
|
||||
ssl_prefer_server_ciphers on;
|
||||
ssl_session_cache shared:SSL:50m;
|
||||
ssl_session_timeout 1d;
|
||||
ssl_session_tickets off;
|
||||
ssl_ecdh_curve X25519:sect571r1:secp521r1:secp384r1;
|
||||
```
|
||||
|
||||
### TLSv1.0 + TLSv1.1 + TLSv1.2 + TLSv1.3
|
||||
|
||||
```nginx
|
||||
##
|
||||
# SSL Settings
|
||||
##
|
||||
# intermediate configuration. tweak to your needs.
|
||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
|
||||
ssl_ciphers 'TLS13+AESGCM+AES128:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS';
|
||||
ssl_prefer_server_ciphers on;
|
||||
ssl_session_cache shared:SSL:50m;
|
||||
ssl_session_timeout 1d;
|
||||
ssl_session_tickets off;
|
||||
ssl_ecdh_curve X25519:sect571r1:secp521r1:secp384r1;
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Nginx configurations
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Subproject commit c65f5c638d0501b482fbc3ebbda9a49648022d40
|
|
@ -0,0 +1 @@
|
|||
Subproject commit a9f7c7e86cc7441d04e2f11f01c2e3a9c4b0301d
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 46d85558e344dfe2b078ce757fd36c69a1ec2dd3
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 791b6136f02bc9613daf178723ac09f4df5a3bbf
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 8104036af9cff4b1d34f22d00ba857e2a93a243c
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 331fe43e8d9a3d1fa5e0c9fec7d3201d431a9177
|
|
@ -0,0 +1 @@
|
|||
Subproject commit a22dade76c838e5f377d58d007f65d35b5ce1df3
|
|
@ -0,0 +1 @@
|
|||
Subproject commit d9286fc7b52e1a3584da2cb20423f912ec99169f
|
|
@ -0,0 +1 @@
|
|||
Subproject commit bc58cb11844bc42735bbaef7085ea86ace46d05b
|
|
@ -0,0 +1 @@
|
|||
Subproject commit ad8e215e2ec85281e5042b8c2a89fad986f1878d
|
|
@ -0,0 +1 @@
|
|||
Subproject commit c989c829a2877132cb100f901e320921250e068d
|
|
@ -0,0 +1 @@
|
|||
Subproject commit bcfa7a6d0d0fca4dac57d5b45e6064c6fa7f1cae
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 53a98806b0a24cc736d11003662e8b769c3e7eb3
|
|
@ -0,0 +1 @@
|
|||
Subproject commit e55212bbefb9550301329cc00290c237c86b0015
|
139
nginx-build.sh
139
nginx-build.sh
|
@ -7,7 +7,7 @@
|
|||
# Copyright (c) 2018 VirtuBox <contact@virtubox.net>
|
||||
# This script is licensed under M.I.T
|
||||
# -------------------------------------------------------------------------
|
||||
# Version 3.3.3 - 2018-11-27
|
||||
# Version 3.4.0 - 2018-11-27
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
# Check if user is root
|
||||
|
@ -19,18 +19,25 @@
|
|||
# check if curl is installed
|
||||
|
||||
[ ! -x /usr/bin/curl ] && {
|
||||
apt-get install curl
|
||||
apt-get update && apt-get install curl
|
||||
} >>/tmp/nginx-ee.log 2>&1
|
||||
|
||||
# Checking lsb_release package
|
||||
|
||||
[ ! -x /usr/bin/lsb_release ] && {
|
||||
apt-get update && apt-get -y install lsb-release
|
||||
}
|
||||
|
||||
##################################
|
||||
# Variables
|
||||
##################################
|
||||
|
||||
NAXSI_VER=0.56
|
||||
DIR_SRC=/usr/local/src
|
||||
NGINX_EE_VER=3.3.3
|
||||
NGINX_EE_VER=3.4.0
|
||||
NGINX_MAINLINE=$(curl -sL https://nginx.org/en/download.html 2>&1 | grep -E -o 'nginx\-[0-9.]+\.tar[.a-z]*' | awk -F "nginx-" '/.tar.gz$/ {print $2}' | sed -e 's|.tar.gz||g' | head -n 1 2>&1)
|
||||
NGINX_STABLE=$(curl -sL https://nginx.org/en/download.html 2>&1 | grep -E -o 'nginx\-[0-9.]+\.tar[.a-z]*' | awk -F "nginx-" '/.tar.gz$/ {print $2}' | sed -e 's|.tar.gz||g' | head -n 2 | grep 1.14 2>&1)
|
||||
distro_version=$(lsb_release -sc)
|
||||
|
||||
# Colors
|
||||
CSI='\033['
|
||||
|
@ -57,6 +64,11 @@ echo "" >/tmp/nginx-ee.log
|
|||
EE_VALID="YES"
|
||||
}
|
||||
|
||||
[ -d /etc/wo ] && {
|
||||
NGINX_WO=1
|
||||
WO_VALID="YES"
|
||||
}
|
||||
|
||||
[ ! -x /usr/sbin/nginx ] && {
|
||||
NGINX_FROM_SCRATCH=1
|
||||
echo "No Plesk or EasyEngine installation detected"
|
||||
|
@ -68,25 +80,33 @@ echo "" >/tmp/nginx-ee.log
|
|||
|
||||
while [ ${#} -gt 0 ]; do
|
||||
case "${1}" in
|
||||
'--pagespeed')
|
||||
"--pagespeed")
|
||||
PAGESPEED="y"
|
||||
if [ "$2" ]; then
|
||||
PAGESPEED_VER="$2"
|
||||
fi
|
||||
shift
|
||||
;;
|
||||
'--pagespeed-beta')
|
||||
PAGESPEED="y"
|
||||
PAGESPEED_RELEASE="1"
|
||||
;;
|
||||
'--naxsi')
|
||||
"--naxsi")
|
||||
NAXSI="y"
|
||||
;;
|
||||
'--rtmp')
|
||||
"--rtmp")
|
||||
RTMP="y"
|
||||
;;
|
||||
'--latest' | '--mainline')
|
||||
"--mainline" | "latest")
|
||||
NGINX_RELEASE=1
|
||||
;;
|
||||
'--stable')
|
||||
"full")
|
||||
PAGESPEED="y"
|
||||
NAXSI="y"
|
||||
RTMP="y"
|
||||
;;
|
||||
"--stable")
|
||||
NGINX_RELEASE=2
|
||||
;;
|
||||
"-i" | "--interactive")
|
||||
INTERACTIVE_SETUP="1"
|
||||
;;
|
||||
*) ;;
|
||||
esac
|
||||
shift
|
||||
|
@ -101,7 +121,7 @@ echo "Welcome to the nginx-ee bash script v${NGINX_EE_VER}"
|
|||
echo ""
|
||||
|
||||
# interactive
|
||||
if [ -z "$NGINX_RELEASE" ]; then
|
||||
if [ "$INTERACTIVE_SETUP" = "1" ]; then
|
||||
clear
|
||||
echo ""
|
||||
echo "Do you want to compile the latest Nginx [1] Mainline v${NGINX_MAINLINE} or [2] Stable v${NGINX_STABLE} Release ?"
|
||||
|
@ -123,13 +143,17 @@ if [ -z "$NGINX_RELEASE" ]; then
|
|||
while [[ $NAXSI != "y" && $NAXSI != "n" ]]; do
|
||||
read -p "Select an option [y/n]: " NAXSI
|
||||
done
|
||||
|
||||
echo -e '\nDo you want RTMP streaming module (used for video streaming) ? (y/n)'
|
||||
while [[ $RTMP != "y" && $RTMP != "n" ]]; do
|
||||
read -p "Select an option [y/n]: " RTMP
|
||||
done
|
||||
echo ""
|
||||
fi
|
||||
|
||||
if [ -z "$NGINX_RELEASE" ]; then
|
||||
NGINX_RELEASE=1
|
||||
fi
|
||||
|
||||
##################################
|
||||
# Set nginx release and modules
|
||||
##################################
|
||||
|
@ -142,20 +166,25 @@ else
|
|||
NGX_HPACK=""
|
||||
fi
|
||||
|
||||
if [ "$RTMP" = "y" ]; then
|
||||
NGINX_CC_OPT=( [index]=--with-cc-opt='-m64 -march=native -DTCP_FASTOPEN=23 -g -O3 -fstack-protector-strong -flto -fuse-ld=gold --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wimplicit-fallthrough=0 -Wno-error=date-time -D_FORTIFY_SOURCE=2' )
|
||||
|
||||
if [ -z "$RTMP" ]; then
|
||||
if [ "$distro_version" == "xenial" ] || [ "$distro_version" == "bionic" ]; then
|
||||
NGINX_CC_OPT=( [index]=--with-cc-opt='-m64 -march=native -DTCP_FASTOPEN=23 -g -O3 -fstack-protector-strong -flto -fuse-ld=gold --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wimplicit-fallthrough=0 -fcode-hoisting -Wp,-D_FORTIFY_SOURCE=2 -gsplit-dwarf' )
|
||||
NGX_RTMP=""
|
||||
RTMP_VALID="NO"
|
||||
else
|
||||
NGINX_CC_OPT=( [index]='' )
|
||||
NGX_RTMP=""
|
||||
RTMP_VALID="NO"
|
||||
fi
|
||||
else
|
||||
NGINX_CC_OPT=( [index]='' )
|
||||
NGX_RTMP="--add-module=/usr/local/src/nginx-rtmp-module "
|
||||
RTMP_VALID="YES"
|
||||
else
|
||||
if [ "$distro_version" == "xenial" ] && [ "$distro_version" == "bionic" ]; then
|
||||
NGINX_CC_OPT=( [index]=--with-cc-opt='-m64 -march=native -DTCP_FASTOPEN=23 -g -O3 -fstack-protector-strong -flto -fuse-ld=gold --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wimplicit-fallthrough=0 -fcode-hoisting -Wp,-D_FORTIFY_SOURCE=2 -gsplit-dwarf' )
|
||||
else
|
||||
NGINX_CC_OPT=( [index]=--with-cc-opt='-m64 -march=native -DTCP_FASTOPEN=23 -g -O3 -fstack-protector-strong -flto -fuse-ld=gold --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wimplicit-fallthrough=0 -Wno-error=date-time -D_FORTIFY_SOURCE=2' )
|
||||
fi
|
||||
NGX_RTMP=""
|
||||
RTMP_VALID="NO"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if [ "$NAXSI" = "y" ]; then
|
||||
NGX_NAXSI="--add-module=/usr/local/src/naxsi/naxsi_src "
|
||||
NAXSI_VALID="YES"
|
||||
|
@ -166,10 +195,10 @@ fi
|
|||
|
||||
if [ "$PAGESPEED_RELEASE" = "1" ]; then
|
||||
NGX_PAGESPEED="--add-module=/usr/local/src/incubator-pagespeed-ngx-latest-beta "
|
||||
PAGESPEED_VALID="Beta"
|
||||
PAGESPEED_VALID="beta"
|
||||
elif [ "$PAGESPEED_RELEASE" = "2" ]; then
|
||||
NGX_PAGESPEED="--add-module=/usr/local/src/incubator-pagespeed-ngx-latest-stable "
|
||||
PAGESPEED_VALID="Stable"
|
||||
PAGESPEED_VALID="stable"
|
||||
else
|
||||
NGX_PAGESPEED=""
|
||||
PAGESPEED_VALID="NO"
|
||||
|
@ -195,6 +224,7 @@ echo " - Pagespeed : $PAGESPEED_VALID "
|
|||
echo " - Naxsi : $NAXSI_VALID"
|
||||
echo " - RTMP : $RTMP_VALID"
|
||||
echo " - EasyEngine : $EE_VALID"
|
||||
echo " - WordOps : $WO_VALID"
|
||||
echo " - Plesk : $PLESK_VALID"
|
||||
echo ""
|
||||
|
||||
|
@ -208,7 +238,7 @@ apt-get install -y git build-essential libtool automake autoconf zlib1g-dev \
|
|||
libpcre3 libpcre3-dev libgd-dev libssl-dev libxslt1-dev libxml2-dev libgeoip-dev libjemalloc1 libjemalloc-dev \
|
||||
libbz2-1.0 libreadline-dev libbz2-dev libbz2-ocaml libbz2-ocaml-dev software-properties-common sudo tar zlibc zlib1g zlib1g-dbg \
|
||||
libcurl4-openssl-dev libgoogle-perftools-dev libperl-dev libpam0g-dev libbsd-dev zip unzip gnupg gnupg2 pigz libluajit-5.1-common \
|
||||
libluajit-5.1-dev libmhash-dev libexpat-dev libgmp-dev autotools-dev bc checkinstall ccache curl debhelper dh-systemd libxml2 >>/tmp/nginx-ee.log 2>&1
|
||||
libluajit-5.1-dev libmhash-dev libexpat-dev libgmp-dev autotools-dev bc checkinstall ccache debhelper dh-systemd libxml2 >>/tmp/nginx-ee.log 2>&1
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
echo -ne " Installing dependencies [${CGREEN}OK${CEND}]\\r"
|
||||
|
@ -262,18 +292,9 @@ fi
|
|||
# gcc7 for nginx stable on Ubuntu 16.04 LTS
|
||||
# gcc8 for nginx mainline on Ubuntu 16.04 LTS & 18.04 LTS
|
||||
|
||||
# Checking lsb_release package
|
||||
if [ ! -x /usr/bin/lsb_release ]; then
|
||||
sudo apt-get -y install lsb-release | sudo tee -a /tmp/nginx-ee.log 2>&1
|
||||
fi
|
||||
|
||||
# install gcc-7
|
||||
distro_version=$(lsb_release -sc)
|
||||
|
||||
{
|
||||
|
||||
if [ "$distro_version" == "bionic" ] || [ "$distro_version" == "xenial" ]; then
|
||||
if [ ! -f /etc/apt/sources.list.d/jonathonf-ubuntu-gcc-$(lsb_release -sc).list ]; then
|
||||
if [ "$distro_version" = "bionic" ] || [ "$distro_version" = "xenial" ]; then
|
||||
if [ ! -f /etc/apt/sources.list.d/jonathonf-ubuntu-gcc-"$(lsb_release -sc)".list ]; then
|
||||
add-apt-repository -y ppa:jonathonf/gcc
|
||||
apt-get update
|
||||
fi
|
||||
|
@ -375,10 +396,13 @@ fi
|
|||
# clear previous compilation archives
|
||||
|
||||
cd ${DIR_SRC} || exit
|
||||
rm -rf ${DIR_SRC}/{*.tar.gz,nginx,nginx-1.*,openssl,openssl-*,ngx_brotli,pcre,zlib,incubator-pagespeed-*,build_ngx_pagespeed.sh,install,ngx_http_redis*,ngx_cache_purge}
|
||||
rm -rf ${DIR_SRC}/{*.tar.gz,nginx,nginx-1.*,openssl,openssl-*,ngx_brotli,pcre,zlib,incubator-pagespeed-*,build_ngx_pagespeed.sh,install}
|
||||
|
||||
echo -ne ' Downloading additionals modules [..]\r'
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
# cache_purge module
|
||||
{ [ -d ${DIR_SRC}/ngx_cache_purge ] && {
|
||||
|
@ -543,12 +567,14 @@ fi
|
|||
# Download ngx_broti
|
||||
##################################
|
||||
|
||||
cd ${DIR_SRC} || exit 1
|
||||
|
||||
echo -ne ' Downloading brotli [..]\r'
|
||||
{
|
||||
git clone https://github.com/eustas/ngx_brotli
|
||||
cd ngx_brotli || exit 1
|
||||
if [ -d $DIR_SRC/ngx_broti ]; then
|
||||
git -C $DIR_SRC/ngx_broti pull origin master
|
||||
else
|
||||
git clone https://github.com/eustas/ngx_brotli $DIR_SRC/ngx_broti
|
||||
fi
|
||||
cd $DIR_SRC/ngx_broti || exit 1
|
||||
git submodule update --init --recursive
|
||||
} >>/tmp/nginx-ee.log 2>&1
|
||||
|
||||
|
@ -567,9 +593,8 @@ fi
|
|||
|
||||
echo -ne ' Downloading openssl [..]\r'
|
||||
|
||||
cd ${DIR_SRC} || exit 1
|
||||
{
|
||||
git clone https://github.com/openssl/openssl.git
|
||||
git clone https://github.com/openssl/openssl.git $DIR_SRC/openssl
|
||||
cd ${DIR_SRC}/openssl || exit 1
|
||||
} >>/tmp/nginx-ee.log 2>&1
|
||||
|
||||
|
@ -720,16 +745,12 @@ NGINX_BUILD_OPTIONS="--prefix=/usr/share \
|
|||
|
||||
if [ -z "$OVERRIDE_NGINX_MODULES" ]; then
|
||||
NGINX_INCLUDED_MODULES="--without-http_uwsgi_module \
|
||||
--without-mail_imap_module \
|
||||
--without-mail_pop3_module \
|
||||
--without-mail_smtp_module \
|
||||
--with-http_stub_status_module \
|
||||
--with-http_realip_module \
|
||||
--with-http_auth_request_module \
|
||||
--with-http_addition_module \
|
||||
--with-http_geoip_module \
|
||||
--with-http_gzip_static_module \
|
||||
--with-http_image_filter_module \
|
||||
--with-http_gunzip_module \
|
||||
--with-http_mp4_module \
|
||||
--with-http_sub_module"
|
||||
|
||||
|
@ -739,15 +760,15 @@ fi
|
|||
|
||||
if [ -z "$OVERRIDE_NGINX_ADDITIONAL_MODULES" ]; then
|
||||
NGINX_THIRD_MODULES="--add-module=/usr/local/src/ngx_http_substitutions_filter_module \
|
||||
--add-module=/usr/local/src/srcache-nginx-module \
|
||||
--add-module=/usr/local/src/ngx_http_redis \
|
||||
--add-module=/usr/local/src/redis2-nginx-module \
|
||||
--add-module=/usr/local/src/memc-nginx-module \
|
||||
--add-dynamic-module=/usr/local/src/srcache-nginx-module \
|
||||
--add-dynamic-module=/usr/local/src/ngx_http_redis \
|
||||
--add-dynamic-module=/usr/local/src/redis2-nginx-module \
|
||||
--add-dynamic-module=/usr/local/src/memc-nginx-module \
|
||||
--add-module=/usr/local/src/ngx_devel_kit \
|
||||
--add-module=/usr/local/src/set-misc-nginx-module \
|
||||
--add-module=/usr/local/src/ngx_http_auth_pam_module \
|
||||
--add-dynamic-module=/usr/local/src/ngx_http_auth_pam_module \
|
||||
--add-module=/usr/local/src/nginx-module-vts \
|
||||
--add-module=/usr/local/src/ipscrubtmp/ipscrub"
|
||||
--add-dynamic-module=/usr/local/src/ipscrubtmp/ipscrub"
|
||||
else
|
||||
NGINX_THIRD_MODULES="$OVERRIDE_NGINX_ADDITIONAL_MODULES"
|
||||
fi
|
||||
|
@ -764,6 +785,10 @@ ${NGX_USER} \
|
|||
--with-http_v2_module \
|
||||
--with-http_ssl_module \
|
||||
--with-pcre-jit \
|
||||
--with-mail=dynamic \
|
||||
--with-stream=dynamic \
|
||||
--with-http_geoip_module=dynamic \
|
||||
--with-http_image_filter_module=dynamic \
|
||||
${NGINX_INCLUDED_MODULES} \
|
||||
${NGINX_THIRD_MODULES} \
|
||||
${NGX_HPACK} \
|
||||
|
@ -775,7 +800,7 @@ ${NGX_RTMP} \
|
|||
--add-module=/usr/local/src/ngx_brotli \
|
||||
--with-zlib=/usr/local/src/zlib \
|
||||
--with-openssl=/usr/local/src/openssl \
|
||||
--with-openssl-opt='enable-ec_nistp_64_gcc_128 enable-tls1_3' \
|
||||
--with-openssl-opt="enable-ec_nistp_64_gcc_128 enable-tls1_3" \
|
||||
--sbin-path=/usr/sbin/nginx >>/tmp/nginx-ee.log 2>&1
|
||||
|
||||
if [ $? -eq 0 ]; then
|
||||
|
|
Loading…
Reference in New Issue