Unable to see var/www/html via SFTP

Hey guys, I created a Ubuntu 14.04 droplet with LAMP. I am able to see the Apache2 Ubuntu page when navigating to the public IP address in browser. However I am unable to see var/www/html via SFTP or even though SSH, hidden or not. Futhermore if I create those folders and dump and index.html file in, it doesn’t load said index.html it still loads the Apache2 Ubuntu page.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I think I may know what problem you are encountering. When you log in as root via ssh or sftp you start out in the /root directory. Since your web root is /var/www/html you would first need to move up a directory cd .. in an ssh session or by clicking the .. option in most SFTP clients. This will bring you to / and from there you should see the /var/www/html directory structure.

When you log in you are going to your home folder of the user ~

Do the following

cd /
cd /var/www/