I’ve accidentally overwritten /etc/nginx/site-availabe/default with some
xyz file. I’m using Ubuntu 14.04. The server is still running. Is there
any
way I could recover the config file.
Note: Recovering the default file is very important for me.
If you need the stock file from the repository, this should do:
cd /tmp && apt-get download nginx && dpkg -x nginx*.deb
If you mean the file you had previously modified, I don’t think it’s possible.
If you are using ext2/3/4, you can use a tool called extundelete to
recover the original file, given that you have not overwritten the file
again since:
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.