diff --git a/Nginx/Modules.md b/Nginx/Modules.md index 4df6885..8934530 100644 --- a/Nginx/Modules.md +++ b/Nginx/Modules.md @@ -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