How can I deny HTTP access to my droplet?

July 11, 2013 3.3k views
I have my droplet IP, and when I put it in the browser my default site is displayed. Can I avoid this?
5 Answers
Is it just the default site you don't want shown? Are there other sites on the box?
Yes, there are other sites. I just want to avoid access with the IP.

I want access to defaultdomain.com, domain1.com, domain2.com, ... domainN.com
I want deny access to IP (in this moment this redirect to "defaultdomain.com").

What's the contents of /etc/nginx/sites-enabled?
daniloef, create a file called in /etc/nginx/sites-enabled:

server {
return 444;

Make sure you replace with your actual IP address.
Have another answer? Share your knowledge.