Apache가 실행 중이지만 사이트가 로드되지 않음

Apache가 실행 중이지만 사이트가 로드되지 않음

Apache가 내 서버에서 제대로 실행되고 있습니다. 서버 주소에 대해 ping을 수행하면 다음 메시지만 표시됩니다.

PING 45.56.87.123 (45.56.87.123) 56(84) bytes of data

내 사이트 중 어떤 것도 로드되지 않습니다. 뭔가 더미가 있는데 http://45.56.87.123/test/index.html거기 페이지에 액세스할 수도 없습니다.

내 IP테이블:

[root@localhost test]# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:http
ACCEPT     all  --  anywhere             anywhere            
REJECT     all  --  anywhere             loopback/8           reject-with icmp-port-unreachable
ACCEPT     all  --  anywhere             anywhere             state RELATED,ESTABLISHED
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:http
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:https
ACCEPT     tcp  --  anywhere             anywhere             state NEW tcp dpt:ssh
ACCEPT     icmp --  anywhere             anywhere            
LOG        all  --  anywhere             anywhere             limit: avg 5/min burst 5 LOG level debug prefix "iptables denied: "
DROP       all  --  anywhere             anywhere            

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
DROP       all  --  anywhere             anywhere            

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere      

서버를 제대로 실행하는 방법에 대한 도움이 필요합니까?

답변1

댓글을 추가할 수 없기 때문에(낮은 평판) 답변을 붙여넣어 보겠습니다. 기본적으로 서버 연결 시간이 초과되었습니다.

$ nc -vz 45.56.87.123 443
nc: connect to 45.56.87.123 port 443 (tcp) failed: Connection timed out

$ nc -vz 45.56.87.123 80
nc: connect to 45.56.87.123 port 80 (tcp) failed: Connection timed ou

위에 표시된 규칙 에서 iptables잘못된 점을 발견하지 못했으므로 먼저 서비스가 해당 포트에서 수신 대기하고 있는지 확인해 보세요.

lsof -i :80
lsof -i :443

그렇지 않다면 문제가 있는 것입니다. 그렇다면 방화벽 문제가 남아 있으므로 다시 시작해 보세요 iptables. 또한 어떤 OS를 사용하고 있습니까?

localhost로부터의 연결이 작동하고 있나요? 좋다:

curl http://45.56.87.123/test/index.html

또는

nc -vz 127.0.0.1 80
nc -vz 127.0.0.1 443

관련 정보