找回密码
 注册
查看: 3347|回复: 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 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

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2020-6-5 17:43:13 | 显示全部楼层
[root@centos6 conf]# ps -ef |grep httpd
3 x/ Y( w# B2 U% @$ Y) Uroot      2664     1  0 17:41 ?        00:00:00 /usr/local/apache/bin/httpd -k start& Y9 M* n4 X( _2 P6 k; n8 @
daemon    2665  2664  0 17:41 ?        00:00:00 /usr/local/apache/bin/httpd -k start* H/ d" S% {2 J: d7 Q
daemon    2666  2664  0 17:41 ?        00:00:00 /usr/local/apache/bin/httpd -k start7 J0 t0 Y' A1 i: P5 v0 B1 t# |6 H
daemon    2667  2664  0 17:41 ?        00:00:00 /usr/local/apache/bin/httpd -k start
( @1 d8 e" Z  x  b1 k) l% v6 Zdaemon    2669  2664  0 17:41 ?        00:00:00 /usr/local/apache/bin/httpd -k start
# M0 H4 E% b: [4 U: z4 Eroot      2756  1210  0 17:44 pts/0    00:00:00 grep httpd7 a8 X; g# i' m& n+ ]6 j6 d* X
[root@centos6 conf]# lsof -i:803 `  V6 k0 C0 n8 y
COMMAND  PID   USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
2 Y5 z) |2 A. V3 E$ ^httpd   2664   root    4u  IPv6  69457      0t0  TCP *:http (LISTEN); s' y4 C8 j$ M  y; d# _2 F# D& E" }
httpd   2666 daemon    4u  IPv6  69457      0t0  TCP *:http (LISTEN)
( c. [- W, e1 j- Mhttpd   2667 daemon    4u  IPv6  69457      0t0  TCP *:http (LISTEN)# X4 ~1 [$ F! d0 T+ b& l
httpd   2669 daemon    4u  IPv6  69457      0t0  TCP *:http (LISTEN)
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-12 03:25 , Processed in 0.015668 second(s), 23 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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