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が、そこのページにアクセスすることすらできません。

私のiptables:

[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 を使用していますか?

ローカルホストからの接続は機能していますか? たとえば:

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

または

nc -vz 127.0.0.1 80
nc -vz 127.0.0.1 443

関連情報