Given an nginx config:

proxy_pass http://yahoo.com;

How do you get the string "http://yahoo.com" in the access_log? $remote_addr is the ip.


add this to your log_format

$proxy_host and $upstream_addr

^-courtesy of the commenter, Alex. Just adding here so that folks see it when visiting.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.