1

I have a Linux EC2 instance. Apache in installed and up, so when I'm ssh'ed to my instance and do

curl localhost

I see a webpage served by my 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. access_log and error_log show no activity when I try to access the server by URL. I'm stuck. Please give me some tips how to solve this issue.

Tomasz Jureczko
  • 167
  • 3
  • 10

2 Answers2

1

I guess missing logs on local hint us that http error messages returned by amazonaws.com itself not from your Apache server. Did you set the security for port TCP 80? ssh port is open as default but I am not sure for port 80

tartar
  • 688
  • 4
  • 16
  • Yes, I created security group allowing all traffic on port 80. – Tomasz Jureczko Mar 27 '12 at 15:03
  • I believe you have already tried http://xxx-xxx-xxx-xxx:80 to check if you can directly access to the web server. – tartar Mar 27 '12 at 15:05
  • Yes, I got server IP from ifconfig and tried it, results are the same. – Tomasz Jureczko Mar 27 '12 at 15:10
  • I had a similar problem with a non-web application. Although I set the security group on a particular TCP port, I could not access it. The way I have solved the problem, (not really best and wisest one) using iptables for port forwarding. Check the link for something similar here [link](http://www.webhostingtalk.com/showthread.php?t=992107) Another option is making your apache server log level verbose. Another one is to make sure your apache server settings let everyone to access. – tartar Mar 27 '12 at 15:17
  • Make sure the instance you created is actually part of the security group. – bwight Mar 27 '12 at 19:18
  • could you telnet to this port? telnet IP:80. Then, you can just put your get /index.html request there. – tartar Mar 27 '12 at 21:33
0

I fixed this by turning iptables off. So firewall was the problem. Thank you guys for help.

Tomasz Jureczko
  • 167
  • 3
  • 10