3

I seeing a weird behaviour in access.log logging by apache2. Only the first 2 requests from the same client are logged but not after that.

The Virtualhost config file is having this setting:

CustomLog ${APACHE_LOG_DIR}/access.log combined

Can anyone please tell me What else need to be set in apache2 to get access log working correctly ?

Suresh
  • 153
  • 2
  • 2
  • 9

1 Answers1

3

Try without ${APACHE_LOG_DIR} variable with full path to logfile.

Example (Linux):

CustomLog /var/log/apache2/access.log combined

You can try without full path too:

CustomLog logs/access.log combined

It creates access.log in logs/access.log file in Apache home directory.

Make sure directory is exists and check permissions.

Reed
  • 121
  • 4
  • I tried that option but still not working. It logs first couple of requests and then nothing is logged :( – Suresh Oct 11 '13 at 17:50
  • Ok... It worked after I created a different log file other than default. But, there is another issue. Apache is looking clients cache and based on that it Log messages with status 200 or 304. I want to disable 304 to test some stuffs. – Suresh Oct 11 '13 at 21:01