0

I try to modify the error log to show runtime duration. I added %T/%D at the end of the LogFormat at httpd.conf

like this:

<IfModule log_config_module>
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
# NOTE: "combined" and "common" are required by WHM
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%T%D %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T/%D" combined
# access_log format can be set in WHM under 'Basic cPanel & WHM Setup'
CustomLog logs/access_log combined
</IfModule>
I restarted the httpd service but the change didn't take place. At Cpanel it is specified to use the combined format. Can someone help me please?
matisa
  • 497
  • 3
  • 25
  • Cheating answer: just change "common" to match "combined" and see what happens. I take it you're running a VPS and could theoretically ssh in if needed? –  Aug 05 '17 at 17:26
  • unfortunately it didn't work. And yes, you are correct, – matisa Aug 05 '17 at 18:17
  • OK got it. Tnx. – matisa Aug 05 '17 at 18:28
  • Silly question: are you modifying the httpd.conf that apache is actually using? I once had a machine with 3 httpd.conf's, and apache was obviously only using one. –  Aug 05 '17 at 20:03
  • yeah, I have only one. Did a locate on the file before modifying. But I'll keep it in mind that it can happen. The change happened in the access log cos the data is relevent to it. I probably will educate my self a bit more on the logging system in the near puture. But for the day I got what I needed. thanks alot for the help! – matisa Aug 05 '17 at 21:57

0 Answers0