Skip to content

docs(nginx): update documentation for configuration precedence and variables #772

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions crowdsec-docs/unversioned/bouncers/nginx.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ SSL_VERIFY=true
################
```

Any `/etc/crowdsec/bouncers/crowdsec-nginx-bouncer.conf.local` content will take
precedence over `/etc/crowdsec/bouncers/crowdsec-nginx-bouncer.conf`. All fields
don't have to be present in this `.local.` file.

### NGINX Configuration

The Remediation Component NGINX configuration is located in `/etc/nginx/conf.d/crowdsec_nginx.conf` :
Expand Down Expand Up @@ -615,3 +619,10 @@ APPSEC_PROCESS_TIMEOUT=500 # default
```

The timeout to process the request from the Remediation Component to the AppSec Component.

### Nginx variables

Nginx variables can be used to adapt behaviour and or more flexible configurations:
* ngx.var.cs_disable_bouncer: set to 1, it will disable the bouncer
* ngx.var.enable_appsec: set to 1, it will enable the appsec even if it's disabled by configuration or if bouncer is disabled
* ngx.var.disable_appsec: set to 1, it will disable the appsec