1

I have a web site that has some content protected via apache basic authentication.

Is there a way for me to tell (from the access logs perhaps?) how many users are actually using the login?

Intranet traffic is excluded from having to log in, so I can't just look at how many people are accessing those pages.

Thanks.

1 Answer 1

3

The default log format includes the HTTP authentication username (the %u format string), so you can achieve this by processing your access logs. It is inserted as the third part of the line, so the following script will output the number of requests made by each authenticated user.

awk '{print $3}' access.log | sort | uniq -c
0

You must log in to answer this question.

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