AWS EC2 ERR_CONNECTION_TIMED_OUT

时间:2017-12-28 07:06:29

标签: amazon-ec2 redhat

我的应用程序是使用AWS EC2实例中的redhat下的apache2和tomcat构建的。它之前有效,在我重新启动EC2实例后,只能访问思想ssh但无法在浏览器中连接,并显示“ERR_CONNECTION_TIMED_OUT'”。 知道我弄错了什么或我应该检查哪个日志?

@Dusan Bajic httpd状态似乎正常,执行sudo systemctl status httpd后显示:

● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2017-12-29 16:34:06 +08; 2s ago
     Docs: man:httpd(8)
           man:apachectl(8)
  Process: 10891 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=0/SUCCESS)
 Main PID: 10896 (httpd)
   Status: "Processing requests..."
   CGroup: /system.slice/httpd.service
           ├─10896 /usr/sbin/httpd -DFOREGROUND
           ├─10897 /usr/sbin/httpd -DFOREGROUND
           ├─10898 /usr/sbin/httpd -DFOREGROUND
           ├─10899 /usr/sbin/httpd -DFOREGROUND
           ├─10900 /usr/sbin/httpd -DFOREGROUND
           └─10901 /usr/sbin/httpd -DFOREGROUND

Dec 29 16:34:06 ip-172-31-21-170.ap-southeast-1.compute.internal systemd[1]: ...
Dec 29 16:34:06 ip-172-31-21-170.ap-southeast-1.compute.internal systemd[1]: ...
Hint: Some lines were ellipsized, use -l to show in full.

1 个答案:

答案 0 :(得分:0)

请检查以下内容:

  • 确保在浏览器中使用正确的公共IP地址或公共DNS(IPv4)。

  • 确保您在Apache配置文件中具有正确的配置,例如Listen IP:80和ServerName domain:80。

  • 确保apache正在侦听端口80。