找回密码
 注册
查看: 3233|回复: 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

' T# m+ C/ u- }[root@centos6 httpd-2.2.31]# /usr/local/apache/bin/apachectl start
$ T' ~, w4 j3 d; s6 Shttpd: apr_sockaddr_info_get() failed for centos63 S7 }+ o' Z) W" G1 O" Q! Y
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
' S7 V" s; L9 T+ f/ r9 Y

, U& a% M% z$ F% a9 p8 A+ h" M
) ?) a3 r+ y" v# T! e, K% K6 k1 ?- b  X2 p
1)进入apache的安装目录:(视个人安装情况而不同)

6 R+ e+ L( g; @9 j$ C6 f
[root@centos6 httpd-2.2.31]# cd /usr/local/apache/conf/' u# {0 W/ B3 Z9 H, x) r/ }& m, ~$ a
[root@centos6 conf]# pwd4 y* l* U+ O; z9 i
/usr/local/apache/conf

( i+ ^  r2 `4 N" A* n" N$ d1 x
2)编辑httpd.conf文件,搜索"#ServerName",添加
#ServerName www.example.com:80    复制到下面,修改www.example.com:80为localhost:80
如下:
ServerName localhost:80
+ y2 R2 `+ F. I( {
* r) Y1 y! `' X* U( p% \2 t) r2 W
[root@centos6 httpd-2.2.31] # ls# r2 a( m, B. T: i
extra  httpd.conf  magic  mime.types  original
8 H7 P9 H. v( o) [$ g) C[root@server conf]# vi httpd.conf
" y+ o' A( H1 R' W#ServerName www.example.com:807 y  e- |, g: k. M! Q+ k) c$ g
ServerName localhost:80
3)再重新启动apache 即可。

  q( o# x& y! z* z) ]: N9 d! u% B# e: h3 o& O5 A
[root@centos6 httpd-2.2.31]# /usr/local/apache/bin/apachectl restart
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-12 04:22 , Processed in 0.014894 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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