best setup for static sites?

July 1, 2013 11.4k views
Hi, what would I need to install to setup a static site on Digital Ocean? just with html pages and a css file?
7 Answers

I answered this question here:

Basically just sudo apt-get install apache2 and replace the index.html file at /var/www/html with the html you want to serve. That's it!


If I remember correctly, on Amazon, you can also host static files on CloudFront @ cheaper rates than on S3.

RE: uploading files to your DO droplet, you can use VSFTP, SCP, Rsync, etc. It all depends on where the files are being uploaded from, among other considerations (such as security).
nginx would be the best webserver for static files:
by Etel Sverdlov
This tutorial explains how to install nginx, how to start nginx, and how to confirm that nginx is running on your server. nginx is a high performance web server software. This tutorial is written for Ubuntu 12.04
Would you know what else I'd need. Amazon has a detailed tutorial about how to host a static site in an S3 bucket, which is obviously not available on DO. I like Digital Ocean, but without further instructions I might take it Amazon. Maybe this is an article someone could write up and submit to DO. I hear they pay $50 for each published article.

Why not follow the Amazon tutorial and apply it to DO? I do that all the time w/tutorials from Linode.
@Pablo, thanks, that's what I wanted to do, but I assumed there was something special about S3 buckets (which is what hosts static sites on Amazon), such that I couldn't apply that tutorial to DO.

I guess I'm wrong then? The thing is I think it's easy to get a file into an S3 bucket but I'm not sure how to do it on DO without using a Ruby deployment script and my static site won't have ruby...
I'd pick your favourite distribution and put nginx on there. Then SFTP the files up to the directory. By default nginx files go in /usr/share/nginx/html/
Have another answer? Share your knowledge.