Unable to find var/www/html

January 9, 2016 3.5k views
Getting Started MEAN Ubuntu

Hello. Right now I have an Ubuntu MEAN 14.04 droplet, and I am trying to transfer an html file using SFTP via Filezilla.

I connect to my droplet on filezilla as a non-root user, and I am able to move into /var but var/www and var/www/html apparently do not exist.

How can I solve this so that I am able to transfer the HTML file to my website?

1 comment
  • Also, I accessed my droplet through putty and switched to the root user and still was unable to find var/www

2 Answers

If /var/www/html doesn't exist, then it is likely the case that your web server installation is not configured to use that directory as the web root. Take a look at your web server configuration files to see which directory is designated as the web root. Then move your HTML files there. Alternatively, if you really want /var/www/html as the web root, you can change the configuration. Just be aware that it will require particular permissions to work properly and securely.

  • what is the web server configuration, where?

    • That may vary with the operating system distribution. It seems to me that a directory under /etc is typical - at least I know that's where it is for Nginx on CentOS. Check the docs for your web server of choice - there may be a command line switch that will print all of the configuration options which would probably include the location of the config files. Otherwise, check the docs for your distribution and web server package, or maybe check your favorite search engine for what's typical.

Have another answer? Share your knowledge.