马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?开始注册
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 T1)进入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 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 |
|