Search code examples
apachelogfile-analysis

Apache Log Format: What does "%{c}a" mean?


I've been tasked with parsing Apache web log files to extract data into another format. The customer provided me with the format line which includes the directive "%{c}a".

While I can find a definition for "%a" (the remote IP address), I cannot find any reference as to what the bracketed part means.

Does anyone recognize it and let me know what it represents?


Solution

  • From https://httpd.apache.org/docs/2.4/mod/mod_log_config.html#formats:

    %{c}a Underlying peer IP address of the connection (see the mod_remoteip module).