1

Is there a way to have some entry in access.log when the server restarts ?

error.log makes it very clear (Child: Starting worker threads. etc) but I want ot have it visible in access.log as well

Thx!

2
  • if you have virtualhosts correctly configured with their own access.log file, the server access.log should always be empty, because access.log is used to show requests that reached the server, and when there is a virtualhost they take all requests. Jun 27, 2017 at 8:20
  • See it this other way, if you have server access.log empty, you defined your virtualhosts correctly. Jun 27, 2017 at 8:21

1 Answer 1

2

You can simply use the same file for both your access log and your ErrorLog, they don't have to be different files. For instance:

# httpd.conf
...
ErrorLog logs/access_log
CustomLog logs/access_log combined
3
  • The drawback here is that log analysis software might not like this setup... Jun 27, 2017 at 9:56
  • @TeroKilkanen: indeed log analysers most certainly won't like it, but I was surprised that the above actually works :)
    – HBruijn
    Jun 27, 2017 at 14:09
  • thx but this is not what I'm looking for
    – kofifus
    Jun 27, 2017 at 22:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .