To use a web server with filtering node as an intermediate server, you should create corresponding file of the virtual host (for example /etc/nginx/conf.d/example.com.conf).

Example of the virtual host configuration:

server {
        server_name  site.example.com;
        listen 80;

        location / {
                proxy_pass http://x.x.x.x;
                proxy_set_header Host $http_host;
        }
}

where x.x.x.x is the address of destination server with the web application.

More information is available on the official page of the Nginx documentation.

Example of the virtual host configuration for analyzing Websocket connections:

server {
        server_name site.example.com;
        listen 80;

        location /websocket/ {
                nwaf_ws_proxy_pass http://x.x.x.x;
                proxy_http_version 1.1;
                proxy_set_header Upgrade $http_upgrade;
                proxy_set_header Connection "upgrade";
        }
}

Important: The nwaf_ws_proxy_pass option is used in cases where it is necessary to proxy Websocket connections and analyze them using Nemesida WAF. The proxy_pass option can be used if you only need to proxy the connection without analyzing it.

To get the real IP address of the client by the filtering node, bring the configuration file of the upstream server (for example, the load balancing server) to the form:

http {
   ...
   set_real_ip_from x.x.x.x;
   ...
}

where x.x.x.x – the address of the upstream server.