Varnish as reverse proxy with nginx as web server and SSL terminator

Published on Tue, 2012-07-24 - 21:37

Or, if you like, the nginx-Varnish-nginx sandwich.


This is, admittedly, a bit unorthodox. But here’s my rationale:

Since time immemorial (ie. more than a couple of years of Internet time), we at Reveal IT have been deploying Varnish in front of the web sites we build for our customers, with the dual purpose of a faster (and thus better) user experience and conservation of server resources.

In our previous Varnish setups, only standard HTTP would be passed through Varnish,…


Deploying LedgerSMB with nginx and Plack on FreeBSD

Published on Thu, 2012-04-05 - 19:59

I have recently been looking at LedgerSMB for Drupal Danmark’s accounting needs, but I’ve struggled getting it set up, since it is a classic CGI app, which is not something we usually run on our servers, especiallty since we use nginx on our servers, at it does not support classic CGI. It does support FastCGI, so we need some sort of wrapper around LedgerSMB to get it running.

Fortunately, the wonderful Perl commnuty has a solution for that,…

Trouble in Node.js paradise: The mess that is npm

Published on Tue, 2011-12-20 - 01:41

The preface

Let me begin by stating that I love building web apps with Node.js, and I think it's one of the greatest things that's happened in the web app space this decade. I have been using Node.js for various small projects the last nine months, so I think I have a reasonable grasp of the subject matter.

The mess

One of the most exiting things about Node.js is the intense vibrance of the community of developers around it…


Shave a couple of stubborn of DIV-wrappers off your Drupal site

Published on Thu, 2011-10-20 - 17:27

One of the more annoying things about theming Drupal sites is having to wade through the staggering amounts of wrapping <div> elements and containers. Some of these are are fairly easy to get rid of. Others require you to override core templates.

I recently found a clean way to get rid of a couple of those. These two were introduced in Drupal 7, and you will probably find them on almost all Drupal 7 sites – they look like this:…


Using Database-level Foreign Keys in Drupal 7

Published on Thu, 2011-10-06 - 16:05

If you use a good database system, foreign keys is an actual concept on the server that is used to enforce data integrity.

With database-level foreign keys, it becomes impossible to break your data by deleting data referenced by other data, without also dealing with the referenced data.

In practice this means that deleting a node from the database could be as simple as DELETE FROM node WHERE nid = 53 CASCADE, and conversely it would not be…

How to install multicore Apache Solr on FreeBSD with Jetty

Published on Sun, 2011-07-24 - 00:51

If you use Apache Solr with your Drupal site, you have probably come across the need to have more than one Solr instance. You may have multiple sites, or just multiple copies of the same site, production and staging perhaps?

There are two widely published ways to accomplish that. One is to set up completely separate Solr instances with whatever Java-server you’re using. That is somewhat inefficient, and I was unable to get such a setup working properly anyways. So…

Run VirtualBox virtual machines on boot in Mac OS X

To celebrate the launch of VirtualBox 4.0, I’d like to share a simple trick for making your virtual machines start automatically when your computer boots.

I have a Mac mini server that has a couple of virtual machines running. Until recently, I used VMWare Fusion with a wonky setup with a user that autologins and has VMWare Fusion as a login item, but that has proven to be cumbersome and error-prone, and since both of those virtual machines are servers,…

Anonymous (not verified) Thu, 2010-12-23 - 16:51
Tags – can the Drupal community do better?

Published on Mon, 2010-12-20 - 11:51

As you may know, Yahoo! is in trouble, and has decided to jettison the social bookmarking service (Delicious).

I am not a big delicious user anymore (actually, I deleted my account when Microsoft was trying to purchase Yahoo!), but this recent closing made me wonder if the Drupal community couldn’t do better...

One of the great strengths of Drupal is self-hosting, and a bookmarking service is not a complicated thing.

Thus, I am planning to put in a bit…


35% response time improvement from switching to uWSGI/nginx

Published on Fri, 2010-10-22 - 12:11

As part of refreshing the Reveal IT website, I have moved it from mod_wsgi running on Apache HTTPD to uWSGI running on nginx, mainly because my previous setup had both Django and Drupal sites running on the same Apache server.

Due to some of the shortcomings of PHP, the only recommended way to run mod_php on Apache is via the prefork MPM, which carries a high memory usage penalty per process. My Apache processes hover around 100MB…


Postbox botches upgrade policy, censors customer complaints

Published on Fri, 2010-10-08 - 17:27

Postbox is a commercial e-mail client, based on Mozilla Thunderbird. Is is mostly a layer of polish and OS integration on top of a popular open source project.

Postbox 2.0 was recently released, and the company behind it, Postbox Inc., decided to offer a very short upgrade window for customers that recently purchased a license, just 31 days. The 2.0 version had been announced much earlier, and many, myself included decided o purchase a license on the promise…