HTTP directives

set directive (HTTP)

Server, location and if contexts; no default. Assigns a request-time value using the rewrite module. The right-hand side can combine text and variables.

Formal Syntax & Structure

nginx syntaxnginx
set $variable value;

Parameters & Attributes

NameTypeDescription
$variablestringAssignment target
valuestringValue expression

Working Example

Example Snippetnginx
set $label study;
Nginx Reference