0

在我的 Mac (10.8) 上修改 Apache 的配置时,我做了一些我不应该做的事情,现在我什至无法加载页面 localhost。

我试图解决这个问题的方法是在 /etc/apache2/ 中恢复 httpd.conf 的原始版本,并在 /etc 中恢复配置文件 hosts。我以为这已经足够了,但事实并非如此。

奇怪的是,我可以通过寻址 127.0.0.1 或 0.0.0.0 来加载 index.html。本地主机没有回答!

有任何想法吗?我忘记恢复文件了吗?

4

1 回答 1

0

你修改了hosts文件吗?

/etc/hosts

这应该设置为

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1   localhost
255.255.255.255 broadcasthost
::1             localhost
fe80::1%lo0 localhost
于 2013-04-17T13:34:00.677 回答