如何从 Ubuntu 16.04 LTS 中完全删除 Apache

问题描述 投票:0回答:2

我已经尝试了 AskUbuntu 论坛中给出的所有步骤,但都是徒劳。我也删除了整个 LAMP 堆栈。但是 Apache2 Ubuntu 默认页面加载了。我想转移到 Nginx 并尝试测试我的网站第一的。 AskUbuntu 解决方案:https://askubuntu.com/questions/50101/how-do-i-remove-the-lamp-stack-so-i-can-start-over https://askubuntu.com/questions/176964/permanently-removing-apache2

非常感谢任何帮助。

谢谢!

apache nginx lamp ubuntu-16.04
2个回答
7
投票

就我而言,这是因为该死的索引文件留在了 /var/www 目录中。所以 NGINX 正在运行,尽管它显示了 apache html 文件:) 因此,一旦我从目录中删除了 index.html,它就会显示正确的文件。


0
投票
sudo apt remove --purge apache2 && sudo apt autoremove -y

此命令将完全删除 Apache,包括其配置,然后自动删除任何剩余的依赖项,无需手动确认。

© www.soinside.com 2019 - 2024. All rights reserved.