Merge pull request 'Récupération automatique de la version de Nginx installée' (#2) from Locale into master

Reviewed-on: #2
This commit is contained in:
2022-01-02 18:34:09 +01:00

View File

@@ -5,11 +5,13 @@ Installation de divers modules dynamiques avec Nginx
cd ~/ngx-modules-src/
# Copie de la version de Nginx - VERSION
sudo nginx -v
command="nginx -v"
nginxv=$( ${command} 2>&1 )
VERSION=$(echo $nginxv | grep -o '[0-9.]*$')
# récupération des sources de Nginx et décompression
wget http://nginx.org/download/nginx-VERSION.tar.gz
tar -xzvf nginx-VERSION.tar.gz
wget http://nginx.org/download/nginx-${VERSION}.tar.gz
tar -xzvf nginx-${VERSION}.tar.gz
# Récupération des modules
git clone --depth 1 -b v3/master --single-branch https://github.com/SpiderLabs/ModSecurity
@@ -26,7 +28,7 @@ git submodule update
make
sudo make install
cd ~/ngx-modules-src/nginx-VERSION/
cd ~/ngx-modules-src/nginx-${VERSION}/
# Installation de ModSecurity & Header-More (Modules Nginx)
./configure --with-compat --add-dynamic-module=../ModSecurity-nginx --add-dynamic-module=../ModSecurity-nginx