ubuntu意外删除/etc/nginx后如何恢复?

1、使用purge卸载

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

2、重新安装

sudo apt-get install nginx

3、测试

nginx -t

4、若上述方案不起作用,请尝试使用dpkg的--force-confmiss选项

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

posted @ 2022-03-10 18:41  酷学大叔  阅读(474)  评论(0编辑  收藏  举报