HTTP variables
$server_protocol variable (HTTP)
HTTP protocol representation for the request, such as HTTP/1.1 or HTTP/2.0. Does not report the upstream protocol. 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
$server_protocolWorking Example
Example Snippetnginx
# Partial http-context example: isolated synthetic requests only; no real user data.log_format lab_server_protocol escape=json '{"observed":"$server_protocol"}';