From 2eaa45bff3f5ad55dd4ec4ba5eea163cf36b09d1 Mon Sep 17 00:00:00 2001 From: Joby Elliott Date: Wed, 23 Oct 2024 17:10:30 -0600 Subject: [PATCH] add nginx repo --- install/nginx-cloudflare-fail2ban.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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