Though it does not match you error you get...
pass file is like
thisID:thisPass: Hello comment!
Is assume that the password is actually encrypted? I think it should be; I doubt you can simply put a human-readable password in that password file.
If nginx expects encoded/encrypted passwords in that file, then it will never find a good match if the stored password is using another format. (To find a match, it will encode the password as typed in by the user, and compare that encoded input to the encoded password as known from the file.) And indeed, according to the documentation, Passwords must be encoded by function crypt(3). You can create the password file with the htpasswd program from Apache.
This still does not explain the actual error message, but when the password file holds the human-readable passwords, then this will surely yield a
402 Unauthorized or
One can also create such encoded password online, on various websites.