It is believed that Lord Vishnu had worshipped Lord Shiva before he had taken the Vamanavtaar (the dwarf incarnation). The Vamaseshwar Shivlinga installed by Lord Vishnu is a place of great devotion. Vishwamitra had shown this place to Sri Ram.
(Ref: Valmiki Ramayana 1/29/1 to 12).