Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to get upstream_addr use of directives(capture) #58

Closed
liutaihua opened this issue Aug 31, 2011 · 3 comments
Closed

how to get upstream_addr use of directives(capture) #58

liutaihua opened this issue Aug 31, 2011 · 3 comments

Comments

@liutaihua
Copy link

when I use the method that capture ort capture_mutl, i can't get upstream_addr in nginx log,
log format is: log_format UPSTREAM "$upstream_addr".

how to get upstream_addr use of capture.

thanks!

@agentzh
Copy link
Member

agentzh commented Aug 31, 2011

Well, I think you should log the subrequest being captured by your Lua code instead of your main location that is running your Lua code by enabling the standard log_subrequest directive in your subrequest's location and use an appropriate log_format setting.

See http://wiki.nginx.org/NginxHttpCoreModule#log_subrequest

@liutaihua
Copy link
Author

I understand. thank you very much!

@goecho
Copy link
Contributor

goecho commented Aug 21, 2014

I also encountered the same problem, use this method to solve.

Good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants