如何從 ubuntu 14.04 LTS 完全刪除 nginx

如何從 ubuntu 14.04 LTS 完全刪除 nginx

我已經卸載了所有 nginx 相關的軟體包。https://askubuntu.com/a/457412/383308),之後我運行下面的命令,命令什麼也沒給。

sudo find / -name 'nginx'

當我運行這樣的命令時,我得到一個結果:

zyh@zyh-desktop:~$ ps -ef | grep nginx
zyh       2666  2442  0 11:12 pts/1    00:00:00 grep --color=auto nginx

但是當我打開瀏覽器並輸入127.0.0.1時,我仍然看到nginx的歡迎頁面。見下文: nginx Web 服務仍然存在

我認為我的問題與這個非常相似[已解決] nginx 正在運行,但是...未安裝,但是運行命令後

sudo update-rc.d -f nginx remove
sudo rm /etc/init.d/nginx

重啟後,我仍然可以看到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 ...

當我打開 Firefox 瀏覽器並輸入 127.0.0.1 時,我仍然看到 nginx 歡迎頁面。

答案1

請住手nginx首先然後嘗試刪除:

sudo apt-get purge nginx nginx-common

或者

sudo apt-get remove nginx-core nginx-full nginx-light nginx-extras nginx-naxsi nginx-common

答案2

看起來我的問題中的網頁(請參閱上面的螢幕截圖)是一個快取頁面,請按照本文中提到的方法:如何從 Firefox 的快取中清除單一網站?,我剛剛清除了緩存,現在,我看到 Firefox 現在無法連接到 127.0.0.1。抱歉有噪音。

這意味著 nginx 已經從我的 Ubuntu 中卸載了。

相關內容