I recently decided to switch hosting to a Digital Ocean droplet for all my sites. Partly as an interesting exercise, partly to reduce costs, and partly to give me the flexibility to run plain ‘ole HTML, PHP and NodeJS sites all from a single place.
There is a little context here. I am an IT professional, started out looking after Sun SparcStations, IBM RS6000’s, expanded into DEC (remember those?) and Windows NT server machines. My early home websites ran from a box in the attic running Linux.
Over time, I migrated to a relatively cheap hosting plan, dipped my toes in the water of dedicated servers and eventually went back to cheap hosting plans.
My environment was limited and I regular do development work now on NodeJS, but also run a WordPress blog (this one) that requires a LAMP stack, so PHP is required too.
After lots of reading and research, I decided on a Digital Ocean droplet, running Linux. The front end web server is Nginx, and behind that, are a number of different sites, some that are just serving up static HTML, some are PHP running on localhost port numbers and I now have the ability to add some NodeJS sites, again running on localhost port numbers, with Nginx managing the web site hostnames and connecting through to the relevant back end web server as appropriate.
In addition to that, I wanted to add HTTPS support and my hosting company was charging a premium for that. In the end, I decided to use with a Let’s Encrypt certificate mechanism for all the sites.
Digital Ocean documentation was excellent. There were some areas where I needed a slightly different configuration, and StackOverflow was, as always, a gold mine of information.
Would I recommend doing this to others? If you are a techy, of any skill level, it is definitely worth a go.
Some of the resources I used for setting this up:
- Initial Server Setup with Ubuntu 16.04
- How To Install Nginx on Ubuntu 16.04
- How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 16.04
- How To Set Up a Node.js Application for Production on Ubuntu 16.04
- How To Install WordPress with LAMP on Ubuntu 16.04
- How to Point to DigitalOcean Nameservers From Common Domain Registrars
- How To Secure Nginx with Let’s Encrypt on Ubuntu 16.04