Report this

What is the reason for this report?

Dokku and preventing random domains

Posted on October 9, 2014

I have a dokku instance set up and all seems to be working fine however if I hit random subdomains instead of being served a 404 or site not found I get served what seems to be the last application I deployed.

for example I have just deployed my personal site at http://mdtn.point.li and http://developedthe.net however if I got to lets say http://randomsub.point.li I still get served my site.

Is there anyway I can stop this?

Thanks in advance



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.

It’s because nginx is only loading the configs from docker it will default to the last server defined. All you need to do is enable the default server config:

cp /etc/nginx/sites-available/default /etc/nginx/sites-enabled/
nginx -s reload

That way nginx has a default config to go to – you could update /etc/nginx/sites-available/default to place your own 404 or holding page.

I hope that helps

The developer cloud

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

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.