如何在ufw app list中删除应用程序可用的应用程序?

我想在此列表中删除Apache,Apache Full,Apache Secure。 我有Nginx服务器。 但是,当我在nginx服务器上安装phpmyadmin时,我遇到了问题。 之后,我在可用的应用程序列表中看到了Apache,Apache Full,Apache Secure。

$ sudo ufw app list Available applications: Apache Apache Full Apache Secure Nginx Full Nginx HTTP Nginx HTTPS OpenSSH 

我试过了:

 sudo service apache stop sudo apt-get remove apache sudo apt-get uninstall apache sudo apt remove apache --purge sudo apt-get remove apache sudo apt-get purge apache 

但不行。 如何删除这三个应用程序?

从文章Firewall的Ubuntu文档:

打开端口的应用程序可以包含ufw配置文件,该配置文件详细说明了应用程序正常运行所需的端口。 配置文件保存在/etc/ufw/applications.d ,如果默认端口已更改,则可以对其进行编辑。

我不认为这些应用程序配置文件的存在可能是一个问题,但您可以通过以下命令删除UFW的Apache配置文件:

 sudo rm -R /etc/ufw/applications.d/apache2* 

要查找使用HTTP服务 HTTPS端口80 | 443使用此命令:

 sudo lsof -i -n -P +c 0 | grep ':80\|:443' 

我不知道哪个版本的Ubuntu,但99%完全删除Apache 2你应该使用:

 sudo apt update sudo apt remove --purge apache2* sudo apt-get autoremove && sudo apt autoclean