Set#

The module allows setting a value for a variable.

When building from the source code, the module is built by default together with the Stream module (enabled with --with-stream); it can be disabled with the build option --without-stream_set_module.

In packages and images from our repositories, the module is included in the build.

Configuration Example#

server {
    listen 12345;
    set    $true 1;
}

Directives#

set#

Syntax

set $variable value;

Default

Context

server

Sets a value for the specified variable. The value can contain variables.