I'm a big fan (and user) of NGinx.
Just occasionally, though, you'll find something that looks a little odd - despite having quite a simple underlying explanation.
This one falls firmly into that category.
When running NGinx using ngx_http_proxy_module (i.e. using
proxy_pass), you may sometimes see two upstream status codes recorded (specifically in the variable
upstream_status) despite only having a single upstream configured.
So assuming a logformat of
You may, for example, see a logline line this
184.108.40.206 - - [11/Jun/2020:17:26:01 +0000] "GET /foo/bar/test/ HTTP/2.0" 200 60345109 "-" "curl/7.68.0" "-" "testserver.invalid" storage.googleapis.com 502, 200
Note the two comma-seperated status codes at the end of the line, we observed two different upstream statuses (though we only passed the
This documentation helps explain why this happens.