keep the port at least the size of the diameter away from the walls and the woofer in the enclosure. so lets say you have a 3 inch diameter port. keep the port at least 3 inches away from the wall and the woofer and from the back of the enclosure.
Jonathan says you don't have to put them on the same wall as the sub. You can put them on a side wall. I just wanted to know if positioning was critical.
As long as you give clearance, like Wahl said, you'll be fine. Most people can't fire a round port right out the front of the box because the box would have to be extremely deep. Side mounting is fine, results will be the same.