Ubuntu16.04 卸载Ubuntu不完全,导致重装后各种问题,需要彻底删除nginx自动生成的配置项和相关联的软件
停止nginx ,nginx -s stop
卸载
sudo apt-get --purge remove nginx
sudo apt-get autoremove
查询和nginx相关的自动安装的软件
dpkg --get- selections|grep nginx
查询的结果
nginx-common deinstall
卸载该软件
sudo apt-get --purge remove nginx-common
再重新安装nginx
sudo apt-get install nginx