access_log to track failed logins

Francis Daly francis at daoine.org
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,

  /my/login/page

and

  /my/login/page?error=true

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.)

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list