mirror of https://github.com/VirtuBox/nginx-ee.git
Few improvements and update README
This commit is contained in:
parent
aefa495f09
commit
ecae9cefc9
|
@ -10,6 +10,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|||
|
||||
- Debian 10 (buster) support
|
||||
|
||||
### Changes
|
||||
|
||||
- Updated cronjob
|
||||
- Improve module cloning duration by adding `--depth=50` to `git clone`
|
||||
|
||||
# [3.6.3] - 2019-07-15
|
||||
|
||||
### Added
|
||||
|
|
|
@ -20,7 +20,8 @@ Automated Nginx compilation from sources with additional modules support
|
|||
<br>
|
||||
<img src="https://img.shields.io/github/release/VirtuBox/nginx-ee.svg?style=flat" alt="GitHub release">
|
||||
<a href="https://www.codacy.com/app/VirtuBox/nginx-ee?utm_source=github.com&utm_medium=referral&utm_content=VirtuBox/nginx-ee&utm_campaign=Badge_Grade"><img src="https://api.codacy.com/project/badge/Grade/61fe95d2311241b6b5051a04493a43c2" alt="codacy"/></a>
|
||||
<a href="https://www.codefactor.io/repository/github/virtubox/nginx-ee"><img src="https://www.codefactor.io/repository/github/virtubox/nginx-ee/badge" alt="CodeFactor" /></a></p>
|
||||
<a href="https://www.codefactor.io/repository/github/virtubox/nginx-ee"><img src="https://www.codefactor.io/repository/github/virtubox/nginx-ee/badge" alt="CodeFactor" /></a>
|
||||
<img src="https://status.virtubox.net/netdata/api/v1/badge.svg?chart=web_log_vtb.cx.requests_per_url&options=unaligned&dimensions=nginx-ee&group=sum&after=-86400&label=today&units=installations&precision=0"/></p>
|
||||
|
||||
|
||||
|
||||
|
@ -58,7 +59,7 @@ Automated Nginx compilation from sources with additional modules support
|
|||
|
||||
## Additional Third-party modules
|
||||
|
||||
Nginx current mainline release : **v1.17.1**
|
||||
Nginx current mainline release : **v1.17.2**
|
||||
Nginx current stable release : **v1.16.0**
|
||||
|
||||
* [ngx_cache_purge](https://github.com/FRiCKLE/ngx_cache_purge)
|
||||
|
@ -100,6 +101,7 @@ Optional modules :
|
|||
#### Also compatible
|
||||
|
||||
* Ubuntu 19.04 (Disco)
|
||||
* Ubuntu 18.10 (Cosmic)
|
||||
* Ubuntu 16.04 LTS (Xenial)
|
||||
* Debian 9 (Stretch)
|
||||
* Debian 8 (Jessie)
|
||||
|
|
|
@ -7,21 +7,27 @@
|
|||
# Copyright (c) 2018 VirtuBox <contact@virtubox.net>
|
||||
# This script is licensed under M.I.T
|
||||
# -------------------------------------------------------------------------
|
||||
# Version 3.5.0 - 2019-01-01
|
||||
# Version 3.6.3 - 2019-07-24
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
##################################
|
||||
# Check Nginx version and modules
|
||||
##################################
|
||||
|
||||
CURRENT_NGINX="$(/usr/sbin/nginx -v 2>&1 | awk -F "/" '{print $2}' | awk -F " " '{print $1}')"
|
||||
NGINX_MAINLINE="$(/usr/bin/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="$(/usr/bin/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.16 2>&1)"
|
||||
CURRENT_STABLE="$(/usr/sbin/nginx -v 2>&1 | awk -F "/" '{print $2}' | awk -F " " '{print $1}' | grep 1.14)"
|
||||
PAGESPEED="$(/usr/sbin/nginx -V 2>&1 | grep pagespeed)"
|
||||
NAXSI="$(/usr/sbin/nginx -V 2>&1 | grep naxsi)"
|
||||
RTMP="$(/usr/sbin/nginx -V 2>&1 | grep rtmp)"
|
||||
PAGESPEED_BETA="$(/usr/sbin/nginx -V 2>&1 | grep latest-beta)"
|
||||
if [ -x /usr/sbin/nginx ]; then
|
||||
|
||||
CURRENT_NGINX="$(/usr/sbin/nginx -v 2>&1 | awk -F "/" '{print $2}' | awk -F " " '{print $1}')"
|
||||
NGINX_MAINLINE="$(/usr/bin/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="$(/usr/bin/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.16 2>&1)"
|
||||
PAGESPEED="$(/usr/sbin/nginx -V 2>&1 | grep pagespeed)"
|
||||
NAXSI="$(/usr/sbin/nginx -V 2>&1 | grep naxsi)"
|
||||
RTMP="$(/usr/sbin/nginx -V 2>&1 | grep rtmp)"
|
||||
PAGESPEED_BETA="$(/usr/sbin/nginx -V 2>&1 | grep latest-beta)"
|
||||
|
||||
else
|
||||
echo "Nginx is not installed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
##################################
|
||||
# Check if new release is available
|
||||
|
@ -31,7 +37,7 @@ if [ "$CURRENT_NGINX" != "$NGINX_MAINLINE" ] && [ "$CURRENT_NGINX" != "$NGINX_ST
|
|||
[ ! -d $HOME/.scripts ] && {
|
||||
mkdir -p $HOME/.scripts
|
||||
}
|
||||
wget -O $HOME/.scripts/nginx-build.sh https://raw.githubusercontent.com/VirtuBox/nginx-ee/master/nginx-build.sh >/dev/null 2>&1
|
||||
wget -O $HOME/.scripts/nginx-build.sh https://raw.githubusercontent.com/VirtuBox/nginx-ee/master/nginx-build.sh > /dev/null 2>&1
|
||||
chmod +x $HOME/.scripts/nginx-build.sh
|
||||
|
||||
if [ -n "$PAGESPEED" ]; then
|
||||
|
@ -57,8 +63,8 @@ if [ "$CURRENT_NGINX" != "$NGINX_MAINLINE" ] && [ "$CURRENT_NGINX" != "$NGINX_ST
|
|||
fi
|
||||
|
||||
if [ -n "$CURRENT_STABLE" ]; then
|
||||
$HOME/.scripts/nginx-build.sh --stable "$PAGESPEED_ARG" "$NAXSI_ARG" "$RTMP_ARG" >/dev/null 2>&1
|
||||
$HOME/.scripts/nginx-build.sh --stable "$PAGESPEED_ARG" "$NAXSI_ARG" "$RTMP_ARG" > /dev/null 2>&1
|
||||
else
|
||||
$HOME/.scripts/nginx-build.sh "$PAGESPEED_ARG" "$NAXSI_ARG" "$RTMP_ARG" >/dev/null 2>&1
|
||||
$HOME/.scripts/nginx-build.sh "$PAGESPEED_ARG" "$NAXSI_ARG" "$RTMP_ARG" > /dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
# Copyright (c) 2019 VirtuBox <contact@virtubox.net>
|
||||
# This script is licensed under M.I.T
|
||||
# -------------------------------------------------------------------------
|
||||
# Version 3.6.3 - 2019-07-20
|
||||
# Version 3.6.3 - 2019-08-01
|
||||
# -------------------------------------------------------------------------
|
||||
|
||||
##################################
|
||||
|
@ -588,69 +588,69 @@ _download_modules() {
|
|||
echo "### downloading additionals modules ###"
|
||||
# cache_purge module
|
||||
{ [ -d "$DIR_SRC/ngx_cache_purge" ] && {
|
||||
git -C "$DIR_SRC/ngx_cache_purge" pull origin master
|
||||
git -C "$DIR_SRC/ngx_cache_purge" pull
|
||||
}; } || {
|
||||
git clone https://github.com/FRiCKLE/ngx_cache_purge.git
|
||||
git clone --depth=50 https://github.com/FRiCKLE/ngx_cache_purge.git
|
||||
}
|
||||
# memcached module
|
||||
{ [ -d "$DIR_SRC/memc-nginx-module" ] && {
|
||||
git -C "$DIR_SRC/memc-nginx-module" pull origin master
|
||||
git -C "$DIR_SRC/memc-nginx-module" pull
|
||||
}; } || {
|
||||
git clone https://github.com/openresty/memc-nginx-module.git
|
||||
git clone --depth=50 https://github.com/openresty/memc-nginx-module.git
|
||||
}
|
||||
# devel kit
|
||||
{ [ -d "$DIR_SRC/ngx_devel_kit" ] && {
|
||||
git -C "$DIR_SRC/ngx_devel_kit" pull origin master
|
||||
git -C "$DIR_SRC/ngx_devel_kit" pull
|
||||
}; } || {
|
||||
git clone https://github.com/simpl/ngx_devel_kit.git
|
||||
git clone --depth=50 https://github.com/simpl/ngx_devel_kit.git
|
||||
}
|
||||
# headers-more module
|
||||
{ [ -d "$DIR_SRC/headers-more-nginx-module" ] && {
|
||||
git -C "$DIR_SRC/headers-more-nginx-module" pull origin master
|
||||
git -C "$DIR_SRC/headers-more-nginx-module" pull
|
||||
}; } || {
|
||||
git clone https://github.com/openresty/headers-more-nginx-module.git
|
||||
git clone --depth=50 https://github.com/openresty/headers-more-nginx-module.git
|
||||
}
|
||||
# echo module
|
||||
{ [ -d "$DIR_SRC/echo-nginx-module" ] && {
|
||||
git -C "$DIR_SRC/echo-nginx-module" pull origin master
|
||||
git -C "$DIR_SRC/echo-nginx-module" pull
|
||||
}; } || {
|
||||
git clone https://github.com/openresty/echo-nginx-module.git
|
||||
git clone --depth=50 https://github.com/openresty/echo-nginx-module.git
|
||||
}
|
||||
# http_substitutions_filter module
|
||||
{ [ -d "$DIR_SRC/ngx_http_substitutions_filter_module" ] && {
|
||||
git -C "$DIR_SRC/ngx_http_substitutions_filter_module" pull origin master
|
||||
git -C "$DIR_SRC/ngx_http_substitutions_filter_module" pull
|
||||
}; } || {
|
||||
git clone https://github.com/yaoweibin/ngx_http_substitutions_filter_module.git
|
||||
git clone --depth=50 https://github.com/yaoweibin/ngx_http_substitutions_filter_module.git
|
||||
}
|
||||
# redis2 module
|
||||
{ [ -d "$DIR_SRC/redis2-nginx-module" ] && {
|
||||
git -C "$DIR_SRC/redis2-nginx-module" pull origin master
|
||||
git -C "$DIR_SRC/redis2-nginx-module" pull
|
||||
}; } || {
|
||||
git clone https://github.com/openresty/redis2-nginx-module.git
|
||||
git clone --depth=50 https://github.com/openresty/redis2-nginx-module.git
|
||||
}
|
||||
# srcache module
|
||||
{ [ -d "$DIR_SRC/srcache-nginx-module" ] && {
|
||||
git -C "$DIR_SRC/srcache-nginx-module" pull origin master
|
||||
git -C "$DIR_SRC/srcache-nginx-module" pull
|
||||
}; } || {
|
||||
git clone https://github.com/openresty/srcache-nginx-module.git
|
||||
git clone --depth=50 https://github.com/openresty/srcache-nginx-module.git
|
||||
}
|
||||
# set-misc module
|
||||
{ [ -d "$DIR_SRC/set-misc-nginx-module" ] && {
|
||||
git -C "$DIR_SRC/set-misc-nginx-module" pull origin master
|
||||
git -C "$DIR_SRC/set-misc-nginx-module" pull
|
||||
}; } || {
|
||||
git clone https://github.com/openresty/set-misc-nginx-module.git
|
||||
git clone --depth=50 https://github.com/openresty/set-misc-nginx-module.git
|
||||
}
|
||||
# auth_pam module
|
||||
{ [ -d "$DIR_SRC/ngx_http_auth_pam_module" ] && {
|
||||
git -C "$DIR_SRC/ngx_http_auth_pam_module" pull origin master
|
||||
git -C "$DIR_SRC/ngx_http_auth_pam_module" pull
|
||||
}; } || {
|
||||
git clone https://github.com/sto/ngx_http_auth_pam_module.git
|
||||
git clone --depth=50 https://github.com/sto/ngx_http_auth_pam_module.git
|
||||
}
|
||||
# nginx-vts module
|
||||
{ [ -d "$DIR_SRC/nginx-module-vts" ] && {
|
||||
git -C "$DIR_SRC/nginx-module-vts" pull origin master
|
||||
git -C "$DIR_SRC/nginx-module-vts" pull
|
||||
}; } || {
|
||||
git clone https://github.com/vozlt/nginx-module-vts.git
|
||||
git clone --depth=50 https://github.com/vozlt/nginx-module-vts.git
|
||||
}
|
||||
# http redis module
|
||||
[ ! -d /usr/local/src/ngx_http_redis ] && {
|
||||
|
@ -659,9 +659,9 @@ _download_modules() {
|
|||
}
|
||||
if [ "$RTMP" = "y" ]; then
|
||||
{ [ -d "$DIR_SRC/nginx-rtmp-module" ] && {
|
||||
git -C "$DIR_SRC/nginx-rtmp-module" pull origin master
|
||||
git -C "$DIR_SRC/nginx-rtmp-module" pull
|
||||
}; } || {
|
||||
git clone https://github.com/arut/nginx-rtmp-module.git
|
||||
git clone --depth=50 https://github.com/arut/nginx-rtmp-module.git
|
||||
}
|
||||
fi
|
||||
|
||||
|
@ -669,7 +669,7 @@ _download_modules() {
|
|||
{ [ -d "$DIR_SRC/ipscrubtmp" ] && {
|
||||
git -C "$DIR_SRC/ipscrubtmp" pull origin master
|
||||
}; } || {
|
||||
git clone https://github.com/masonicboom/ipscrub.git ipscrubtmp
|
||||
git clone --depth=50 https://github.com/masonicboom/ipscrub.git ipscrubtmp
|
||||
}
|
||||
|
||||
echo "### additionals modules downloaded ###"
|
||||
|
@ -836,7 +836,7 @@ _download_openssl_dev() {
|
|||
echo "### removing openssl extracted archive ###"
|
||||
rm -rf /usr/local/src/openssl
|
||||
echo "### cloning openssl ###"
|
||||
git clone https://github.com/openssl/openssl.git /usr/local/src/openssl
|
||||
git clone --depth=50 https://github.com/openssl/openssl.git /usr/local/src/openssl
|
||||
cd /usr/local/src/openssl || exit 1
|
||||
echo "### git checkout commit ###"
|
||||
git checkout $OPENSSL_COMMIT
|
||||
|
@ -850,7 +850,7 @@ _download_openssl_dev() {
|
|||
fi
|
||||
else
|
||||
echo "### cloning openssl ###"
|
||||
git clone https://github.com/openssl/openssl.git /usr/local/src/openssl
|
||||
git clone --depth=50 https://github.com/openssl/openssl.git /usr/local/src/openssl
|
||||
cd /usr/local/src/openssl || exit 1
|
||||
echo "### git checkout commit ###"
|
||||
git checkout $OPENSSL_COMMIT
|
||||
|
@ -960,7 +960,7 @@ _download_naxsi() {
|
|||
echo -ne ' Downloading naxsi [..]\r'
|
||||
{
|
||||
|
||||
git clone https://github.com/nbs-system/naxsi.git /usr/local/src/naxsi -q
|
||||
git clone --depth=50 https://github.com/nbs-system/naxsi.git /usr/local/src/naxsi -q
|
||||
|
||||
cp -f /usr/local/src/naxsi/naxsi_config/naxsi_core.rules /etc/nginx/naxsi_core.rules
|
||||
|
||||
|
|
Loading…
Reference in New Issue