Connecting to Droplet vis FTP can't see the folders

October 11, 2016 57 views
Nginx Ubuntu 16.04


I'm able to connect to my domain via file zilla, but I can't see the website html files.

The folders don't seem to be there

I've looked in the var/html folder and that seems to be empty too.

and the /usr/share/nginx/html there is just the Index.html

The files were sent to me via a Droplet and I launched it on my new server droplet

The domain is up and running but I can't seem to access the files.

2 Answers

When you connect via SFTP to your droplet as the root user you will start out in /root/ and have to change up a directory .. to reach the drive's root /.

It sounds like this droplet was transferred to you as a snapshot (correct me if I mis-understand) so you were not the one to set it up. It also sounds like the configuration may not be using the standard Ubuntu directory for your web root (this would be /var/www/html for apache and /usr/share/nginx/html for nginx.

If your site is displaying properly we can check the configuration files to find out where your content is actually located on your droplet.

For Nginx, the configuration file we're looking for will be in /etc/nginx/sites-enabeld/. If you're only hosting a single site there should only be 1-2 files in there (there may be 2 if you have an http and https configuration). Open that file and look for a line like root /usr/share/nginx/html; The root directive will be the file path you're looking for.

If you are running Apache, these files can be found in /etc/apache/sites-enabled/. In this directory, again there should only be 1-2 files if you're only running a single site. Open the file(s) you see and look for DocumentRoot /var/www/html - The directory specified here will be where your files/app are located.

Thanks for the detailed reply,

You are correct in this droplet was transferred to me as a snapshot.

I found the path to the webapp from the /usr/share/nginx/html

Thank you.

Have another answer? Share your knowledge.