Internal redirect to another domain with proxy_pass and Nginx

Let say we have multiple sites and and created some shared resourse (widget) under For simplicity just imagine Disqus where you need to embed comments widget (shared resourse) to every site, but don’t want to deal with AJAX “same origin policy” problems and Iframes ( actually sometimes Iframes are not so bad and could be used with care,  …

Continue reading  »

Use Nginx to proxy files from remote location using X-Accel-Redirect

Nginx supports X-Accel-Redirect for local files with no extra hassle, but what happens if you need to serve files located in some remote location like s3 and you don’t want to expose direct urls to the files? Sometimes you may want that to have control over stats or to keep an option to migrate to another file server without changing original urls.  …

Continue reading  »

Percona mysql install problem with Chef on Linode – be aware!


Fresh Linode instance of Ubuntu 12.04 LTS.

Super simple recipe ( stripped down for debugging ).

include_recipe "apt"
include_recipe "ohai"

include_recipe "mysql::percona_repo"
include_recipe "mysql::server"

I tested installation numerous times with the same OS version with Vagrant with no problems,  …

Continue reading  »

Provision and Bootstrap AWS instances with Chef

This is continuation of the previous post called Provision with Chef – baby steps. Today we going to talk about the process of bootstrapping instances with Chef used by FastCompany

At this point I assume that you already got chef repo setup and wondering how you could use it to configure your fresh instances.  …

Continue reading  »

Mastering chef-solo: deploy to target machines and automatic run on boot

This post will cover some basics behind chef-solo and the way I use it to configure machines.

With recent changes to attributes introduced in Chef 11 chef-solo became even more useful for small infrastructures and testing cookbooks with Vagrant.


As you probably already know chef can function in two modes:

  • chef client and server ( one server many clients ) –  …

Continue reading  »

Secure data bag items with chef solo

How to generate encrypted data bag item with knife and chef-solo

This post is mostly a memo to myself, because I often forget how to how to create encrypted data bag items..

Here is the deal. We know how to generate regular data bag items with knife: knife data bag create DATA_BAG_NAME DATA_BAG_ITEM ( for those who didn’t know ).  …

Continue reading  »

Provision with Chef – baby steps (installation and initial configuration)

In the previous post I wrote about our pre-chef approach for instance bootstrapping.

Today I will explain the process of our migration to Chef. I’m sure that could be useful for someone down the road, who’s trying to travel on similar route.  …

Continue reading  »