|
|
[root@centos6 conf]# /usr/local/apache/bin/apachectl status4 _# O. M# S/ w% ]. x
Looking up localhost; |. u9 Y' U" w! N; x7 S L, G* D
Making HTTP connection to localhost
! ?3 n$ V2 Z+ s; l4 h" b pAlert!: Unable to connect to remote host.
# n% [- Q: o8 s; @6 _% a+ Rlynx: Can't access startfile http://localhost/server-status; ^" K) P) j2 |; {
# N) e3 A3 m7 G3 e, z; P查看error.log日志, B2 \. }. @, a
[Fri Jun 05 17:38:02 2020] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "centos6" Z) z5 H( u) y1 X
1 b% U/ [& j2 g9 _ x! H解决方法:
! Y2 Q' r7 c, t& }7 Z8 c& N添加host域名解析:& v ^. {0 Y8 B4 Y! ^- ?. S2 d3 X
vim /etc/hosts
) u" y5 w* {/ ^' I127.0.0.1 centos6
/ {7 `0 W- I2 b- E4 u. ]* B
. o% @4 ?( h5 O$ h+ o; d. @ x8 f( ?5 B[root@centos6 conf]# /usr/local/apache/bin/apachectl start
, z) ?; J& T* o8 w& ^! y6 |[root@centos6 conf]# /usr/local/apache/bin/apachectl status
$ _2 b B$ h% \; q( ~) o: [ Not Found$ U/ z2 J# f$ V$ q) S* H) D
The requested URL /server-status was not found on this server.
4 e* t0 \. m; K- h1 ~
5 S. V" j/ Z" I' E# A# k5 Z
% m; j! s' Q4 J4 Q" r+ i) K! d3 l( U |
|