Preheat oven to 320 degrees F (160 degrees C). Grease and place a layer of waxed paper in a 9x13-inch baking pan. Butter and flour the waxed paper layer.
Mix flour, white sugar, pineapple, baking soda, eggs, 1 cup coconut, and 1 cup walnuts together in a bowl.
Pour batter into prepared baking pan.
Bake in the preheated oven until cake is golden brown and a toothpick inserted in the center comes out clean, 40 to 45 minutes.
Let cool for about 15 minutes in the pan; run a knife around the edge of the cake to loosen from pan. Flip onto cooling rack.
Whip butter, cream cheese, confectioners' sugar, and vanilla extract together in a bowl until light and creamy. Frost the cooled cake. Top with about 1/2 cup chopped walnuts and 1/2 cup shredded coconut.