Preheat the oven to 175°C.
Place a 9-inch ovenproof pan on a burner on medium heat. Melt the butter and brown sugar, stirring until melted and bubbling. Stir in the lemon juice, then remove the pan from the heat. Arrange the pineapple slices in this syrup so they are close together but not overlapping. Set aside.
In a large bowl, whisk the buttermilk, oil, eggs and vanilla. In a separate bowl, sift the flour, sugar, baking powder, salt, baking soda and nutmeg. Add this to the buttermilk mixture and whisk until just blended. Stir in coconut. Pour the batter over the pineapple slowly (so as not to shift the fruit). Bake the cake for 30-35 minutes, until a tester inserted in the centre of the cake comes out clean. If using fresh pineapple, the cake may need an extra 5-10 minutes baking time. Let the cake cool for 30 minutes in the pan. Place a serving plate over the cake and invert the pan, lifting it to reveal the pineapple now on top. Serve warm or at room temperature.