buildbuildsuccesssuccess written inwritten inBash, AwkBash, Awk

A DSL for writing condensed nginx configurations.

ncb (Nginx Configuration Builder) is a scaffolding shell script aimed at reducing nginx configurations.

Tags: PL, sysadmin


Produce (and store under source control) a definition script:

buildall() { # An example host: ( allowcors staticonly "/srv/www/" serve "/example" ) | vhost "$HOST" "" # other host definitions... }

Generate nginx configurations with path/to/above.


2015-12-13: v1.1.0
• Feature: ACME support for Let's Encrypt (enable by defining $ACME_CHALLENGE_DIR)
• Feature: gzip support (disable with comment @NO_GZIP_HEADER)
• Feature: New makedefault, vhost_sslredir, serve directives
• Compatibility: Remove downloaddir
• Always indicate UTF-8 character set in Content-Type
• Improve performance on non-Linux platforms by preferring non-forking subshells
2014-08-17: v1.0.0
• Initial release


For bug reports, feature requests, or if you need any help, please click here to email me.