Question

Serving an HTML website using a Digital Ocean droplet

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 Url: https://www.digitalocean.com/community/questions/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.

Show comments

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.

Accepted Answer

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 Url: https://www.digitalocean.com/community/tutorials/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 Url: https://www.digitalocean.com/community/tutorials/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 Url: https://www.digitalocean.com/community/questions/how-can-i-simply-start-a-html-page-and-start-my-own-page-and-i-want-to-know-how-to-edit-it-later

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hello,

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:

  1. 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.

Regards, Bobby