2013-04-17 30 views
0

我在Mac上修改Apache配置(10.8)时做了一些我不应该拥有的功能,现在我甚至无法加载页面本地主机。Mac上的Apache - localhost服务器找不到

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

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

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

+0

设置你做'须藤/ usr/sbin目录/的apachectl restart'你改变了你的后'httpd.conf'? – gmaliar

+0

是的,但没有变化。 – whiplash

+0

这非常不好(TM)。这个问题与你的Apache无关,你搞砸了你的网络路由。 'localhost'应该总是指向127.0.0.1,而'0.0.0.0'甚至不是有效的IP地址。你确定你把原始的'/ etc/hosts'放回去了吗?您更改过的任何其他系统文件?你试过把它关掉再重新打开吗? – Carsten

回答

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 
+0

是的,我恢复到原来的版本hosts文件和httpd.conf。 – whiplash

相关问题