Yes, Gokarna is the place where the shivling was placed by Ganesha. Also, few versions of this story says that Ravan went to the sea shore for his sandhyavandan to suryabhagwan.
Gokarna is a very beautiful place ... MUST WATCH pilgrim centre ...
Vaidyanath / Bholenath temple has diff stories:
Here is one version of it:
When ravan cuts his heads, his final head goes near shivling & prays requesting to forgive him for his mistake. Shivji will appear there, cures all the injuries of Ravan, his head is attached back to his body ... As shivji treated Ravan at this place giving him his life back this place was known as vaidyanath.
I visited both these places.