# NGINX

## Prerequisites

* An existing deployment of NGINX for Linux running over a variety of platforms.
* Specific versions numbers are updated under **Support->Platforms**

![](https://2760087783-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEWA4nfgNrSRL8dA6Kap7%2Fuploads%2FApNdeY3lNwHtK8trAzbC%2Fgeneral-support-platforms.png?alt=media\&token=ffa33fcc-a74c-44f7-87e1-8ad3127cec5c)

## Installation

For deployment instructions follow steps in the Profile

<figure><img src="https://2760087783-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEWA4nfgNrSRL8dA6Kap7%2Fuploads%2FP9FLLS0wlX00qOJQB9NE%2Fimage.png?alt=media&#x26;token=5b4b9dc4-50c5-46a7-a596-b8bcf996492a" alt=""><figcaption></figcaption></figure>

#### Step 1: Download the Installer to the linux machine

Run the following commands from the linux server shell:

`sudo su`

`wget https://sc1.checkpoint.com/nanoagent/nanoegg -O nanoegg`

#### Step 2: Install the Agent

Run the following commands from the linux server shell, from the same location as previous step:

`chmod +x nanoegg`

`./nanoegg --install --token <token>`

{% hint style="info" %}
Make sure you obtain the \<token> from the [Enforcement **Profile**](https://waf-doc.inext.checkpoint.com/getting-started/deploy-enforcement-point) page, **Authentication** section. you will need it during agent deployment.

![](https://2760087783-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEWA4nfgNrSRL8dA6Kap7%2Fuploads%2FodEuUgaIWcxkuTtYrJ2n%2Fappsec-profiles-authentication-token.PNG?alt=media\&token=aaa5d4ad-7a5b-4986-9378-7ec39b22aadd)
{% endhint %}

The installer creates an initial registration with the CloudGuard WAF cloud and downloads the latest version of the agent installation.

It will also add to your nginx.conf the following line:

`load_module /usr/lib/nginx/modules/ngx_cp_attachment_module.so;`

#### Step 3: Configure SSL certificates (optional if the servers do not use HTTPS)

To configure SSL certificates in **NGINX** follow these guides:

* [NGINX](https://nginx.org/en/docs/http/configuring_https_servers.html)
* [NGINX PLUS](https://docs.nginx.com/nginx/admin-guide/security-controls/terminating-ssl-http/)

To configure SSL certificates in **Kong** follow the guide in the following [link](https://docs.konghq.com/gateway/latest/how-kong-works/routing-traffic/#configuring-tls-for-a-route).

#### Step 4: Verify installation

The agent will automatically install, connect and should display a successful connection message within the CloudGuard WAF web portal:

![](https://2760087783-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEWA4nfgNrSRL8dA6Kap7%2Fuploads%2FzrhFNuIBv6uIUGnQsqIw%2Fappsec-agents-agent-connected-banner-notification.PNG?alt=media\&token=47ad548e-bf80-4619-9ebf-c93fb736257f)

To check agent status after the installation from the Linux server shell, you can run:

`cpnano -s`
