nginx default.conf missing after creating a droplet snapshot


so I configured my droplet with nginx, php-fpm, mariadb, wordpress etc. and I thought it was a good idea to create a snapshot. When I booted back to my droplet, I couldn’t access my site and after some investigating I found that /etc/nginx/conf.d/default.conf is missing, but there was a default.conf.rpmsave which looks like my last version of default.conf.

Before creating a snapshot I did a

# systemctl poweroff

My question is why did this happen and how can I prevent it.


edit: I just did another snapshot just to check it and this time default.conf didn’t disappear. So I don’t know what caused it the first time…I also remember that I had the same problem some time ago, but I was doing all kind of testing at that time and figured I accidentally did it myself.

Question remains though - what can cause default.conf to disappear and become default.conf.rpmsave and how do I prevent it?

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 you must have had an update to nginx at some point before you made the snapshot. yum, the package manager for CentOS and Fedora will move config files to and rpmsave files when upgrading so that edits to config files won’t get overwritten during the upgrade. rpmconf is an neat little utility that you can run after upgrades to check for any new rpmsave files. If it finds one, it will offer you the choice to merge it with the new file from the package or to just restore it.

(Shameless Debian/Ubuntu plug: That functionality is baked into apt.)