|
|
[root@centos6 conf]# /usr/local/apache/bin/apachectl status( `+ W+ z* O' v1 s# c5 A3 l
Looking up localhost! I! d% d8 O- v: X0 a
Making HTTP connection to localhost* H+ |4 ?! k# a
Alert!: Unable to connect to remote host./ M5 T# l1 j( e5 l. A! e
lynx: Can't access startfile http://localhost/server-status
4 _: L9 X+ \, K9 R5 ?
$ z: A' r1 L0 |9 a% w查看error.log日志
# i/ p* W2 k# H m# f[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"0 \, _. t, l0 ]& c4 |# B# ?' Z
: @5 _2 V' @+ {- \' X, f解决方法:
3 `; F# }% e3 Y: Q( T添加host域名解析:# ]9 z3 \9 R, \* h6 H
vim /etc/hosts
. p- n5 ?, S2 r: {- n5 ]' T- k: q127.0.0.1 centos6- c' V% \$ U1 Q
: L$ x1 R2 e4 R0 c1 R" k[root@centos6 conf]# /usr/local/apache/bin/apachectl start
& E8 `; U6 ~3 L% r" ?; b[root@centos6 conf]# /usr/local/apache/bin/apachectl status
3 s1 k4 w( e5 t: E) b9 | Not Found
$ ~# `; ^; x, P$ n" d# V% [& b4 x The requested URL /server-status was not found on this server.5 ^; B# t7 O2 d( ^1 x- Y' P
1 Z7 l8 F. J! e
) H. c3 a5 N/ c* g% L: q |
|