All configuration files must be created in the /etc/ibatyr-nginx/sites-available directory.
Keys and TLS certificates should be stored in the /etc/ibatyr-nginx/ssl directory. It is recommended to create a new configuration file by application name. The file configuration consists of the block\server blocks:
server {
include static/server.conf;
listen 80;
server_name example.com www.example.com; # WAF configuration.
set $BACKEND http://192.168.1.100;
location / {
include static/waf.conf;
}
}
server {
include static/server.conf;
listen 443 ssl;
ssl_certificate ssl/cert.pem;
ssl_certificate_key ssl/key.pem;
server_name example.com www.example.com; # WAF configuration.
set $BACKEND https://192.168.1.100:443;
location / {
include static/waf.conf;
}
}
The listen directive contains parameters with the port number to which the backend will be proxied. The ssl parameter for this directive indicates that traffic should be available via HTTPS.
The ssl_certificate* directives in their parameters contain paths to files with SSL certificates and keys. This is necessary in order to terminate encrypted TLS traffic before it reaches iBatyr WAF.
The server_name directive contains domain names (Host header) to which requests will be sent. It is worth noting that you need to indicate all the necessary domain names to which they will arrive. Otherwise, some requests may be processed incorrectly.
The set $BACKEND directive parameter specifies the full backend address, indicating the protocol and port number (see screenshot 125).
Screenshot 125 - Result of a successful configuration check
