Installing NGINX App Protect WAF

Prerequisites

Install NGINX and NGINX App Protect WAF Module

  1. If you already have NGINX packages in your system, back up your configs and logs:

    sudo cp -a /etc/nginx /etc/nginx-plus-backup
    sudo cp -a /var/log/nginx /var/log/nginx-plus-backup
  2. Log in to MyF5 Customer Portal and download your nginx-repo.crt and nginx-repo.key files.

  3. If any old NGINX App Protect packages are installed, make sure to remove them.

  4. Follow the steps below for the operating system you are working with.

If not already installed, nginx or nginx-plus will be installed automatically as a dependency.

Common Steps for NGINX Open Source and NGINX Plus

Please follow these steps before you install either NGINX Open Source or NGINX Plus.

  1. Upload nginx-repo.key to /etc/apk/cert.key and nginx-repo.crt to /etc/apk/cert.pem. Make sure that files do not contain other certificates and keys: Alpine Linux does not support mixing client certificates for different repositories.

  2. Install prerequisite packages:

    sudo apk add openssl ca-certificates
  3. Put NGINX signing public key to directory /etc/apk/keys:

    sudo wget -O /etc/apk/keys/nginx_signing.rsa.pub https://cs.nginx.com/static/keys/nginx_signing.rsa.pub

  1. Create the /etc/ssl/nginx directory:

    sudo mkdir -p /etc/ssl/nginx
  2. Upload nginx-repo.crt and nginx-repo.key files to the /etc/ssl/nginx/ directory.

  3. Install required dependencies:

    sudo yum install ca-certificates wget
  4. Remove any previously downloaded NGINX repository files from /etc/yum.repos.d:

    sudo rm /etc/yum.repos.d/nginx*.repo
    sudo rm /etc/yum.repos.d/*app-protect*.repo

  1. Create the /etc/ssl/nginx directory:

    sudo mkdir -p /etc/ssl/nginx
  2. Upload the nginx-repo.crt and nginx-repo.key files to the /etc/ssl/nginx/ directory.

  3. Remove any previously downloaded NGINX repository files from /etc/yum.repos.d:

sudo rm /etc/yum.repos.d/nginx*.repo
sudo rm /etc/yum.repos.d/*app-protect*.repo
  • Install the required dependencies:

    sudo dnf install ca-certificates wget
  • Download the dependencies.repo file to /etc/yum.repos.d:

    sudo wget -P /etc/yum.repos.d https://cs.nginx.com/static/files/dependencies.amazonlinux2023.repo
    1. Create the /etc/ssl/nginx directory:

      sudo mkdir -p /etc/ssl/nginx
    2. Upload nginx-repo.crt and nginx-repo.key files to the /etc/ssl/nginx/ directory.

    3. Remove any previously downloaded NGINX repository files from /etc/yum.repos.d: