Dave's Brain

Browse - Computer Tips - How do I show the browser's user agent my Apache access log?

Date: 2011jun7
Project: Apache
Keywords: navigator.userAgent, HTTP_USER_AGENT

Q.  How do I show the browser's user agent my Apache access log?

A.

Change this line:

CustomLog logs/access.log common
to this:
CustomLog logs/access.log combined
and restart Apache. This assumes you have a LogFormat statement this declares the "combined" format. But that's normally there. You can also do this on a host-by-host basis if you have virtual hosts.

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.