Well - That was not the nginx issue and was an apache2 issue. I had virtual hosts defined on apache2 server and apache2 was not finding a match even through config was there. Hence I added the entry in hosts file and it worked. Plus moved my vshost config file to apache2.conf file.