Nginx resolver explained
Nginx resolver is playing very important part in creating fault tolerant setups, especially when it comes to the free open source version. In this article I’ll explain why we need Nginx resolver and how it works.
I remember the moment about a year or so ago when I came to the office and found people screaming that one of our sites was hacked. …
405 not allowed Nginx fix for POST requests
Today I wanted to write a little useful tip for people trying to do POST requests to static files. Apparently Nginx returns 405 not allowed response in those cases.
Here are the couple workarounds to get you going again:
server { listen 80; ...
Secure way to serve protected files with Nginx Sendfile (X-Accel-Redirect)
If you are running some kind of e-commerce store, it’s quite possible that your product images are protected with watermark. At the same time original uploaded images are not available for public access.
All nice and good! But what if some of your partners request access to original images without watermarks? …
Docker + Hodor for simple and reliable dev setup
Prerequisites
Here is real world scenario: You have this project you are working on, it requires php 5.3 ( yeah, old I know 🙂 ) in fpm mode + xdebug + nginx and maybe something else (database?). You spent couple days configuring all that stuff on your workstation and everything works.. …
Build Zappos like faceted navigation with ElasticSearch
I’ve been looking at different facets implementations while working on REST Search API for my ecommerce store. Some of the solutions I saw were simple to achieve (like plain faceting by terms with single selection), while others required some thinking and some extra work.
Today we will talk about Zappos facets, …
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.
What
As you probably already know chef can function in two modes:
- chef client and server ( one server many clients ) – …
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 ). …
Problem with Drupal 6 CURL and Simpletest
When I had to switch from my usual Linux dev box to Mac 10.7 recently (because of Sandy hurricane), I noticed a problem with CURL when I was running my tests through command line.
Basically CURL was just returning output to STDOUT instead of passing it to a variable as it should because of RETURNTRANSFER option in the simpletest class. …
Moving single MySQL database to tmpfs
Recently I had a problem running Drupal Simpletest on my new i7 dev box. It took couple minutes to execute a set of relatively simple tests and as a developer you probably know how annoying that could be. The problem was largely due to InnoDB storage engine and it slowness caused by creating / removing tables (compared to let say MyISAM). …
How I solved MySQL I/O problems during cache purges in Drupal
Recently I’ve built pretty powerful workstation with I7 CPU and lots of RAM, but noticed very poor performance during devel/cache/clear operations in Drupal. In fact this operation was 5 times slower than on my 3yrs old dev box.
Initially I thought there was a problem with my hardrive (defected?). …