Deploy a LAMP server in a few minutes with Digital Ocean

Recently I was shopping around for a hosting service for a new project I am working on. The key thing I was looking for was simplicity, economy and decent features, I didn’t want to spend a lot of money but did’t want to be limited either. 
cpanel I am no stranger to share web hosting, I have been using one for several years now, regular setup, you get access to a Cpanel and you can manage everything from there, it supports PHP and you can make do if your website or application is simple enough and you are not using any fancy new frameworks. I was leaning towards this option since the service I use is based on my home country which means that I can take advantage of the currency exchange and it ends up been really cheap.

The thing is that I wanted to used Laravel 5 (PHP framework) so I started doing some research on how to deploy an laravel application on shared hosting, it seemed really simple, just copy your project’s public folder to the public_html and modify two lines of code in the index.php. “Looks simple, I’ll do that”, I said to myself, so I tried it and it turns out that the server has an outdated version of PHP and Laravel 5 requires  5.5.9 or greater. For the record I did ask the system admin to see if they were willing to upgrade the PHP version but answer was no. Ok so that won’t work.

But what if I not only wanted to use the latest PHP framework but I wanted to deploy a ruby on rails application or a Node.js API, shared web hosting simply wont solve any of that.

digitalOceanWhat I ended up doing is deploying a cloud server (or Droplet as they call them) on Digital Ocean  and in a few minutes I had a running instance of Ubuntu Server 14.04 with a LAMP stack pre installed. So with this setup I get the everything that the shared hosting offers and so much more. For instance if you configure virtual hosts you can use your instance to serve multiple domains. In addition, you get full access to the server and you can do pretty much everything you want including installing Node.js and Ruby. So you could host several application in the same instance, given that they are simple and not very demanding, but for a developer like myself who wants to host his projects all in one place this is perfect.

So if you are looking for full flexibility to host your apps this a great option, of course you will need to have some knowledge of how to deal with servers but Digital Ocean provides really good tutorial for pretty much anything you might need to do.

I’ll leave you with some useful tutorial if you decide to go with this aproach:

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>