Preheat oven to 350 degrees. Spray two 9" round cake pans liberally with non-stick spray. Line the bottom of each pan with parchment, then spray the parchment with non-stick spray.
Whisk together flour, sugar, cocoa, baking soda, baking powder, and salt in a large mixing bowl.
Add the milk, eggs, vanilla extract, and oil. Beat with a hand mixer till well combined. Slowly pour in the boiling water and beat till smooth.
Divide batter between two pans. Bake at 350° for 35-40 minutes or until toothpick inserted in center comes out clean.
Cool for 8-10 minutes, then invert onto cooling racks. Cool completely.
Spread half of the frosting onto one of the cakes. Add the second layer, then spread the remaining frosting on top.
Frosting:
Whisk together milk, egg yolks, and sugar in a heavy saucepan till smooth. Add the butter. Cook and stir over medium heat till thickened, about 10-12 minutes.
Let cool for about 10 minutes, then stir in the vanilla, coconut, and pecans. Cool completely before frosting the cake.