nginx to handle odd requests on hostname

You can just set the Host header and use something like curl to send the request to the IP address.

e.g.

curl -H 'Host: www.166.77.88.99' http://166.77.88.99