Setting up and securing web server (+MySQL +Rails/PHP) on Ubuntu 10.04 LTS

After repeating these operations many times in various setups, I decided to create a public set of instructions and share them with the world. This should be suitable for most of the simple web sites, utilizing Ruby on Rails or PHP.

The setup works on Ubuntu 10.04 Server LTS (scheduled end of life April 2015). Other components of the setup are Nginx as the web server, Phusion Passenger as application server.

I’m using this setup most often on Linode VPS, however none of the instructions are Linode specific.

Continue reading “Setting up and securing web server (+MySQL +Rails/PHP) on Ubuntu 10.04 LTS”


Web hosting for internet startups

A lot of companies launching their own internet services have faced the same question – where to host. Over the course of the last few months I was asked for opinion on this matter several times. While I have no definitive answer, here are some recommendations.

Don’t start with maximum capacity, start small, and think about scalability – how fast you can do it, and how you will do it. Then map the plans to what your selected hosting provider offers. Avoid temptation to use your own hardware, unless you really have resources for administering and maintaining it and a real need to have physical access to the servers. Even companies using their own hardware use virtualization to run virtual machines on top of physical ones.

Two years ago, when we were just experimenting with ideas of the social training log, a shared hosting option on Dreamhost gave us the best prices/features/quality combination. When we launched first closed version of the service named Moozement at the time, we switched to Dreamhost VPS, which allowed enough flexibility and had reasonable pricing. For HeiaHeia (Moozement beta version) we’ve chosen Linode, as it offers Xen virtualization (as opposed to Dreamhost’s VServer), servers with up to 14400Mb of RAM, easy resizing, wide selection of Linux distributions, and several data centres to choose from, including one in London. As HeiaHeia grows, we are preparing for the next step, but for now Linode proved to be excellent choice.

If your company is based in EU, you also need to remember about EU Data Protection Directive – your servers need to be physically located in one of the European Union countries or in the US with a provider following Safe Harbor Principles.

If you have no clue about how much CPU/RAM/traffic your application will need – check reference cases – there are plenty on the internet. Here are just a couple of examples: social network Ravelry and Facebook app Friends for Sale.

Want second opinion? Check these:

  • Eivind Uggedal has a very thorough comparison of Slicehost, Linode, Prgmr, Rackspace and Amazon EC2 pricing and performance and arrives at a conclusion that Linode gives you best bang for the buck.

In case you decide to use Linode, use this referral link to give us some reward 🙂

If you’re planning to host a low traffic service, and don’t want to spend much time on system administration – Dreamhost is a great starting point. And as I already wrote earlier, Dreamhost provides excellent value for money. If you are looking for a good hosting – use IVANKUZNETSOV promocode and get a $50 discount when setting up an account on Dreamhost.