马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?开始注册
x
启动apache遇到错误:httpd: Could not reliably determine the server's fully qualified domain name
- h) ^# Y/ k" K& P9 h4 u |[root@centos6 httpd-2.2.31]# /usr/local/apache/bin/apachectl start' T* v: u N, f% o6 B4 m
httpd: apr_sockaddr_info_get() failed for centos6
3 a" ~- `+ I' \7 A) _5 Q" |httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
4 {9 z3 ^3 r# T6 ]: m& l5 |( W7 U, @
7 s9 c6 C1 L7 p) H# ]/ O |. J: r+ Q( s% ?8 i# o7 ?" \2 q1 C
+ t# e/ a% F6 K. ^0 A1)进入apache的安装目录:(视个人安装情况而不同) 4 {' ]! a9 K6 w5 |
[root@centos6 httpd-2.2.31]# cd /usr/local/apache/conf/
" K- O ^. g( ][root@centos6 conf]# pwd
# [0 n. T9 c; g/usr/local/apache/conf
/ Y- x6 o+ T. k, X( n4 B4 c |
2)编辑httpd.conf文件,搜索"#ServerName",添加 如下: ServerName localhost:80; \' W8 b$ q/ |/ O# c; F7 k4 |9 |
6 ]1 N) p' Q% S0 a/ D[root@centos6 httpd-2.2.31] # ls+ O5 `. w# C( ^. d* c( @: O. t
extra httpd.conf magic mime.types original
& S( u* `# F# F; t+ k A% i[root@server conf]# vi httpd.conf) _& s: `7 n& @
#ServerName www.example.com:804 ^- e$ p2 i9 G/ k+ \- o
ServerName localhost:80 |
3)再重新启动apache 即可。 & N1 l4 g- w# v2 d3 ]* |
% a/ w% H0 S7 x% m0 a
| [root@centos6 httpd-2.2.31]# /usr/local/apache/bin/apachectl restart |
|