|
启动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 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 |
|