I'm trying to get my feet wet with amazon web services and have SSH my instance and created a user, named logan, with admin rights. I then connected to the EC2 instance with the username and password I had created for the account using Cyberduck and uploaded a plain HTML file to make sure I had things working.

For some reason I cannot connect through my browser to:


I get a 404 page not found error.

I know that Apache was successfully installed though because if I type the elastic IP address in my address bar without any location afterword I get the "It works!" default page.

As far as the security groups for the instance go, I have HTTP open on port 80 to all IP addresses( and SSH open to my personal IP on port 22.

Thanks in advance,



Did you put the file in /var/www/html/? That's where HTML files go by default.

You can run apache2ctl -S to get some output of Apache's configuration and grep -r DocumentRoot /etc/apache2/ to find out where all the files are served from.

  • ok, I grep'd it and it appears that the document root is in /var/www. I can edit the index.html (what shows up when the elastic ip address is entered) but I can't upload any other files and successfully goto their location with my browser. any ideas? – Logan Besecker Jul 3 '12 at 6:50
  • Did you get a "permission denied" error when trying to do the upload? If so, upload them to your home directory and then do a sudo mv <filename> /var/www/. If it's something else, let us know the error message. – Ladadadada Jul 3 '12 at 8:05

I think you need to check the apache config file and find out where exactly is the default DocumentRoot. Some distros default is /var/www/localhost

  • haha why negative vote ? :)) – golja Jul 3 '12 at 6:41

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.