How a private key can be invalid? From here, we can read that : 


  A private key is a 256-bit value, meaning there are approximately
  1.1579e77 possible keys (There are about 1.2288e66 invalid values


But here, we have : 


  Nearly every 256-bit number is a valid ECDSA private key.
  Specifically, any 256-bit number from 0x1 to 0xFFFF FFFF FFFF FFFF
  FFFF FFFF FFFF FFFE BAAE DCE6 AF48 A03B BFD2 5E8C D036 4140 is a valid
  private key.


Does "nearly every" mean (1.1579e77-1.2288e66) out of 1.1579e77 ?
A bitcoin private key is a number greater than or equal to 1 and less than X, where:

X = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141


That's in base 16. In normal base 10 numbers, that's:

X = 115792089237316195423570985008687907852837564279074904382605163141518161494337


Any number outside of that range is an invalid private key. That includes 0 and X, X+1, X+2, ...