Ubuntu의 Apache : '서버가 응답하지 않습니다'

Ollie_W

나는 운이없는 내 아파치 서버 문제를 해결했습니다. 내 URL을 입력하면 서버가 응답하지 않기 때문에 브라우저에서 페이지를 열 수 없습니다.

터미널에서 컬을 시도하면 시간이 초과됩니다.

 curl 139.162.193.10
curl: (7) Failed to connect to 139.162.193.10 port 80: Operation timed out

traceroute의 출력 :

➜  ~ traceroute www.wearenaughtypixel.co.uk
traceroute to www.wearenaughtypixel.co.uk (139.162.193.10), 64 hops max, 52 byte packets
 1  bthomehub (192.168.1.254)  72.481 ms  6.291 ms  9.498 ms
 2  * * *
 3  * * *
 4  31.55.186.176 (31.55.186.176)  10.121 ms  11.499 ms  16.226 ms
 5  core4-hu0-16-0-3.faraday.ukcore.bt.net (195.99.127.206)  13.949 ms
    core4-hu0-8-0-5.faraday.ukcore.bt.net (195.99.127.56)  14.247 ms
    core3-hu0-14-0-1.faraday.ukcore.bt.net (195.99.127.42)  25.327 ms
 6  213.137.183.32 (213.137.183.32)  14.876 ms
    213.137.183.96 (213.137.183.96)  14.341 ms
    213.137.183.38 (213.137.183.38)  13.204 ms
 7  82.112.115.185 (82.112.115.185)  12.984 ms  11.453 ms
    ldn-b3-link.telia.net (213.248.67.97)  9.699 ms
 8  ldn-bb3-link.telia.net (62.115.117.20)  12.696 ms
    ae-1.r03.londen05.uk.bb.gin.ntt.net (129.250.6.230)  10.453 ms  12.211 ms
 9  ldn-b4-link.telia.net (62.115.119.145)  10.314 ms
    ae-2.r04.londen05.uk.bb.gin.ntt.net (129.250.6.9)  10.492 ms  14.466 ms
10  linode-ic-318542-ldn-b3.c.telia.net (62.115.41.65)  10.500 ms
    ae-0.r24.londen12.uk.bb.gin.ntt.net (129.250.4.140)  14.885 ms  12.536 ms
11  switch-lon1.linode.com (109.74.207.5)  11.348 ms
    109.74.207.13 (109.74.207.13)  14.566 ms
    ae-6.r00.londen10.uk.bb.gin.ntt.net (129.250.4.21)  10.792 ms
12  * 83.217.238.86 (83.217.238.86)  26.789 ms  17.123 ms
13  * * gw-h10.linode.com (109.74.207.1)  20.029 ms
14  * * *
15  * * *
16  * * *
17  * * *
18  * * *
19  * * *
20  * * *
21  * * *
22  * * *
23  * * *
24  * * *
25  * * *
26  * * *
27  * * *
28  * * *
29  * * *
30  * * *
31  * * *
32  * * *
33  * * *
34  * * *
35  * * *
36  * * *
37  * * *
38  * * *
39  * * *
40  * * *
41  * * *
42  * * *
43  * * *
44  * * *
45  * * *
46  * * *
47  * * *
48  * * *
49  * * *
50  * * *
51  * * *
52  * * *
53  * * *
54  * * *
55  * * *
56  * * *
57  * * *
58  * * *
59  * * *
60  * * *
61  * * *
62  * * *
63  * * *
64  * * *

netstat

sudo netstat -ntlup
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      23688/mysqld    
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      30274/sshd      
tcp6       0      0 :::80                   :::*                    LISTEN      1891/apache2    

systemctl 상태 apache2

$ systemctl status apache2
● apache2.service - LSB: Apache2 web server
   Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
  Drop-In: /lib/systemd/system/apache2.service.d
           └─apache2-systemd.conf
   Active: active (running) since Sat 2016-11-12 01:06:18 GMT; 19h ago
     Docs: man:systemd-sysv-generator(8)
  Process: 1848 ExecStop=/etc/init.d/apache2 stop (code=exited, status=0/SUCCESS)
  Process: 2880 ExecReload=/etc/init.d/apache2 reload (code=exited, status=0/SUCCESS)
  Process: 1872 ExecStart=/etc/init.d/apache2 start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/apache2.service
           ├─1891 /usr/sbin/apache2 -k start
           ├─2912 /usr/sbin/apache2 -k start
           ├─2913 /usr/sbin/apache2 -k start
           ├─2916 /usr/sbin/apache2 -k start
           ├─2917 /usr/sbin/apache2 -k start
           ├─3118 /usr/sbin/apache2 -k start
           ├─3119 /usr/sbin/apache2 -k start
           ├─3120 /usr/sbin/apache2 -k start
           ├─3121 /usr/sbin/apache2 -k start
           ├─3122 /usr/sbin/apache2 -k start
           ├─3123 /usr/sbin/apache2 -k start
           ├─3124 /usr/sbin/apache2 -k start
           ├─3125 /usr/sbin/apache2 -k start
           ├─3126 /usr/sbin/apache2 -k start
           ├─3127 /usr/sbin/apache2 -k start
           ├─3128 /usr/sbin/apache2 -k start
           ├─3129 /usr/sbin/apache2 -k start
           ├─3130 /usr/sbin/apache2 -k start

이 문제를 해결하기 위해 조사해야 할 가장 가능성있는 문제는 무엇입니까?

복잡하지 않은 방화벽을 사용하고 있습니다.

$ sudo ufw status
[sudo] password for oliver: 
Status: active

To                         Action      From
--                         ------      ----
22                         ALLOW       Anywhere                  
22 (v6)                    ALLOW       Anywhere (v6) 

$ sudo iptables -vL 출력 :

$ sudo iptables -vL
Chain INPUT (policy DROP 18 packets, 1291 bytes)
 pkts bytes target     prot opt in     out     source               destination         
 163K   17M f2b-sshd   tcp  --  any    any     anywhere             anywhere             multiport dports ssh
 138K   14M ufw-before-logging-input  all  --  any    any     anywhere             anywhere            
 138K   14M ufw-before-input  all  --  any    any     anywhere             anywhere            
33043 1544K ufw-after-input  all  --  any    any     anywhere             anywhere            
32969 1540K ufw-after-logging-input  all  --  any    any     anywhere             anywhere            
32969 1540K ufw-reject-input  all  --  any    any     anywhere             anywhere            
32969 1540K ufw-track-input  all  --  any    any     anywhere             anywhere            

Chain FORWARD (policy DROP 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ufw-before-logging-forward  all  --  any    any     anywhere             anywhere            
    0     0 ufw-before-forward  all  --  any    any     anywhere             anywhere            
    0     0 ufw-after-forward  all  --  any    any     anywhere             anywhere            
    0     0 ufw-after-logging-forward  all  --  any    any     anywhere             anywhere            
    0     0 ufw-reject-forward  all  --  any    any     anywhere             anywhere            
    0     0 ufw-track-forward  all  --  any    any     anywhere             anywhere            

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
 190K   32M ufw-before-logging-output  all  --  any    any     anywhere             anywhere            
 190K   32M ufw-before-output  all  --  any    any     anywhere             anywhere            
 1359  123K ufw-after-output  all  --  any    any     anywhere             anywhere            
 1359  123K ufw-after-logging-output  all  --  any    any     anywhere             anywhere            
 1359  123K ufw-reject-output  all  --  any    any     anywhere             anywhere            
 1359  123K ufw-track-output  all  --  any    any     anywhere             anywhere            

Chain f2b-sshd (1 references)
 pkts bytes target     prot opt in     out     source               destination         
   63  4932 REJECT     all  --  any    any     116.31.116.41        anywhere             reject-with icmp-port-unreachable
 126K   15M RETURN     all  --  any    any     anywhere             anywhere            

Chain ufw-after-forward (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain ufw-after-input (1 references)
 pkts bytes target     prot opt in     out     source               destination         
   31  2418 ufw-skip-to-policy-input  udp  --  any    any     anywhere             anywhere             udp dpt:netbios-ns
    0     0 ufw-skip-to-policy-input  udp  --  any    any     anywhere             anywhere             udp dpt:netbios-dgm
    7   336 ufw-skip-to-policy-input  tcp  --  any    any     anywhere             anywhere             tcp dpt:netbios-ssn
   36  1776 ufw-skip-to-policy-input  tcp  --  any    any     anywhere             anywhere             tcp dpt:microsoft-ds
    0     0 ufw-skip-to-policy-input  udp  --  any    any     anywhere             anywhere             udp dpt:bootps
    0     0 ufw-skip-to-policy-input  udp  --  any    any     anywhere             anywhere             udp dpt:bootpc
    0     0 ufw-skip-to-policy-input  all  --  any    any     anywhere             anywhere             ADDRTYPE match dst-type BROADCAST

Chain ufw-after-logging-forward (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 LOG        all  --  any    any     anywhere             anywhere             limit: avg 3/min burst 10 LOG level warning prefix "[UFW BLOCK] "

Chain ufw-after-logging-input (1 references)
 pkts bytes target     prot opt in     out     source               destination         
26055 1221K LOG        all  --  any    any     anywhere             anywhere             limit: avg 3/min burst 10 LOG level warning prefix "[UFW BLOCK] "

Chain ufw-after-logging-output (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain ufw-after-output (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain ufw-before-forward (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     all  --  any    any     anywhere             anywhere             ctstate RELATED,ESTABLISHED
    0     0 ACCEPT     icmp --  any    any     anywhere             anywhere             icmp destination-unreachable
    0     0 ACCEPT     icmp --  any    any     anywhere             anywhere             icmp source-quench
    0     0 ACCEPT     icmp --  any    any     anywhere             anywhere             icmp time-exceeded
    0     0 ACCEPT     icmp --  any    any     anywhere             anywhere             icmp parameter-problem
    0     0 ACCEPT     icmp --  any    any     anywhere             anywhere             icmp echo-request
    0     0 ufw-user-forward  all  --  any    any     anywhere             anywhere            

Chain ufw-before-input (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     all  --  lo     any     anywhere             anywhere            
91131   11M ACCEPT     all  --  any    any     anywhere             anywhere             ctstate RELATED,ESTABLISHED
  259 12953 ufw-logging-deny  all  --  any    any     anywhere             anywhere             ctstate INVALID
  259 12953 DROP       all  --  any    any     anywhere             anywhere             ctstate INVALID
    0     0 ACCEPT     icmp --  any    any     anywhere             anywhere             icmp destination-unreachable
    0     0 ACCEPT     icmp --  any    any     anywhere             anywhere             icmp source-quench
    0     0 ACCEPT     icmp --  any    any     anywhere             anywhere             icmp time-exceeded
    0     0 ACCEPT     icmp --  any    any     anywhere             anywhere             icmp parameter-problem
  268 15308 ACCEPT     icmp --  any    any     anywhere             anywhere             icmp echo-request
    0     0 ACCEPT     udp  --  any    any     anywhere             anywhere             udp spt:bootps dpt:bootpc
45965 2305K ufw-not-local  all  --  any    any     anywhere             anywhere            
    0     0 ACCEPT     udp  --  any    any     anywhere             224.0.0.251          udp dpt:mdns
    0     0 ACCEPT     udp  --  any    any     anywhere             239.255.255.250      udp dpt:1900
45965 2305K ufw-user-input  all  --  any    any     anywhere             anywhere            

Chain ufw-before-logging-forward (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain ufw-before-logging-input (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain ufw-before-logging-output (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain ufw-before-output (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     all  --  any    lo      anywhere             anywhere            
 189K   32M ACCEPT     all  --  any    any     anywhere             anywhere             ctstate RELATED,ESTABLISHED
 1359  123K ufw-user-output  all  --  any    any     anywhere             anywhere            

Chain ufw-logging-allow (0 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 LOG        all  --  any    any     anywhere             anywhere             limit: avg 3/min burst 10 LOG level warning prefix "[UFW ALLOW] "

Chain ufw-logging-deny (2 references)
 pkts bytes target     prot opt in     out     source               destination         
  238 11693 RETURN     all  --  any    any     anywhere             anywhere             ctstate INVALID limit: avg 3/min burst 10
   10   600 LOG        all  --  any    any     anywhere             anywhere             limit: avg 3/min burst 10 LOG level warning prefix "[UFW BLOCK] "

Chain ufw-not-local (1 references)
 pkts bytes target     prot opt in     out     source               destination         
45965 2305K RETURN     all  --  any    any     anywhere             anywhere             ADDRTYPE match dst-type LOCAL
    0     0 RETURN     all  --  any    any     anywhere             anywhere             ADDRTYPE match dst-type MULTICAST
    0     0 RETURN     all  --  any    any     anywhere             anywhere             ADDRTYPE match dst-type BROADCAST
    0     0 ufw-logging-deny  all  --  any    any     anywhere             anywhere             limit: avg 3/min burst 10
    0     0 DROP       all  --  any    any     anywhere             anywhere            

Chain ufw-reject-forward (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain ufw-reject-input (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain ufw-reject-output (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain ufw-skip-to-policy-forward (0 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 DROP       all  --  any    any     anywhere             anywhere            

Chain ufw-skip-to-policy-input (7 references)
 pkts bytes target     prot opt in     out     source               destination         
   74  4530 DROP       all  --  any    any     anywhere             anywhere            

Chain ufw-skip-to-policy-output (0 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     all  --  any    any     anywhere             anywhere            

Chain ufw-track-forward (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain ufw-track-input (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain ufw-track-output (1 references)
 pkts bytes target     prot opt in     out     source               destination         
  659 76027 ACCEPT     tcp  --  any    any     anywhere             anywhere             ctstate NEW
   26  1761 ACCEPT     udp  --  any    any     anywhere             anywhere             ctstate NEW

Chain ufw-user-forward (1 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain ufw-user-input (1 references)
 pkts bytes target     prot opt in     out     source               destination         
12922  761K ACCEPT     tcp  --  any    any     anywhere             anywhere             tcp dpt:ssh
    1    57 ACCEPT     udp  --  any    any     anywhere             anywhere             udp dpt:ssh

Chain ufw-user-limit (0 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 LOG        all  --  any    any     anywhere             anywhere             limit: avg 3/min burst 5 LOG level warning prefix "[UFW LIMIT BLOCK] "
    0     0 REJECT     all  --  any    any     anywhere             anywhere             reject-with icmp-port-unreachable

Chain ufw-user-limit-accept (0 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     all  --  any    any     anywhere             anywhere            

Chain ufw-user-logging-forward (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain ufw-user-logging-input (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain ufw-user-logging-output (0 references)
 pkts bytes target     prot opt in     out     source               destination         

Chain ufw-user-output (1 references)
 pkts bytes target     prot opt in     out     source               destination
SYN

확실히 방화벽 문제입니다. SSH 서버가 응답하지만 TCP 포트 80에 연결할 수 없습니다.


업데이트 :

TCP 포트 80이 열리지 않습니다. 문제의 Linode 문서에는 그 문제에 대한 몇 가지 제안이 있습니다.

iptables -A INPUT -p tcp --dport 80 -m state --state NEW -j ACCEPT

또는 @Ollie_W가 지적했듯이 :

ufw allow 80/tcp

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

Ubuntu의 Apache : '서버가 응답하지 않습니다'

분류에서Dev

Apache 서버가 응답하지 않습니다

분류에서Dev

Apache2 서버 페이지가 응답하지 않음

분류에서Dev

apache2가 로컬 네트워크 외부의 요청에 응답하지 않습니다.

분류에서Dev

몇 번의 시도 후 SSE 서버가 응답하지 않습니다.

분류에서Dev

Xampp Apache 서버가 요청에 응답하지 않음

분류에서Dev

Android : Button의 OnClick 메서드가 응답하지 않습니다.

분류에서Dev

큰 폴더 복사. Ubuntu가 응답하지 않습니다!

분류에서Dev

큰 폴더 복사. Ubuntu가 응답하지 않습니다!

분류에서Dev

Ubuntu 18.04에 apache2를 설치하고 시작하고 로컬 호스트의 요청에 응답하지만 외부에서는 응답하지 않습니다.

분류에서Dev

버튼이 Ionic의 클릭에 응답하지 않습니다.

분류에서Dev

Jquery의 $ .each () 함수가 응답하지 않습니다.

분류에서Dev

Google Map의 DOM 이벤트가 응답하지 않습니다.

분류에서Dev

inotifywait가 / proc / mounts의 변경에 응답하지 않습니다.

분류에서Dev

UIScrollView의 일부가 터치에 응답하지 않습니다.

분류에서Dev

SetOnItemClickListener가 Android의 사용자 정의 ListView에서 응답하지 않습니다.

분류에서Dev

내 Windows 작업 스케줄러 내의 작업으로 인해 서버가 응답하지 않습니다.

분류에서Dev

Cygwin OpenSSH 서버가 PHP의 첫 번째 명령 후 응답하지 않습니다 (phpseclib 사용).

분류에서Dev

포트 전달 후 Apache가 포트 80에서 응답하지 않습니까?

분류에서Dev

CAS 서버가 응답을 반환하지 않았습니다.

분류에서Dev

WhoIs 서버가 응답하지 않습니다

분류에서Dev

Netty 서버가 응답하지 않습니다.

분류에서Dev

게임 서버가 핑에 응답하지 않습니다.

분류에서Dev

PHP가 Windows의 Apache 2에서 작동하지 않습니다.

분류에서Dev

"pyautogui"가 응답하지 않습니다

분류에서Dev

Eclipse가 응답하지 않습니다.

분류에서Dev

Div가 응답하지 않습니다.

분류에서Dev

Ubuntu는 동일한 인터페이스에서 응답하지 않습니다.

분류에서Dev

UIWebview의 하위보기가로드 요청에 응답하지 않습니다.

Related 관련 기사

  1. 1

    Ubuntu의 Apache : '서버가 응답하지 않습니다'

  2. 2

    Apache 서버가 응답하지 않습니다

  3. 3

    Apache2 서버 페이지가 응답하지 않음

  4. 4

    apache2가 로컬 네트워크 외부의 요청에 응답하지 않습니다.

  5. 5

    몇 번의 시도 후 SSE 서버가 응답하지 않습니다.

  6. 6

    Xampp Apache 서버가 요청에 응답하지 않음

  7. 7

    Android : Button의 OnClick 메서드가 응답하지 않습니다.

  8. 8

    큰 폴더 복사. Ubuntu가 응답하지 않습니다!

  9. 9

    큰 폴더 복사. Ubuntu가 응답하지 않습니다!

  10. 10

    Ubuntu 18.04에 apache2를 설치하고 시작하고 로컬 호스트의 요청에 응답하지만 외부에서는 응답하지 않습니다.

  11. 11

    버튼이 Ionic의 클릭에 응답하지 않습니다.

  12. 12

    Jquery의 $ .each () 함수가 응답하지 않습니다.

  13. 13

    Google Map의 DOM 이벤트가 응답하지 않습니다.

  14. 14

    inotifywait가 / proc / mounts의 변경에 응답하지 않습니다.

  15. 15

    UIScrollView의 일부가 터치에 응답하지 않습니다.

  16. 16

    SetOnItemClickListener가 Android의 사용자 정의 ListView에서 응답하지 않습니다.

  17. 17

    내 Windows 작업 스케줄러 내의 작업으로 인해 서버가 응답하지 않습니다.

  18. 18

    Cygwin OpenSSH 서버가 PHP의 첫 번째 명령 후 응답하지 않습니다 (phpseclib 사용).

  19. 19

    포트 전달 후 Apache가 포트 80에서 응답하지 않습니까?

  20. 20

    CAS 서버가 응답을 반환하지 않았습니다.

  21. 21

    WhoIs 서버가 응답하지 않습니다

  22. 22

    Netty 서버가 응답하지 않습니다.

  23. 23

    게임 서버가 핑에 응답하지 않습니다.

  24. 24

    PHP가 Windows의 Apache 2에서 작동하지 않습니다.

  25. 25

    "pyautogui"가 응답하지 않습니다

  26. 26

    Eclipse가 응답하지 않습니다.

  27. 27

    Div가 응답하지 않습니다.

  28. 28

    Ubuntu는 동일한 인터페이스에서 응답하지 않습니다.

  29. 29

    UIWebview의 하위보기가로드 요청에 응답하지 않습니다.

뜨겁다태그

보관