Nginx upstream return name instead of server ip

rjvbzeoibvpzie nginx-forum at forum.nginx.org
Wed Sep 29 13:43:54 UTC 2021


Well, I was just assuming that no live upstreams were availbale, but this is
not the case. At least, this is not logged (access or error).

Here are the lines from access_log i'm talking about (see the difference on
$upstream_addr):

----
log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for" '
                      '$request_length $request_time '
                      '"$upstream_addr" "$upstream_response_length"
"time=$upstream_response_time" "$host" "$limit_req_status"';
----

----
208.115.199.18 - - [29/Sep/2021:12:42:43 +0200] "GET /login HTTP/1.1" 200
150 "https://example.com" "Mozilla/5.0+(compatible; UptimeRobot/2.0;
http://www.uptimerobot.com/)" "-" 408 0.105 "127.0.0.1:81" "0" "time=0.000"
"example.com" "PASSED"
----

----
208.115.199.18 - - [29/Sep/2021:12:43:35 +0200] "GET /login HTTP/1.1" 502
150 "https://example.com" "Mozilla/5.0+(compatible; UptimeRobot/2.0;
http://www.uptimerobot.com/)" "-" 408 0.000 "http_backend" "0" "time=0.000"
"example.com" "PASSED"
----

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,292491,292494#msg-292494



More information about the nginx mailing list