Interestingly enough, I installed a wet-location-rated fan in an arbor about 3 months ago; here's what I did:
1. I Sawzalled two 1.5"-deep notches in each of the two intersecting 2x8's about 2.5" each side of center (four cuts) and broke out the wood in the middle, leaving a 5" wide, 1.5" deep recess.
This gave the box a space to fit into so the fan canopy could contact the 2x8's, rather than leave a gap between the canopy and the bottom edges of the wood.
2. I mounted a round cast box in the recess, open side down (of course), using two 1" stainless-steel screws. I then mounted the fan bracket over the box, using two 3.5" stainless-steel screws.
The 1" screws support the box via the cast-in ears. The 3" screws pass outside the round box and directly into the wood, eliminating the need for a fan-rated box.
The arbor has a fiberglass panel roof, so there's no direct rain, but the canopy, fan-motor body, and switch housing all have drain holes in the bottom surfaces anyway.