Blocking Part of a Website

You can enable blocking of a part of a website by using the Wallarm-NGINX configuration file.

To enable blocking, use the directives:

  • location – an NGINX directive.
  • wallarm_mode block – a Wallarm directive.

Configuring blocking of a part of a website:

  1. Open for editing the configuration file in the /etc/nginx-wallarm directory.
  2. Set the blocking rules in the $wallarm_mode_real variable and the location to apply the rules in the location block:

     http {
         map $remote_addr $wallarm_mode_real { 
             default block;
         server {
             location /<some_location>/ { 
                 wallarm_mode $wallarm_mode_real;

    The blocking rules in the $wallarm_mode_real variable apply to requests that target URLs containing /some_location/ as substrings:

    • default block — by default, process all the requests and block all the attacks;
    • monitoring — process all the requests coming from an IP-address from the «» — «» pool, but do not block any, even if an attack is detected;
    • off — do not filter any requests coming from the «» IP-address.

results matching ""

    No results matching ""