找回密码
 注册
查看: 3232|回复: 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
3 ^9 U% x/ q. I* _+ u9 `
[root@centos6 httpd-2.2.31]# /usr/local/apache/bin/apachectl start# A1 W1 j+ W: U4 l8 |# \, W
httpd: apr_sockaddr_info_get() failed for centos6
( o4 M# H: Y6 S% _httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

$ \- ~. x" L7 f, m9 S! j2 m
* h# @* x; p# D) o3 q8 a2 K
, g" W3 X  [; Z) z6 {
+ C3 f. _+ A% a& N9 _5 g* ~
1)进入apache的安装目录:(视个人安装情况而不同)
% |0 a4 C" m$ u  {. p7 v
[root@centos6 httpd-2.2.31]# cd /usr/local/apache/conf/
% G: d# L# a/ j5 K[root@centos6 conf]# pwd
" G) @' \2 ~$ d; C/usr/local/apache/conf
/ e, _, |( I7 @7 u
2)编辑httpd.conf文件,搜索"#ServerName",添加
#ServerName www.example.com:80    复制到下面,修改www.example.com:80为localhost:80
如下:
ServerName localhost:804 ^6 \$ a: U1 d( _4 w2 P; s. x" R
0 Q9 P& F/ a- \' x0 P* W
[root@centos6 httpd-2.2.31] # ls9 e" t/ n* Y! z8 ?  C
extra  httpd.conf  magic  mime.types  original
6 V8 N. l* X( a- f4 b& W5 T7 `[root@server conf]# vi httpd.conf* [6 F7 o# w7 H& |
#ServerName www.example.com:80
4 N* D& R6 w" cServerName localhost:80
3)再重新启动apache 即可。
2 ?& [- a3 V$ r. }
( }& I( g3 ~; H: Y' Z9 v' u; d' ?
[root@centos6 httpd-2.2.31]# /usr/local/apache/bin/apachectl restart
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-12 03:26 , Processed in 0.030950 second(s), 23 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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