NGX_VERSION=1.6.2 BUILD_DIR=nginx-$(NGX_VERSION) all: fetch build fetch: fetch_core fetch_dep fetch_core: # Downloading source wget http://nginx.org/download/nginx-$(NGX_VERSION).tar.gz # Downloading signature wget http://nginx.org/download/nginx-$(NGX_VERSION).tar.gz.asc # Getting public key gpg --recv-keys A1C052F8 # Verifying archiv gpg --verify nginx-$(NGX_VERSION).tar.gz.asc nginx-$(NGX_VERSION).tar.gz mkdir -p $(BUILD_DIR) tar xzf nginx-$(NGX_VERSION).tar.gz fetch_dep: cd $(BUILD_DIR) && git clone https://github.com/agentzh/headers-more-nginx-module.git cd $(BUILD_DIR) && git clone https://github.com/nbs-system/naxsi.git cd $(BUILD_DIR) && git clone https://github.com/FRiCKLE/ngx_cache_purge.git cd $(BUILD_DIR) && git clone https://github.com/simpl/ngx_devel_kit.git cd $(BUILD_DIR) && git clone https://github.com/agentzh/echo-nginx-module.git cd $(BUILD_DIR) && git clone https://github.com/chaoslawful/lua-nginx-module.git cd $(BUILD_DIR) && git clone https://github.com/wandenberg/nginx-push-stream-module.git cd $(BUILD_DIR) && git clone https://github.com/arut/nginx-rtmp-module.git cd $(BUILD_DIR) && git clone https://github.com/masterzen/nginx-upload-progress-module.git cd $(BUILD_DIR) && git clone https://github.com/gnosek/nginx-upstream-fair.git cd $(BUILD_DIR) && git clone https://github.com/aperezdc/ngx-fancyindex.git cd $(BUILD_DIR) && git clone https://github.com/tony2001/ngx_http_pinba_module.git cd $(BUILD_DIR) && git clone https://github.com/yaoweibin/ngx_http_substitutions_filter_module.git cd $(BUILD_DIR) && git clone https://github.com/pagespeed/ngx_pagespeed.git cd $(BUILD_DIR) && git clone https://github.com/alibaba/nginx-http-concat/ cd $(BUILD_DIR) && git clone https://github.com/zebrafishlabs/nginx-statsd mkdir $(BUILD_DIR)/nginx-syslog && wget -O $(BUILD_DIR)/nginx-syslog/config https://raw.githubusercontent.com/gplessis/dotdeb-nginx/wheezy/debian/modules/nginx-syslog/config build: cd $(BUILD_DIR) && ./configure \ --prefix=/etc/nginx \ --sbin-path=/usr/sbin \ --conf-path=/etc/nginx/nginx.conf \ --pid-path=/var/run/nginx.pid \ --error-log-path=/var/log/nginx/error.log \ --http-log-path=/var/log/nginx/access.log \ --user=www-data \ --group=www-data \ --with-pcre-jit \ --with-http_ssl_module \ --with-http_stub_status_module \ --with-http_realip_module \ --with-http_auth_request_module \ --with-http_gzip_static_module \ --with-http_mp4_module \ --with-http_secure_link_module \ --with-http_spdy_module \ --with-http_sub_module \ --with-http_addition_module \ --with-google_perftools_module \ --with-http_gunzip_module \ --add-module=headers-more-nginx-module \ --add-module=naxsi/naxsi_src \ --add-module=ngx_cache_purge \ --add-module=ngx_devel_kit \ --add-module=echo-nginx-module \ --add-module=lua-nginx-module \ --add-module=nginx-push-stream-module \ --add-module=nginx-rtmp-module \ --add-module=nginx-syslog \ --add-module=nginx-upload-progress-module \ --add-module=nginx-upstream-fair \ --add-module=ngx-fancyindex \ --add-module=ngx_http_pinba_module \ --add-module=ngx_http_substitutions_filter_module \ --add-module=./ngx_pagespeed \ --add-module=./nginx-http-concat \ --add-module=./nginx-statsd cd $(BUILD_DIR)/auto && make clean: rm nginx-$(NGX_VERSION).tar.gz rm nginx-$(NGX_VERSION).tar.gz.asc