# Agent Fails to Recognize HTTP Transactions with NGINX

**1. Check Your NGINX Proxy Configuration**

Ensure that you have correctly configured an NGINX proxy in front of your web application. The NGINX proxy serves as a reverse proxy and plays a crucial role in routing traffic through the open-appsec agent. Here's how to check your NGINX proxy configuration:

a. Open your NGINX configuration file, typically located in `/etc/nginx/nginx.conf` or `/etc/nginx/sites-available/`

b. Confirm that you have defined a location block that proxies traffic to your web application. It should look something like this:

```nginx
location / {
    proxy_pass http://your-web-application;
    # Additional proxy settings if needed
}
```

Replace `http://your-web-application` with the actual address of your web application.

c. Save the configuration file and exit.

**If NGINX also hosts the protected website on the same Linux host or container, follow the instructions below:**

{% content-ref url="/pages/ETC2HXKRYHwWT6hkcuOM" %}
[Deploy open-appsec directly on the web server hosting the application to protect](/troubleshooting/troubleshooting-guides/deploy-open-appsec-directly-on-the-web-server-hosting-the-application-to-protect.md)
{% endcontent-ref %}

**2. Restart NGINX**&#x20;

After making changes to the NGINX configuration, you'll need to restart NGINX to apply the changes. Use the following command to restart NGINX:

```bash
sudo service nginx restart
```

**3. Test Traffic Flow**

To confirm that traffic is correctly passing through the open-appsec agent, perform the following tests:

a. mimic an attack on your web application and observe whether the open-appsec agent logs any activity, you can use the following attack to test.&#x20;

```bash
http://<IP>:<PORT>/?shell_cmd=cat/etc/passwd 
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.openappsec.io/troubleshooting/troubleshooting-guides/agent-fails-to-recognize-http-transactions-with-nginx.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
