Static Website Hosting

September 3, 2016 364 views
DigitalOcean FAQ

What kind of setup do I need to serve some static websites made of html + css + javascript?

Do I need a LAMP/LEMP stack?

What would be the most minimalist setup?

2 Answers


LAMP and LEMP stand for "Linux, Apache, MySQL, and PHP" and "Linux, Nginx (pronounced engine-x), MySQL, and PHP" respectively. Apache and Nginx are webservers, while PHP is a server-side scripting language and MySQL is a database system.

Since you are hosting static files, you will only need a webserver. I would recommend going with Nginx, especially because the majority (or, to be exact, all) of your content is static.

After following the initial server setup tutorial, you can install nginx, configure it to serve your websites, and finally upload your files to your Droplet.

The whole thing is just a matter of configuring nginx correctly so it shouldn't take too long. Don't forget to add the necessary DNS records so that your websites' domains point to your Droplet.

Good luck and let me know how it goes!

by Etel Sverdlov
This article walks you through setting up the DNS for your site. The tutorial includes steps to set up an A records, point your nameservers, and provides some information about MX records.

You'll need to have either LAMP or LEMP stack on your droplet to host static websites. You may skip the PHP part though. But the better way to host static websites are with a CDN. It gives maximum speeds and optimization for your static website. Plus you don't have to deal with managing a server.

Have another answer? Share your knowledge.