I'm using nginx. If my ip numbers are 22.214.171.124 and 126.96.36.199, how can I configure it to block requests for the ip numbers and only allow domains. If site1.com is configured for 188.8.131.52, I want to allow a request for site1.com but deny a request for 184.108.40.206.
You can create a default catch-all virtual host to serve requests for non-configured domains and do whatever you want with these requests. Something like this: