Configure NGINX Agent

Follow these steps to enable F5 WAF for NGINX in NGINX Agent.

  1. Edit the NGINX Agent configuration file.

    Use any text editor. For example:

    sudo vi /etc/nginx-agent/nginx-agent.conf
  2. Add or confirm the following settings:

    yaml
    config_dirs: "/etc/nginx:/usr/local/etc/nginx:/usr/share/nginx/modules:/etc/nms:/etc/app_protect"
    extensions:
      - nginx-app-protect
    nginx_app_protect:
      report_interval: 15s
      precompiled_publication: true

    These settings:

    • Let NGINX Agent read F5 WAF for NGINX configuration directories.
    • Enable change detection for security configurations.
    • Turn on precompiled publication of WAF configurations from NGINX Instance Manager.

    To apply these settings during installation, use the --nginx-app-protect-mode flag:

    shell
    curl https://<NMS_FQDN>/install/nginx-agent > install.sh
    sudo sh ./install.sh --nginx-app-protect-mode precompiled-publication
  3. Restart NGINX Agent:

    sudo systemctl restart nginx-agent