Why does the index.nginx-debian.html magically appear in my /var/www/html/ folder?

I’ve been struggling with a strange issue affecting my droplets: after some running time, the homepage of my website would be replaced by the default, “Welcome to nginx!” screen. This repeatedly happened on a machine that was already set up and did not have any of those default nginx files.

I usually destroy the droplet and immediately rebuild it from backup (since it’s a live server, I wanted to minimize the downtime), but since I’ve seen the issue is reappearing I decided not to do it this time and investigate what happens exactly.

I’ve started with the nginx configuration files, which were identical, but then I’ve found this file “magically” appeared in my /var/www/html/ folder:


Any idea why and how this might happen?

I’ve always started with a fully working version from a snapshot, then after a day or so of running fine, this file suddenly appears there and messes up my homepage. I will proceed to change the order in which the files are looked for, in the config, but this issue really bugs me at the moment.

Any idea?


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.


It sounds like that you are using an automation tool like Ansible which could be recreating the file on every run.

Can you share some more details on your exact setup and processes?