Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

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.

share|improve this question

marked as duplicate by Cakemox, Jenny D, Ward, Dave M, voretaq7 Apr 26 '13 at 16:24

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

See:… – Oneiroi Apr 26 '13 at 8:00
up vote 4 down vote accepted

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.

share|improve this answer
+1 for etckeeper and +1 for git :-) – Jan Marek Apr 26 '13 at 8:59
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

Not the answer you're looking for? Browse other questions tagged or ask your own question.