找回密码
 注册
查看: 3348|回复: 1

Looking up localhost Making HTTP connection to localhost

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2020-6-5 17:40:59 | 显示全部楼层 |阅读模式
[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

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2020-6-5 17:43:13 | 显示全部楼层
[root@centos6 conf]# ps -ef |grep httpd
3 q4 R  v# u* }  g$ r% lroot      2664     1  0 17:41 ?        00:00:00 /usr/local/apache/bin/httpd -k start
6 c; |$ [7 ^/ K# B) |daemon    2665  2664  0 17:41 ?        00:00:00 /usr/local/apache/bin/httpd -k start
9 h3 l; h. t1 }$ L- P6 n7 gdaemon    2666  2664  0 17:41 ?        00:00:00 /usr/local/apache/bin/httpd -k start3 H1 f9 F( g: r) J4 D
daemon    2667  2664  0 17:41 ?        00:00:00 /usr/local/apache/bin/httpd -k start5 p4 N, ?+ A. e  @: R. ~$ N  f
daemon    2669  2664  0 17:41 ?        00:00:00 /usr/local/apache/bin/httpd -k start' ^0 L& q% W! l+ @
root      2756  1210  0 17:44 pts/0    00:00:00 grep httpd
6 r/ L+ J$ I& f) G- U[root@centos6 conf]# lsof -i:80" e$ j! ?' Y5 d$ |  J$ x& |
COMMAND  PID   USER   FD   TYPE DEVICE SIZE/OFF NODE NAME2 j9 F% L  c: ~
httpd   2664   root    4u  IPv6  69457      0t0  TCP *:http (LISTEN)
. J4 C& l7 M) \0 \7 |2 Ihttpd   2666 daemon    4u  IPv6  69457      0t0  TCP *:http (LISTEN)2 w9 F" |& |, r5 f( t$ n: @
httpd   2667 daemon    4u  IPv6  69457      0t0  TCP *:http (LISTEN): C0 a* t. R8 D
httpd   2669 daemon    4u  IPv6  69457      0t0  TCP *:http (LISTEN)
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 04:23 , Processed in 0.020344 second(s), 23 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表