Dave's Brain

Browse - computer tips - show user agent in apache 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.
What this info useful to you? You can donate to say thanks

Add a comment

Sign in to add a comment
Copyright © 2008-2012, 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.
Advertisements: