HTTP variables

$bytes_sent variable (HTTP)

Measure total outbound bytes attributed to a request, including response headers. Compare with $body_bytes_sent for body-only accounting; neither is a network packet capture. Version: 1.3.8 / 1.2.5. 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
$bytes_sent

Working Example

Example Snippetnginx
# Partial http-context example: isolated synthetic requests only; no real user data.log_format lab_bytes_sent escape=json '{"observed":"$bytes_sent"}';
Nginx Reference