How can I restore /etc/nginx? [closed]

时光总嘲笑我的痴心妄想 提交于 2019-12-20 07:58:28

问题


By mistake I have removed /etc/nginx directory in my ubuntu 11.10 PC. How can I restore the ngnix directory in /etc/nginx ?

I did these commands:

  1. sudo su
  2. rm -rf /etc/nginx

I want to get again /etc/nginx directory. how?

I tried this to re-install nginx:

  1. sudo apt-get update
  2. sudo apt-get upgrade
  3. sudo apt-get install nginx

then it gives following

Reading package lists... Done

Building dependency tree   

Reading state information... Done
E: Unable to locate package nginx

How can i get full nginx software on ubuntu 11.10?


回答1:


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 


来源:https://stackoverflow.com/questions/12362967/how-can-i-restore-etc-nginx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!