`
fjguodong
  • 浏览: 39345 次
社区版块
存档分类
最新评论

Apache启动错误:httpd.exe: Could not reliably determine the server's fully qualified

 
阅读更多

       在自己电脑配置Apache开发环境问题的时候,可能会遇到apache的启动错误:httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168. x. x for ServerName,这个错误在error.log也会有输出。

 

# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
#ServerName www.xizhilang.com:8080
# 在httpd.conf文件中添加下面这行,就能避免这个启动错误
ServerName localhost:8080

 

       正如注释推荐的做法,直接将本机的名称指定为你的IP地址,而报出的那个错误就是因为未配置域名服务器或者域名服务器未能找到该域名的地址。把Apache服务的名称指定为本地IP地址,就不需要去通过DNS服务器去得到本机的IP地址,而localhost这个特殊的地址是由DNS自己本身实现的一个内置配置,所以这里用localhost也可以在本地完成地址的转换。

 

我试着修改本地的hosts文件和httpd.conf文件,也能避免那个错误的出现,具体方法如下。

 

首先,修改httpd.conf文件,在配置文件中添加该项配置 ServerName xizhilang.com:8080 ,即上面的那个配置。

# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
#ServerName www.xizhilang.com:8080
ServerName xizhilang.com:8080

 

然后,修改hosts文件,hosts文件的位置是 “系统盘符:\Windows\System32\drivers\etc\hosts” ,打开之后在最后添加两行,配置如下:

# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

# localhost name resolution is handled within DNS itself.
#	127.0.0.1		localhost
#	::1			localhost
# 添加如下两行,将 xizhilang.com 域名解析成本地地址
	127.0.0.1		xizhilang.com
	::1			xizhilang.com

 

添加完后,打开apache之后,OK搞定,警告信息不再出现!



 

在浏览器中输入刚才配置的那个域名,就可以访问apache的根目录了。



 

        这样既解决了apache的启动报错问题,又能使用域名来进行访问和测试了!

 

       完

       2014/02/19

  • 大小: 39.4 KB
  • 大小: 114.5 KB
分享到:
评论

相关推荐

    apache资料详述

    service will be called Apache2.2 and the configuration will be assumed to be conf\httpd.conf. httpd.exe -k uninstall ------移除Apache service You can control an Apache service by its command line ...

    Apache启动错误Permission denied: httpd: could not open error log file解决方法

    启动 httpd:(13)Permission denied: httpd: could not open error log file /home/wwwroot/jb51.net/logs/error_log. Unable to open logs [失败] 三、问题原因 因为新安装的系统,所以SELinux默认是开启状态,...

    apache2配置文件httpd.conf

    apache2配置文件httpd.conf

    apachehttpd.exe

    The Apache HTTP Server ("httpd") was launched in 1995 and it has been the most popular web server on the Internet since April 1996. It has celebrated its 25th birthday as a project in February 2020

    Linux(centos)下的Apache安装压缩包:httpd-2.2.34.tar.gz

    Linux(centos)下的Apache安装压缩包:httpd-2.2.34.tar.gz,结合我的博客http://blog.csdn.net/jing12062011/article/details/76850284使用,留存一下便于以后搭建系统用

    httpd.conf

    #cp httpd.conf httpd.conf.origin //将原有配置文件备份 # more httpd.conf //查看配置文件,我们注意到以一配置: DocumentRoot"/var/www/html" //特别是要注意这个配置 //这是Apache 2.4的一个新的默认值,拒绝...

    Apache 的 httpd.conf 详解

    Apache 的 httpd.conf 详解 Apache 的 httpd.conf 详解Apache 的 httpd.conf 详解Apache 的 httpd.conf 详解Apache 的 httpd.conf 详解Apache 的 httpd.conf 详解Apache 的 httpd.conf 详解

    apache安装

    httpd: Could not reliably determine the server's fully qualified domain name, using 192.168.2.116 for ServerName错误 在#ServerName www.example.com:80 添加 ServerName www.example.com:80

    httpd.exe.manifest

    这个是用来解决APACHE 滚动日志的,原文地址在这里。http://hi.baidu.com/7xwang/modify/blog/3c3543ac1ff649d17cd92a34

    Apache2 httpd.conf 中文版

    Apache2 httpd.conf 中文版 Apache2 httpd.conf 中文版

    Apache2 httpd.conf 配置文件中文版

    Apache2 httpd.conf 配置文件中文版 详细说明了apache2的配置文件的各项参数的配置方法,

    php5apache2.dll-php5.1.x.rar

    2.将 httpd.exe.manifest 文件复制到你的apache安装目录下的bin文件夹下. 3.双击运行vcredist_x86.exe安装.(如果您的系统里已安装了 .NET framework 2.就可以省掉这一步) 完成!重启你的apache2.2。

    Apache配置文件httpd.conf

    Apache服务器的本地配置是一件令人头疼的事,无法访问一般是由于配置文件的不正确导致的,这是一份可以在Mac系统中正常运行的配置文件。

    Apache的httpd.conf文件常用指令解释

    Apache的httpd.conf文件常用指令解释Apache的httpd.conf文件常用指令解释Apache的httpd.conf文件常用指令解释

    apache启动报错:httpd: apr_sockaddr_info_get() failed

    httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

    Apache2配置文件httpd.conf中文版.docx

    Apache2配置文件httpd.conf中文版.docx

    apache httpd.conf中文 apache优化

    apache httpd.conf中文 apache优化

    Web应用安全:apache安全.docx

    A:httpd.cong B:ports.conf C:apache2.conf D:access.log 参考答案:C 以下哪个参数不是apache日志配置信息中的参数: A:%A B:%H C:%U D:%C 参考答案:D 在apache日志配置中,和远程主机有关的参数是: A:%h B:%m C:...

    AppServ2.6.0的安装

    httpd.exe: Could not reliably determine the server's fully qualified domain name, using 10.0.0.109 for ServerName的处理办法 AppServ2.6.0是由Apache、PHP、mhsql、phpMyAdmin组成的安装包适合初学者使用。...

Global site tag (gtag.js) - Google Analytics