https://askubuntu.com/questions/235347/what-is-the-best-way-to-uninstall-nginx

1.nginx停止,然后卸载:

sudo apt-get purge nginx nginx-common

2.重新安装:

apt install nginx

3.修改配置,然后重启即可

nginx