access_log to track failed logins

Francis Daly francis at
Wed Dec 19 09:12:35 UTC 2012

On Tue, Dec 18, 2012 at 09:05:30PM -0500, AJ Weber wrote:

Hi there,

> >So whatever location matches /my/login/page will also match
> >/my/login/page?error=true.
> >
> >Does that explain why your initial attempts did not do what you expected?

> No, unfortunately it doesn't.  I copied the "GET" from the "usual" 
> access log exactly.  Thus, I know the call is being made, because it's 
> being logged in the normal log, and I'm pretty sure I have the right 
> location string, because I copied it right out of the log.

For nginx location{} matching,




are exactly the same. It is not possible to have one matched by one
location, and the other matched by another.

(So you need something other than location{} matching to distinguish them.)

Francis Daly        francis at

More information about the nginx mailing list