After reaching the sea shore, Shri Ram meditated for three days by laying on the grass to ask the sea for way. He installed the Shivlinga at this place which considered the Aadi (ancient) Rameshwar. This is the place where Sea God had appeared before Shri Ram and told him the style of bridge construction.
Valmiki Ramayana 6/21 full chapter, 6/22/48 to 87.
Manas 5/49/3 to 5/50/4,5/57 doha To 6/1/1 This reference is also related with the ruins of Setu