Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

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!
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.
Yes, that is normal behavior. When Nginx receives a request that doesn’t match any defined server_name it will rout it to the default server. If a default is not specified, Nginx will use the first server block defined.
To specify a default, add default_server to the end of a listen directive. For example:
listen 80 default_server;
server_name example.com;
So in your case, accessing the Droplet via IP address means that the server_name will never match and you’ll be routed to the first one in alphabetical order. To disable all access via IP address, you can create a new server block that returns an error when accessed:
server {
listen 80 default_server;
server_name _;
return 444;
}
For more information on how Nginx handles all of this, take a look at their docs on the server_name directive.