如何从 ubuntu 14.04 LTS 中完全删除 nginx

oll*_*g23 6 apt nginx 14.04

我已经卸载了所有与 nginx 相关的软件包。(就像这个答案说https://askubuntu.com/a/457412/383308),之后我运行下面的命令命令什么也没给。

sudo find / -name 'nginx'
Run Code Online (Sandbox Code Playgroud)

当我运行这样的命令时,我有一个结果:

zyh@zyh-desktop:~$ ps -ef | grep nginx
zyh       2666  2442  0 11:12 pts/1    00:00:00 grep --color=auto nginx
Run Code Online (Sandbox Code Playgroud)

但是当我打开浏览器,输入127.0.0.1时,还是看到了nginx的欢迎页面。见下文: nginx 网络服务还活着

我认为我的问题与这个[已解决] nginx 正在运行非常相似,但是...没有安装,但是在运行命令之后

sudo update-rc.d -f nginx remove
sudo rm /etc/init.d/nginx
Run Code Online (Sandbox Code Playgroud)

而且重启后,我仍然可以看到127.0.0.1的nginx页面。任何想法如何完全删除nginx。谢谢。

PS:我已经使用了auto-remove卸载所有nginx*包的选项,我看到我的桌面被删除了,我后来安装了一个新的ubuntu桌面。

编辑 看起来我可以在80端口上打开一个python http服务器,如下所示

zyh@zyh-desktop:~/Downloads/code/share-file$ sudo python -m SimpleHTTPServerWithUpload 80
Serving HTTP on 0.0.0.0 port 80 ...
Run Code Online (Sandbox Code Playgroud)

而当我打开火狐浏览器,输入 127.0.0.1 时,我仍然看到了 nginx 欢迎页面。

Ram*_*and 9

请先停止nginx然后尝试删除:

sudo apt-get purge nginx nginx-common
Run Code Online (Sandbox Code Playgroud)

或者

sudo apt-get remove nginx-core nginx-full nginx-light nginx-extras nginx-naxsi nginx-common
Run Code Online (Sandbox Code Playgroud)