Skip to content

Instantly share code, notes, and snippets.

@orip
Last active December 18, 2015 16:09
Show Gist options
  • Select an option

  • Save orip/5809259 to your computer and use it in GitHub Desktop.

Select an option

Save orip/5809259 to your computer and use it in GitHub Desktop.
UPDATE: a much-improved version is now in the nginx-buildpack repository. Building nginx with rewrite_module for use in heroku buildpacks.
#!/bin/bash
# An improved version is now in the nginx-buildpack repository:
# https://github.com/ryandotsmith/nginx-buildpack/blob/17b290ed880a182ef27f438eab3070f081c0ee0e/scripts/build_nginx.sh
#
# Building nginx with rewrite_module for use in heroku buildpacks - specifically in @ryandotsmith's https://github.com/ryandotsmith/nginx-buildpack.
# Uses heroku's vulcan for building (`gem install vulcan`).
# Can be used as a template for any kind of compile-time configuration of nginx.
cd $(mktemp -d /tmp/vulcan_nginx.XXXXXXXXXX)
echo $PWD
curl http://nginx.org/download/nginx-1.4.1.tar.gz | tar zxf -
(cd nginx-1.4.1 && curl ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.21.tar.bz2 | tar jxf -)
vulcan build -s nginx-1.4.1 -v -p /tmp/nginx -c './configure --with-pcre=pcre-8.21 --prefix=/tmp/nginx && make install'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment