Which chiral carbon do L and D in L- or D-glucose refer to?
I think your confusion arises from trying to locate a particular carbon atom, which is D or L. This is not the case.
Points to remember:
The reference for D and L notation is glyceraldehye molecule not a particular carbon atom.
D and L are not equivalent to R and S which are individually applicable to each chiral center in a molecule.
Similarly, D and L cannot tell you the direction of rotation of light before hand.
Capital “D” and “L” notations have no connection with small d and small l, which tell you the direction of rotation of light.