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.

Building on top of the question here:
https://www.digitalocean.com/community/questions/dokku-and-preventing-random-domains
I figured out how to have a landing page for my main host as well as still serve my vhosts, e.g.
example.com -> index.html
app1.example.com -> app1
Those two things work OK, but I’m curious about how to setup a 404 page for invalid vhosts, e.g.
NonExistentApp.eample.com -> 404
instead of
NonExistentApp.example.com -> example.com
The location section of my /etc/nginx/sites-enabled/default does look like its supposed to serve a 404 if it cant find what the URL is requesting, but I think there’s some issue where it still tries to serve the main index.html, even if there’s an invalid vhost
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}
Any help would be appreciated!