Unable to see var/www/html via SFTP

September 8, 2015 1.1k views
Apache LAMP Stack DigitalOcean Ubuntu

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.

2 Answers

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/
Have another answer? Share your knowledge.