You would apply for a tourist visa from the thai consulate in Nigeria or from a country where you legally reside.
You cannot apply for a tourist visa at the Thai consulates in Lao or Malaysia as Nigeria is on the list of countries prohibited.
************************************************************