简体   繁体   English

EC2上的WebServer返回503/404 /无

[英]WebServer on EC2 returns 503/404/nothing

I have a Linux EC2 instance. 我有一个Linux EC2实例。 Apache in installed and up, so when I'm ssh'ed to my instance and do Apache已安装并启动,因此当我切换到实例并执行时

curl localhost

I see a webpage served by my Apache. 我看到了我的Apache服务的网页。 But when I try to access this page by URL (like http://ec2-xx-xx-xx-xx.eu-west-1.compute.amazonaws.com ) I get back only 503 error page on one Internet connection, 404 error page on other connection. 但是,当我尝试通过URL(例如http://ec2-xx-xx-xx-xx.eu-west-1.compute.amazonaws.com )访问此页面时,在一个Internet连接上我仅获得503错误页面,其他连接上的404错误页面。 access_log and error_log show no activity when I try to access the server by URL. 当我尝试通过URL访问服务器时,access_log和error_log没有显示任何活动。 I'm stuck. 我被卡住了。 Please give me some tips how to solve this issue. 请给我一些技巧来解决这个问题。

I guess missing logs on local hint us that http error messages returned by amazonaws.com itself not from your Apache server. 我猜本地缺少日志提示我们amazonaws.com本身返回的HTTP错误消息不是来自您的Apache服务器。 Did you set the security for port TCP 80? 您是否设置了端口TCP 80的安全性? ssh port is open as default but I am not sure for port 80 ssh端口默认打开,但我不确定端口80

I fixed this by turning iptables off. 我通过关闭iptables来解决此问题。 So firewall was the problem. 所以防火墙就是问题所在。 Thank you guys for help. 谢谢你们的帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM