Nginx configuration recovery

Hi,

Sorry for spamming but I’m in deep trouble.

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.

Thanks in advance,
Vinay.

On Tuesday, March 17, 2015 01:24:52 PM vinay bhargav wrote:

Thanks in advance,
Vinay.

Hi,

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.

Best regards,
Styopa S…

Styopa S. schreef op 17-3-2015 om 20:35:

Thanks in advance,
Vinay.
Hi,

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: