Two men in the country's conservative Aceh province were publicly caned after a syariah court convicted them for having sex with each other.