HTTP variables

$remote_user variable (HTTP)

Username supplied in Basic authentication. It is not by itself evidence that authorization succeeded. Do not log real usernames without a legitimate retention policy. Version: Introduction not established. OSS documentation; verify build. No positional directive arguments. Example is a partial configuration fragment for a disposable synthetic lab; not a production logging policy.

Formal Syntax & Structure

nginx syntaxnginx
$remote_user

Working Example

Example Snippetnginx
# Partial http-context example: map a synthetic value to a presence flag, never log the raw value.map $remote_user $lab_present {    "" 0;    default 1;}
Nginx Reference