For smaller pieces, I just use super glue gel. I dry the bottom of the coral, add the gel, and move it around slightly and then hold it on the rock (underwater). You have to move it around at first to break the film it makes when the glue hits the water.
If it's a large piece I use the green/white epoxy and super glue gel. Put the gel on the bottom of the frag, then the epoxy, more gel on the bottom of the epoxy, and press it onto a rock. Without the gel, the epoxy isn't really sticky and the frag will just fall off. For large frags, I let the epoxy dry slightly and then apply, so it's a little stiffer and I don't have to hold it underwater for so long. If it's still really soft, heavy frags will just slowly fall over.
I don't usually take any rocks out of my tank to glue frags to, just do it underwater.