网管程序员论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1728|回复: 1

[Linux系统] 解决httpd: Could not reliably determine the server's fully qualified domain name

[复制链接]
发表于 2013-7-31 15:43:08 | 显示全部楼层 |阅读模式
解决httpd: Could not reliably determine the server's fully qualified domain name

解决方案:

进入apache的安装目录:

Windows : D:\Program Files\Apache Software Foundation\Apache2.2\conf

linux : /usr/local/apache/conf

用记事本打开httpd.conf

将里面的#ServerName localhost:80注释去掉即可。

再执行httpd

然后可以通过浏览器访问http://localhost:80,如果页面显示“It works!”,即表示apache已安装并启动成功。
 楼主| 发表于 2013-7-31 15:45:59 | 显示全部楼层

解决apache启动错误"httpd:Could not reliably determine..."

启动apache遇到错误:httpd: Could not reliably determine the server's fully qualified domain name

[root@server httpd-2.2.4]# /usr/local/apache/bin/apachectl start

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

1)进入apache的安装目录:(视个人安装情况而不同)

[root@server ~]# cd /usr/local/apache/conf

2)编辑httpd.conf文件,搜索"#ServerName",添加ServerName localhost:80

[root@server conf]# ls
extra  httpd.conf  magic  mime.types  original
[root@server conf]# vi httpd.conf
#ServerName www.example.com:80
ServerName localhost:80

3)再重新启动apache 即可。
[root@server ~]# /usr/local/apache/bin/apachectl restart
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|小黑屋|手机版|Archiver|最新更新|网管程序员社区 鄂ICP备11008024号-3

GMT+8, 2019-11-21 20:09 , Processed in 0.093600 second(s), 23 queries .

Powered by 网管论坛

© 2001-2018 www.027safe.com Inc.

快速回复 返回顶部 返回列表