What specific commands or config need to be typed in order for a CentOS 7 web server running Apache httpd to generate tabular logs of all received http requests with the following four columns for each request:

1.) Response time (time response sent minus time request received)
2.) URL that was requested
3.) IP address of requesting client
4.) Browser of requesting client

These logs should be printed into a text file which can then be imported into other software for analysis.

  • #4 can only be inferred from the user agent string, which is not a true guarantor of correct information; anyone can reconfigure the UAS to reflect anything they like. – DopeGhoti Jun 20 '17 at 20:53
  • "three columns" of 4 items? – Jeff Schaller Jun 20 '17 at 23:42
  • @DopeGhoti OK, but how does one get the other items to output into a text file? – CodeMed Jun 21 '17 at 1:36
  • @JeffSchaller I edited the OP to include the fourth item but forgot to fix the reference that you mention. Do you have a suggested answer? – CodeMed Jun 21 '17 at 1:38
  • 1
    I'm not personally aware of a way to do #1 but it seems to me that the rest can be handled by httpd.apache.org/docs/2.4/logs.html – Jeff Schaller Jun 21 '17 at 9:50

Your Answer

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

Browse other questions tagged or ask your own question.