16

Yesterday I did something quite stupid. I edited a configuration file of my nginx server, throwing away some settings and just after I saved the file I realized I was editing the wrong file. Now I didn't reload the server, so it is still running with the old configuration.

I would like to know if it's possible to show the current configuration the server is running.

Wouter Roosendaal
  • 263
  • 1
  • 2
  • 6

1 Answers1

11

Use the method linked in Dump nginx config from running process? and you might recover some of it.

After you've done that, take a look at etckeeper (original) (howto) to prevent this kind of thing from happening again.

It's a fairly straightforward way of keeping /etc stored under version control with Git.

Tom O'Connor
  • 27,440
  • 10
  • 72
  • 148
  • 2
    Thanks, this is one of those situations where *anything* helps. The above answer allowed me to retrieve some of the settings I had in the virtualhost. – Wouter Roosendaal Apr 26 '13 at 10:05