简体   繁体   中英

How to log HTTP “referer” and “user-agent” from AWS ELB?

We have recently started using AWS ELB. We are struggling to capture the following headers at ELB.

  • Referer
  • User-Agent

Any way to get it done?

AFAIK you cannot configure the access logs format for the LB (classic or other wise). For classic ELB look at the logging documentation to see what fields are logged.

It does log the user agent but the referer is not logged. Depending on what kind of application architecture you have behind your ELB you can configure that application for access logs and you would have more control over the access logs. Example: Say you have an Spring boot based EC2 behind your ELB, you can configure the spring boot embedded tomcat to log whatever headers you need in the access logs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM