When -OH group is attached to the benzene ring it is known as phenol, which is the parent name of this compound. The nitro group is acting as a substituent.So, the correct name is 2-Nitrophenol .