Skip to main content

Installing development version of nginx with Homebrew

I have been trying to install nginx v1.3.x on my Macbook Pro for a while now to test the native websockets support but I could not find a way to install version 1.3.

I had a look with brew info nginx and found a clue: a devel flag:

require 'formula'

class Nginx < Formula
    # Other code

    devel do
    url 'https://nginx.org/download/nginx-1.3.13.tar.gz'
    sha1 'b09b1c35b2b741292d41db1caa3b8a4123805a4c'
    end

    # Other code
end

I should really have found this earlier or tried to look harder, but it turns out homebrew has a --devel flag for the install command. This defines the devel variable and is caught by the if block above.

So simple really, but I googled to no avail, so hopefully this post will come up for anyone else who has this problem.