找回密码
 注册
查看: 3234|回复: 0

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

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2020-6-5 17:08:36 | 显示全部楼层 |阅读模式
启动apache遇到错误:httpd: Could not reliably determine the server's fully qualified domain name

7 H" `8 S* w: _0 I[root@centos6 httpd-2.2.31]# /usr/local/apache/bin/apachectl start8 L. m+ w7 k6 x! ^
httpd: apr_sockaddr_info_get() failed for centos63 \- `5 q( F  N2 D" t1 F! M* c! Q
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

0 f& B- w3 c& |3 X* Q+ E2 v* C8 O9 i4 @: c/ Y- W
9 K& t, F& A( {. s4 x
3 W. v/ h( d0 m, o# Y) [' h- }
1)进入apache的安装目录:(视个人安装情况而不同)
3 d' a4 O# w7 G3 J' U
[root@centos6 httpd-2.2.31]# cd /usr/local/apache/conf/
) I4 ]) I4 x& w3 H[root@centos6 conf]# pwd9 T+ Z& @  [( q: Z
/usr/local/apache/conf
/ I0 A5 Z3 `  B  l% u) Q
2)编辑httpd.conf文件,搜索"#ServerName",添加
#ServerName www.example.com:80    复制到下面,修改www.example.com:80为localhost:80
如下:
ServerName localhost:80
6 x4 N& I; k" u& U: p9 T' r" J" Q9 W9 Q/ M
[root@centos6 httpd-2.2.31] # ls
( `* [1 P- K2 V$ P/ z5 ]; e! @extra  httpd.conf  magic  mime.types  original3 a7 e8 R# z$ z  D4 y8 ]; ~' z
[root@server conf]# vi httpd.conf
2 Z: L: P( t7 L- ~' x8 E9 T  c6 P) B#ServerName www.example.com:80
! A9 g/ R6 x$ zServerName localhost:80
3)再重新启动apache 即可。

# P9 W# A6 d$ H2 G3 v- ~& `) c% X7 @/ Y4 E6 r3 w* o
[root@centos6 httpd-2.2.31]# /usr/local/apache/bin/apachectl restart
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 04:24 , Processed in 0.024752 second(s), 23 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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