They sell super glue for this application. You take the coral out of your tank and the piece of LR you want it on. Wipe it off at the part you want to glue to dry it put some on let it sit for 45 seconds and put it back in your tank. If the LR you want to put it on cannot come out you can use reef putty too. Not sure if you can use the super glue under the water or not.
Before I permenatly affix any coral to any large pieces of my LR I always try to position it where I want it first for a few weeks just squeezing it into a hole, to see if everything looks good and there is no fighting. Then once I am positive thats where i want it, I glue or putty it in place. 9 times out of 10 I have found that you move your coral at least once before you find its "spot".