apache不会开始 [英] apache won't start

查看:90
本文介绍了apache不会开始的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,这让我感到很困惑,以至于我看不到自己能够自己解决问题. 我在Linux下的笔记本电脑上运行apache,因此当我离开桌面时,我仍然可以使用php和mySql.一切都很好. httpd.conf的语法没有任何问题; apachectl configtest返回确定.但是,我去了一家咖啡馆,那里的apache不会开始.我沿着这条街走到下一个ap,apache将毫无问题地启动,但是在这个咖啡馆apache不会启动.任何帮助将不胜感激.

Ok, so this has me so stumped that I don't see myself being able to solve the problem on my own. I am running apache on my laptop under linux, so that when I'm away from my desktop I can still work with php and mySql. Everything works great. There is nothing wrong with the syntax of the httpd.conf; apachectl configtest returns OK. However, there is one cafe that I go to where apache will not start. I'll go down the street to the next ap and apache will start without issue, but at this one cafe apache won't start. Any help will be appreciated.

我认为相关的日志条目是

The log entry that I believe to be relevant is

[Wed Nov 16 14:03:11 2011] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "laptop"
[Wed Nov 16 14:33:36 2011] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "laptop"
[Wed Nov 16 14:42:48 2011] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "laptop"
[Wed Nov 16 14:45:27 2011] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "laptop"
[Wed Nov 16 14:52:54 2011] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "laptop"

推荐答案

如果命令主机名的输出为

If output of a command hostname is

# hostname
laptop

在您的日志中给出此错误:

Giving this error in your logs:

(EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "laptop"

然后您应该将/etc/hosts文件放入这样:

Then you should put in your /etc/hosts file sth like this :

127.0.0.1       laptop.homenetwork laptop localhost
::1             laptop.homenetwork laptop localhost 

它还可以帮助某些人放置

It also helps some people to put

ServerName localhost

在/etc/apache2/httpd.conf文件中

in /etc/apache2/httpd.conf file

这篇关于apache不会开始的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆