For simple static sites is it enough to put an index.html in var/www/html?

Hi there, I’m trying to reacg my webserver from the browser. For this reason I created a very simple index.html in my #/var/www/html directoryjust to show if the server is reachable from a normal browser. Unfortunately it didn’t work. I’m running on Ubuntu 16.04.1 and the directory www/html have not been set up with the installation so I created them o my own.

Any ideas how to find my “web-root”?

Submit an answer

This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

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.

To reach your static content via browser, you must have installed Web Server. You have two choices - Apache or Nginx. For your static needs, chose whatever you want. Both will come to same, maybe Nginx uses less memory if that matters to you.

DigitalOcean has tutorial for both: How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 16.04. How To Install Linux, Nginx, MySQL, PHP (LEMP stack) in Ubuntu 16.04.

Chose one, set up it and you are ready to go!

Note that these tutorials covers PHP and MySQL too. If you don’t need them, feel free to skip it

In case you don’t want to set up it manually, DigitalOcean covered you with One-Click Apps which can set up LAMP or LEMP for you. Just to note, for this method you will have to rebuild droplet, and after it completes, put your files under /var/www/html again.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel