易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 3230|回复: 0
收起左侧

httpd: Could not reliably determine the server's fully qualified domain name, us

[复制链接]
发表于 2020-6-5 17:08:36 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?开始注册

x
启动apache遇到错误:httpd: Could not reliably determine the server's fully qualified domain name
* i! u' h5 f7 E
[root@centos6 httpd-2.2.31]# /usr/local/apache/bin/apachectl start. k* S. e, R" J
httpd: apr_sockaddr_info_get() failed for centos6
2 k. ]) \3 k1 ]" L$ vhttpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
" m, P$ I$ y% Y1 E
7 q" V: N" \. B5 l3 c
- k# E% F8 A; r0 @

3 W+ J4 X; W6 U3 T
1)进入apache的安装目录:(视个人安装情况而不同)
# y2 T% S; i  l) B4 G$ @, s
[root@centos6 httpd-2.2.31]# cd /usr/local/apache/conf/+ ~, S: i) w) p8 N
[root@centos6 conf]# pwd
% G: L  B  X& n" _  N5 L2 ]' U/usr/local/apache/conf
+ G- c7 o: |3 D% \% N* n! P! w. @; e
2)编辑httpd.conf文件,搜索"#ServerName",添加
#ServerName www.example.com:80    复制到下面,修改www.example.com:80为localhost:80
如下:
ServerName localhost:80
% r7 q; `9 c8 ^) _* \4 x
0 k& g' l% y- o" d
[root@centos6 httpd-2.2.31] # ls/ F2 P1 b5 i" g4 ?
extra  httpd.conf  magic  mime.types  original+ }, r$ i5 q9 C0 F; G+ W
[root@server conf]# vi httpd.conf3 D' o/ @- Y3 r5 v9 j3 \1 a1 l1 d
#ServerName www.example.com:80  [7 m8 J& N& O) q( x/ s
ServerName localhost:80
3)再重新启动apache 即可。
8 {) ?: `( Y1 }& Q$ L6 [

* F  t6 W1 R1 P. W
[root@centos6 httpd-2.2.31]# /usr/local/apache/bin/apachectl restart
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

北京云银创陇科技有限公司以云计算运维,代码开发

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )点击这里给我发消息

GMT+8, 2026-4-8 23:58 , Processed in 0.048947 second(s), 23 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

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