I would recommend leaving 3-4 inches clearance between the ports and woofer into any surface they fire into.
You will also want to have the front panel made of cloth or such to let the sound escape
If you are planning on buying a down firing subwoofer we recommend that you place a small throw rug so the subwoofer isn't firing into a hard surface. Also if you could place some acoustical foam inside the cabinet you can reduce any resonance.
And you will want to make sure that there is enough room for the feet, grill (if you plan to keep attached) and the controls on the amplifier.