Prepare Oven & Pans:
Preheat oven to 350°F (175°C). Grease and flour two 9-inch round cake pans, or line with parchment paper.
Mix Dry Ingredients:
In a medium bowl, whisk together flour, baking powder, baking soda, salt, cinnamon, nutmeg, and ginger.
Mix Wet Ingredients:
In a large bowl, beat together granulated sugar, brown sugar, and oil until combined. Add eggs one at a time, then stir in vanilla extract.
Combine Ingredients:
Gradually add dry ingredients to the wet mixture, stirring until just combined. Fold in grated carrots, drained pineapple, nuts, and coconut (if using).
Bake the Cake:
Divide batter evenly between prepared pans. Bake for 30–35 minutes, or until a toothpick inserted in the center comes out clean. Allow cakes to cool in pans for 10 minutes, then transfer to a wire rack to cool completely.
Prepare Frosting:
In a large bowl, beat cream cheese and butter together until smooth. Gradually add powdered sugar, vanilla, and a pinch of salt. Beat until creamy and fluffy.
Assemble Cake:
Place one cake layer on a serving plate, spread frosting evenly on top, then place second layer on top. Frost the top and sides of the cake as desired. Garnish with extra chopped nuts if desired.