2018-06-28

How to recreate /etc/nginx directory

Maybe you removed the /etc/nginx directory or you messed around with it, how can you recreate it?

To recreate it, first uninstall using purge to remove even configuration files and records:

sudo apt-get purge nginx nginx-common nginx-full

then reinstall:

sudo apt-get install nginx

If above doesn't work for you, you can also try using --force-confmiss option of dpkg.

sudo dpkg --force-confmiss -i /var/cache/apt/archives/nginx-common_*.deb

Borrowed from stackoverflow

No hay comentarios: