Question

How can I deny HTTP access to my droplet?

  • Posted on July 11, 2013
  • daniloefAsked by daniloef

I have my droplet IP, and when I put it in the browser my default site is displayed. Can I avoid this?


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

daniloef, create a file called 1.2.3.4 in /etc/nginx/sites-enabled: <br> <br>server { <br> server_name 1.2.3.4; <br> return 444; <br>} <br> <br>Make sure you replace 1.2.3.4 with your actual IP address. <br>

What’s the contents of <strong>/etc/nginx/sites-enabled</strong>?

Yes, there are other sites. I just want to avoid access with the IP. <br> <br>I want access to defaultdomain.com, domain1.com, domain2.com, … domainN.com <br>I want deny access to IP (in this moment this redirect to “defaultdomain.com”). <br> <br>Thanks.