Skip to content

Commit

Permalink
Add headers more module (#4)
Browse files Browse the repository at this point in the history
* add headers more module

* Make on two cores
  • Loading branch information
beanieboi authored Sep 19, 2018
1 parent cf95294 commit 3b56f74
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Added
- add nginx solo support, see [sample config for nginx solo mode](config/nginx-solo-sample.conf.erb) and [README](README.md)
- add headers-more module from https://github.com/openresty/headers-more-nginx-module

### Changed
- updated build scripts to compile on 2 cores (-j 2)

## [0.8] - 2018-09-13
### Changed
Expand Down
Binary file modified bin/nginx-cedar-14
Binary file not shown.
Binary file modified bin/nginx-heroku-16
Binary file not shown.
Binary file modified bin/nginx-heroku-18
Binary file not shown.
8 changes: 7 additions & 1 deletion scripts/build_nginx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@
NGINX_VERSION=${NGINX_VERSION-1.15.3}
PCRE_VERSION=${PCRE_VERSION-8.42}
ZLIB_VERSION=${ZLIB_VERSION-1.2.11}
HEADERS_MORE_VERSION=${HEADERS_MORE_VERSION-0.33}

nginx_tarball_url=http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz
pcre_tarball_url=ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-${PCRE_VERSION}.tar.gz
zlib_url=http://zlib.net/zlib-${ZLIB_VERSION}.tar.gz
headers_more_nginx_module_url=https://github.com/openresty/headers-more-nginx-module/archive/v${HEADERS_MORE_VERSION}.tar.gz

temp_dir=$(mktemp -d /tmp/nginx.XXXXXXXXXX)

Expand All @@ -34,6 +36,9 @@ echo "Downloading $pcre_tarball_url"
echo "Downloading $zlib_url"
(cd nginx-${NGINX_VERSION} && curl -L $zlib_url | tar xvz )

echo "Downloading $headers_more_nginx_module_url"
(cd nginx-${NGINX_VERSION} && curl -L $headers_more_nginx_module_url | tar xvz )

(
cd nginx-${NGINX_VERSION}
./configure \
Expand All @@ -46,9 +51,10 @@ echo "Downloading $zlib_url"
--with-http_v2_module \
--with-file-aio \
--with-http_realip_module \
--add-module=${temp_dir}/nginx-${NGINX_VERSION}/headers-more-nginx-module-${HEADERS_MORE_VERSION}
--with-cc-opt='-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2' \
--with-ld-opt='-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--as-needed'
make install
make -j 2 install
)

cp /tmp/nginx/sbin/nginx $1

0 comments on commit 3b56f74

Please sign in to comment.