I´ve removed the Nginx service using purge command. After that I decided to remove manually the /etc/nginx directory to have it again with the default configuration. The problem is that after installing again Nginx, I don´t have the complete configuration of the server. I´ve tried the answer proposed here, How can I restore /etc/nginx? , seems to work, but I don´t have the complete configuration (sites-available, sites-enable and other paths are still measing).
Asked
Active
Viewed 1,032 times
0
-
What OS do you have? Try this if you have Debian/Ubuntu distro: https://askubuntu.com/questions/66533/how-can-i-restore-configuration-files – May 09 '22 at 13:48
-
I have Ubuntu 20.04. I have solved the problem including manually the lost directories, it is a solution but not the pretty one – laucp May 09 '22 at 14:11
1 Answers
0
Next time you can do it with following command:
apt install --reinstall -o Dpkg::Options::="--force-confask,confnew,confmiss" nginx-full
to see what it goes to add to your system, you can run it with --dry-run
option like this:
apt install --reinstall -o Dpkg::Options::="--force-confask,confnew,confmiss" nginx-full --dry-run