All Projects → cubicdaiya → Nginx Build

cubicdaiya / Nginx Build

Licence: mit
Seamless nginx builder

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Nginx Build

Nginx Builder
A tool to build deb or rpm package of required Nginx version from the source code, with the ability to connect third-party modules. Nginx parameters are set in the yaml configuration file.
Stars: ✭ 123 (-65.06%)
Mutual labels:  build-tool, nginx
Wordpressify
🎈 A build system designed to automate your WordPress development workflow.
Stars: ✭ 1,374 (+290.34%)
Mutual labels:  build-tool, nginx
Snack
Nix-based incremental build tool for Haskell projects
Stars: ✭ 317 (-9.94%)
Mutual labels:  build-tool
Studynotes
📚JAVA、Spring、SpringMVC、SpringBoot、Mybatis、Vue、MySQL、MongoDB、Radis、Docker、Nginx、......笔记
Stars: ✭ 337 (-4.26%)
Mutual labels:  nginx
Apioak
Full Lifecycle Management API Gateway.
Stars: ✭ 335 (-4.83%)
Mutual labels:  nginx
Reading
整理阅读过的干货文章, 帖子
Stars: ✭ 318 (-9.66%)
Mutual labels:  nginx
Xmake
🔥 A cross-platform build utility based on Lua
Stars: ✭ 4,229 (+1101.42%)
Mutual labels:  build-tool
Docker Lnmp
😒 Deploy lnmp(Linux, Nginx, MySQL, PHP7) using docker.
Stars: ✭ 310 (-11.93%)
Mutual labels:  nginx
Nginx Opentracing
NGINX plugin for OpenTracing
Stars: ✭ 341 (-3.12%)
Mutual labels:  nginx
Node Build Monitor
A Build Monitor written in Node.js, which supports several build services and can be easily extended.
Stars: ✭ 336 (-4.55%)
Mutual labels:  build-tool
Server Error Pages
Easy to use, professional error pages to replace the plaintext error pages that come with any server software like Nginx or Apache
Stars: ✭ 338 (-3.98%)
Mutual labels:  nginx
Wordpress Nginx
WordPress specific Nginx configuration templates and best practices!
Stars: ✭ 332 (-5.68%)
Mutual labels:  nginx
Docker Nginx
Nginx Docker image for easy hosting of static sites
Stars: ✭ 324 (-7.95%)
Mutual labels:  nginx
Proxygateway
Proxy Gateway基于openresty(nginx lua module)开发,可以作为接口网关(api gateway)使用,整合业务模块接口,微服务治理聚合,通过web配置界面,能够轻松进行代理配置管理,支持负载均衡,服务器状态检测等
Stars: ✭ 335 (-4.83%)
Mutual labels:  nginx
Config
Armbian configuration utility
Stars: ✭ 317 (-9.94%)
Mutual labels:  nginx
Ui5 Tooling
An open and modular toolchain to develop state of the art applications based on the UI5 framework
Stars: ✭ 339 (-3.69%)
Mutual labels:  build-tool
Slickstack
SlickStack is a free LEMP stack automation script written in Bash designed to enhance and simplify WordPress provisioning, performance, and security.
Stars: ✭ 311 (-11.65%)
Mutual labels:  nginx
Devilbox
A modern Docker LAMP stack and MEAN stack for local development
Stars: ✭ 3,598 (+922.16%)
Mutual labels:  nginx
Docker Django Nginx Uwsgi Postgres Tutorial
Docker + Django + Nginx + uWSGI + Postgres 基本教學 - 從無到有 ( Docker + Django + Nginx + uWSGI + Postgres Tutorial )
Stars: ✭ 334 (-5.11%)
Mutual labels:  nginx
Hi Nginx
A fast and robust web server and application server for C++,Python,Lua ,Java,quickjs language
Stars: ✭ 346 (-1.7%)
Mutual labels:  nginx

nginx-build

Build Status

nginx-build - provides a command to build nginx seamlessly.

gif

Requirements

  • git and hg for downloading 3rd party modules
  • patch for applying patch to nginx

Build Support

Installation

go get -u github.com/cubicdaiya/nginx-build

If you don't have go-runtime, you may download the binary from here.

If you are Mac OS X user, you can use Homebrew.

brew tap cubicdaiya/nginx-build
brew install nginx-build

Quick Start

$ nginx-build -d work
nginx-build: 0.9.1
Compiler: gc go1.6.1
2016/04/21 09:40:12 Download nginx-1.9.15.....
2016/04/21 09:40:19 Extract nginx-1.9.15.tar.gz.....
2016/04/21 09:40:19 Generate configure script for nginx-1.9.15.....
2016/04/21 09:40:19 Configure nginx-1.9.15.....
2016/04/21 09:40:22 Build nginx-1.9.15.....
2016/04/21 09:40:25 Complete building nginx!

nginx version: nginx/1.9.15
built by gcc 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.1)
configure arguments:

2016/04/21 09:40:25 Enter the following command for install nginx.

   $ cd work/nginx/1.9.15/nginx-1.9.15
   $ sudo make install

$

Custom Configuration

nginx-build provides a mechanism for customizing configuration for building nginx.

Configuration for building nginx

Prepare a configure script like the following.

#!/bin/sh

./configure \
--sbin-path=/usr/sbin/nginx \
--conf-path=/etc/nginx/nginx.conf \

Give this file to nginx-build with -c.

$ nginx-build -d work -c configure.example

Direct configuration for building nginx

In the v0.4.0 or later, nginx-build allows to use nginx's configure options directly.

$ nginx-build -d work \
--sbin-path=/usr/sbin/nginx \
--conf-path=/etc/nginx/nginx.conf \
--error-log-path=/var/log/nginx/error.log \
--pid-path=/var/run/nginx.pid \
--lock-path=/var/lock/nginx.lock \
--http-log-path=/var/log/nginx/access.log \
--http-client-body-temp-path=/var/lib/nginx/body \
--http-proxy-temp-path=/var/lib/nginx/proxy \
--with-http_stub_status_module \
--http-fastcgi-temp-path=/var/lib/nginx/fastcgi \
--with-debug \
--with-http_gzip_static_module \
--with-http_v2_module \
--with-http_ssl_module \
--with-pcre-jit \

But there are limitations. See here about details.

About --add-module and --add-dynamic-module

nginx-build allows to use multiple --add-module and --add-dynamic-module.

$ nginx-build \
-d work \
--add-module=/path/to/ngx_dynamic_upstream \
--add-dynamic-module=/path/to/ngx_small_light

On the other hand, nginx-build allows to embed multiple 3rd party modules with the single --add-module and --add-dynamic-module like the following, too.

$ nginx-build \
-d work \
--add-module=/path/to/ngx_small_light,/path/to/ngx_dynamic_upstream

Limitations

There are the limitations for the direct configuration below.

  • --with-pcre(force PCRE library usage) is not allowed
  • --with-pcre=DIR(set path to PCRE library sources) is allowed
  • --with-libatomic(force libatomic_ops library usage) is not allowed
  • --with-libatomic=DIR(set path to libatomic_ops library sources) is allowed

The limitations above are attributed by the flag package of Go. (multiple and different types from each other are not allowed) By the way, the options above are allowed in a prepared configure script, of course.

Embedding zlib statically

Give -zlib to nginx-build.

$ nginx-build -d work -zlib

-zlibversion is an option to set a version of zlib.

$ nginx-build -d work -zlib -zlibversion=1.2.9

Embedding PCRE statically

Give -pcre to nginx-build.

$ nginx-build -d work -pcre

-pcreversion is an option to set a version of PCRE.

$ nginx-build -d work -pcre -pcreversion=8.38

Embedding OpenSSL statically

Give -openssl to nginx-build.

$ nginx-build -d work -openssl

-opensslversion is an option to set a version of OpenSSL.

$ nginx-build -d work -openssl -opensslversion=1.0.2f

Embedding LibreSSL statically

Give -libressl to nginx-build.

$ nginx-build -d work -libressl

-libresslversion is an option to set a version of LibreSSL.

$ nginx-build -d work -libressl -libresslversion=2.9.2

Known issue, the build with libressl fails on MacOSX.

Embedding 3rd-party modules

nginx-build provides a mechanism for embedding 3rd-party modules. Prepare a ini-file below.

[ngx_devel_kit]
form=git
url=https://github.com/simpl/ngx_devel_kit
rev=v0.2.19

Give this file to nginx-build with -m.

$ nginx-build -d work -m modules.cfg.example

Embedding 3rd-party module dynamically

Give dynamic=true.

[ngx_dynamic_upstream]
form=git
url=https://github.com/cubicdaiya/ngx_dynamic_upstream.git
dynamic=true

Provision for 3rd-party module

There are some 3rd-party modules expected provision. nginx-build provides the options such as shprov and shprovdir for this problem. There is the example configuration below.

[njs/nginx]
form=hg
url=https://hg.nginx.org/njs
shprov=./configure && make
shprovdir=..

[ngx_small_light]
form=git
url=https://github.com/cubicdaiya/ngx_small_light
rev=v0.9.2
dynamic=true
shprov=./setup

Applying patch before building nginx

nginx-build provides the options such as -patch and -patch-opt for applying patch to nginx.

nginx-build \
 -d work \
 -patch nginx__http2_spdy.patch \
 -patch-opt "-p1" \
 -v 1.9.7 \
 --with-http_spdy_module \
 --with-http_v2_module

Idempotent build

nginx-build supports a certain level of idempotent build of nginx. If you want to ensure a build of nginx idempotent and do not want to build nginx as same as already installed nginx, give -idempotent to nginx-build.

$ nginx-build -d work -idempotent

-idempotent ensures an idempotent by checking the software versions below.

  • nginx
  • PCRE
  • zlib
  • OpenSSL

On the other hand, -idempotent does not cover versions of 3rd party modules and dynamic linked libraries.

Build OpenResty

nginx-build supports to build OpenResty.

$ nginx-build -d work -openresty -pcre -openssl

If you don't install PCRE and OpenSSL on your system, it is required to add the option -pcre and -openssl.

And there is the limitation for the support of OpenResty. nginx-build does not allow to use OpenResty's unique configure options directly. But you can use the common options of nginx and OpenResty directly. If you want to use OpenResty's unique configure option, Configuration for building nginx is helpful.

Build Tengine

nginx-build supports to build Tengine.

$ nginx-build -d work -tengine -openssl

If you don't install OpenSSL on your system, it is required to add the option -openssl.

There is the limitation for the support of Tengine. nginx-build does not allow to use Tengine's unique configure options directly. But you can use the common options of nginx and Tengine directly.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].