I'm trying to figure out why index.html is invisible from the outside of ec2 instance on AWS. Already verified that the server is running (netstat -lp) and curl gets a 404 error ( all the gory details are here)

Now the logs, access just shows the 404 error, fine


[06/Oct/2011:10:30:43 +0000] "GET / HTTP/1.1" 404 - "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.1 (KHTML, like Gecko)

Error long is a complete mystery though: /var/log/httpd/error_log:

[Thu Oct 06 03:36:08 2011] [notice] caught SIGTERM, shutting down
[Thu Oct 06 10:30:32 2011] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Oct 06 10:30:32 2011] [notice] Digest: generating secret for digest authentication ...
[Thu Oct 06 10:30:32 2011] [notice] Digest: done
[Thu Oct 06 10:30:32 2011] [notice] Apache/2.2.16 (Unix) DAV/2 configured -- resuming normal operations

PS: I don't see any vhost configured in the httpd.conf, the whole section at the bottom of the file is commented out :-(

  • I'm fairly sure those error_log messages are just from the httpd startup and are unrelated to your problem. I'm assuming from the file names that you have a virtual host configured. If so, can you add its config to your post, and check to see if the error log for the vhost is elsewhere. You should find the 404 in that. – SmallClanger Oct 6 '11 at 12:16
  • If virtual host has any settings they would be default one as I did not change anything there. I'll try to find the vhost related error log and will post the findings. – vector Oct 6 '11 at 12:46
  • ... no vhost configured :-( – vector Oct 7 '11 at 1:13

Your server is reponding with a 404 Not Found error. Check that your DocumentRoot is configured and that there is a directory containing an index file in it.

  • document root is set to /var/www/html and the html directory contains the index.html file – vector Oct 6 '11 at 12:44
  • Make sure /var, /var/www and /var/www/html are world readable. Make sure /var/www/html is world executable. Make sure /var/www/html/index.html is world readable. – David Schwartz Oct 6 '11 at 16:42
  • Incorrect permissions usually results in a 403 Forbidden doesn't it ? – user9517 Oct 6 '11 at 17:11
  • You've accepted @Iain's answer. Could you you let us know what you've discovered since your last comment? This will help other people who come across this question (and I'm kind of curious myself). – SmallClanger Oct 7 '11 at 14:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.