Vermin can spontaneous will themselves into being on any tile that is considered part of the BIOME token they are allowed to spawn on.
Wanna see a great example of this? Carve out a cave directly surrounding a magma pipe. It should not ever access the magma, the surface, or anything. The other end of the cave could come from fucking china. None the less, fire snakes will spawn in that cave and ruin any wooden or cloth goods you leave there.
Common vermin like rats, roaches, etc. are less of a big deal. They only miasma once before decaying out of existence, and brief exposure to miasma is hardly going to send ecstatic dwarves tantrum spiraling. You have a nice dining hall, filled with artifact furniture, right?
In any case, many people put their refuse stockpile just outside the front door of the fort. This can be pretty inefficient depending where your farms\food are located. Most miasmaing refuse in the fort comes from the kitchen\pantry area. Rotten plants\meat, vermin corpses, butchered chunks, and the like. All that's required to prevent miasma is a refuse stockpile or dump zone with sunlight shining on it.
Note that a refuse stockpile beneath open sky with a bridge built above it still counts as outside and WILL NOT produce miasma. (However, it will not combat cave adaptation--the game is picky about this stuff) The best way I've found to deal with refuse is have a stairway from the kitchen directly up to a walled-off surface yard where refuse can be dumped, or to ramp\channel the ceiling out above an area of the kitchen or an adjecent room, and store refuse under the channels so they have sunlight on them. Remember, this can be covered with a sturdy bridge for security without making it count as miasma grounds.