Magento 1.9.2 puts url in search field

This is problem occurred due to server miss-configuration.

vhost.conf file

location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
}

Removed

‘$uri’

and it looks like

location / {
try_files $uri $uri/ /index.php?$args;
}