我的本地主机默认页面欢迎我上 nginx

我的本地主机默认页面欢迎我上 nginx

我又一次对我的 nginx 服务器感到失望。我试图laravel在我的文件夹中安装/var/www/project,但当我从中删除默认 HTML 目录时,/var/www/html它却将我转到nginx欢迎页面。phpmyadmin 也不起作用。

我如何才能恢复 Apache 并永久删除 nginx?

答案1

按照步骤将 nginx 切换到 apache2

sudo apt-get 删除 nginx
sudo apt-get 清除 nginx
sudo apt-get 删除 nginx-common
sudo apt-get purge nginx-common
sudo apt-get 删除 nginx-full
sudo apt-get purge nginx-full
sudo apt-get 自动删除

删除 nginx 后,通过运行此命令确保 nginx 已完全删除。

sudo dpkg -l | grep nginx

如果您获得任何与 nginx 相关的包,请将其删除。

现在在你的 Ubuntu 和所有与你的项目相关的服务上安装 apache2。

sudo apt-get 安装 apache2

答案2

首先 autoclean n 自动删除不必要的文件 sudo apt-get autoclean sudo apt-get autoremove

重新安装 apache2 并检查

相关内容