Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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: serverfault.com/questions/361421/… –  Oneiroi Apr 26 '13 at 8:00
add comment

1 Answer

up vote 1 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
1  
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
add comment

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