Ubuntu 升级后出现“/etc/apache2/httpd.conf: No such file or directory”错误

noi*_*dea 11 localhost apache-2.2

所以我升级了 Ubuntu 然后我去了 127.0.0.1Chrome 并得到“糟糕!Google Chrome 无法连接到 127.0.0.1”所以我重新启动了 Apache,但遇到了这个错误:

apache2: /etc/apache2/apache2.conf 第 215 行的语法错误: 无法打开配置文件 /etc/apache2/httpd.conf: 没有那个文件或目录

操作“configtest”失败。Apache 错误日志可能包含更多信息。...失败!

这是我/etc/apache2文件夹的内容:

conf.d/
mods-available/
mods-enabled/
sites-available/
sites-enabled/
apache2.conf
apache2.conf.dpkg-dist
envvars
magic
ports.conf
Run Code Online (Sandbox Code Playgroud)

这是怎么回事?我该如何解决这个问题?

Hex*_*Hex 14

由于某种原因,您错过了通常没有内容的 http.conf。

请尝试创建它并重新启动您的网络服务器

触摸 /etc/apache2/httpd.conf