diff --git a/install/nginx-cloudflare-fail2ban.sh b/install/nginx-cloudflare-fail2ban.sh index 8cdba5d..7358620 100644 --- a/install/nginx-cloudflare-fail2ban.sh +++ b/install/nginx-cloudflare-fail2ban.sh @@ -6,6 +6,18 @@ if [ "$EUID" -ne 0 ]; then exit 1 fi +# Add NGINX repository +echo "Adding NGINX repository..." +curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor \ + | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null + +echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] \ +http://nginx.org/packages/ubuntu $(lsb_release -cs) nginx" \ + | sudo tee /etc/apt/sources.list.d/nginx.list + +# Update package lists +apt-get update + # Install requirements echo "Installing required packages..." apt-get install -y nginx-extras nginx-module-njs