What kind of server should I build for a lightning fast dynamic website?

Posted September 9, 2015 7.5k views
NginxUbuntuServer OptimizationGetting StartedSecurityDigitalOcean ArticlesLEMPDeployment

I am kind of new to Sysadmin stuff and servers, however I have some experience. I’ve already suffessfully set up my own server at Linode. (Now I’m planning to move to Digital Ocean.)

On the other hand, I just used the guides that are on these sites. For example: how to setup a LEPM stack on Ubuntu, etc. I’ve did that successfully, but my main challange here is, that I don’t really know, how secure these installations are are what should I aim for if I want a server with the following specifics:

I will have a server with the following specifics:

2 CoreProcessor
40GBSSD Disk

I want to host about -34 websites from these. These sites are getting a relatively low amount of traffic: about 10k visitors / month for all of them. On the other hand I want the servers to be lightning fast (I guess Nginx can help me out here). I am going to use it for Affiliate Marketing stuff and speed is the king there.

So I basically want a very fast loading server. Where should I get started? It’s okay if I simply install LEMP stack on my server and run the sites from these? Do I need more configuration? Where can I get information about this? Are there any tutorials on this? Which peration system should I use?

Also, I couldn’t see any in depth security tutorials that make it clear step by step what to do in order to protect the server from incoming attacks. The basic guides are fine for security - that I can find on Digitalocean’s tutorials? Should I simply use cloudflare for security?

How should I get started to create this server or is there any guide to make it step by step?

Sorry if these are too newbie questions, I just want some resources that I can get started with.

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

@MrPeppah Thank you for your answer. I am going to use Laravel 5 and some custom basic PHP pages/applications.

Do you think a LEMP stack is enough? Any additional security or something that make things quicker?

  • Look up hardening your OS, make sure its up to date, make sure your code is sound. CloudFlare will help some. You want to look into flat database or mysql. Redis Caching will help.

    For my Wordpress server I have a few installs going on LEMP with a optimized Nginx config with plenty of memory running Redis and load times are within or lower than half a second load times.

What kind of websites are they? Are they using a framework or just custom php pages?

My suggestion is running a LEMP stack using Redis. DO has a few LEMP stack guides depending on your OS

Ah that sounds great! Thank you @MrPeppah for your help.

I’m planning to run updates every week and my code is working pretty great. Gonna use CloudFlare too then.

How did you optimize Nginx by the way? Also how much traffic you got on your droplet? (Also, what is your droplet size, if you can share this?)


One year ago I made the bet to run 4 websites on a 512Mb RAM droplet for just 5 bucks a month.

I’m using Nginx, PHP7, MySQL and Solr with dozens of thousands of documents, on an Ubuntu 14.04 x64 droplet with 2GB swap.

The main website run on Symfony 2.7, the visitor-tracking app run on Symfony 2.8, the other websites on a Silex home-made application.

The droplet now receives 500 to 1500 visitors a day.

I don’t even use APC or Varnish, and it’s still lightning fast and reliable!