Unable to find var/www/html

Posted January 9, 2016 15.7k views
UbuntuGetting StartedMEAN

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

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.

Submit an Answer
3 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.

Remember first install the apache sudo yum install httpd