By fblade1987
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!
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
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.