Serving an HTML website using a Digital Ocean droplet

Posted December 5, 2019 4.7k views
DigitalOceanUbuntu 18.04

I have followed this step by step guide from 2016 to set up my droplet and domain.

how can i simply start a HTML page and start my own page and i want to know how to edit it later

Unfortunately, I cannot reach my website using the browser.

I have followed all the steps above and my domain (from GoDaddy) is pointing to my Digital Ocean droplet (Ubuntu 18.04.3 (LTS) x64). For the domain configuration, I have followed this explanation.

The only thing I have done different is this:

  • I had to create this route /var/www/html manually though. It was not in the droplet when I accessed it.

I was wondering if I am missing anything and if the post above is still accurate after three years. Also, would you recommend anyway to troubleshoot this? Any help would be really appreciated.

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
2 answers

Thanks so much for your detailed answer @bobbyiliev .

I finally figured it out and solved it.

For future reference:

First, and after creating the droplet, I configured the server:

Initial Server Setup with Ubuntu 18.04

Then, I installed Nginx instead of apace, following this guide:

How To Install Nginx on Ubuntu 18.04

Only after that, I followed the steps detailed in this post:

how can i simply start a HTML page and start my own page and i want to know how to edit it later

by Justin Ellingwood
by Kathleen Juell
Nginx is one of the most popular web servers in the world and is responsible for hosting some of the largest and highest-traffic sites on the internet. It is more resource-friendly than Apache in most cases and can be used as a web server or reverse proxy. In this guide, we'll discuss how to get Nginx installed on your Ubuntu 18.04 server.


You would need to make sure that you have a web server like Apache or Nginx installed.

For example if you decide to go with Apache, you could install it with the following command:

  • sudo apt install apache2

Then once Apache has been installed make sure that it is enabled so that if your Droplet gets rebooted Apache would start on boot:

systemctl enable apache2

Also make sure that Apache is started:

systemctl start apache2

Once you have Apache up and running, then you could go ahead and upload your website to the /var/www/html folder as you mentioned.

Another thing that you need to keep in mind is that your domain name’s A record needs to be pointing to your Droplet’s IP address. And also after each DNS change, it might take up to 48 hours for the DNS cache to clear over the Globe before you could see the changes.

Let me know if anything is unclear.