Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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:

home/logan/testtestesttest.html

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(0.0.0.0/0) and SSH open to my personal IP on port 22.

Thanks in advance,

-Logan

share|improve this question

2 Answers 2

up vote 2 down vote accepted

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.

share|improve this answer
    
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

share|improve this answer
    
haha why negative vote ? :)) –  golja Jul 3 '12 at 6:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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