Nginx module for Augeas
Authors: Ian Berry ibe@barrac uda.com Raphael Pinson rryraphael@camptoc amp.com .pinson
Nginx | Nginx module for Augeas |
Reference | This module was built to support a limited subset of nginx configuration syntax. |
License | This file is licenced under the LGPL v2+, like the rest of Augeas. |
Lens Usage | To be documented |
Configuration files | This lens applies to /etc/nginx/nginx.conf. |
Examples | The Test_Nginx file contains various examples and tests. |
TODO | |
Augeas Variables | |
block_re | The keywords reserved for block entries |
Augeas Lenses | |
simple | A simple entry |
block | A block containing simple entries |
lns | |
Augeas Variables | |
filter |
This lens applies to /etc/nginx/nginx.conf. See filter.
The Test_Nginx file contains various examples and tests.
let block (entry : lens) = [ Util.indent . block_head . Build.block_newlines entry Util.comment . Util.eol ]
A block containing simple entries
The keywords reserved for block entries
let block_re = "http" | "events" | "server" | "mail" | "stream"
A simple entry
let simple = let kw = Rx.word - block_re_all in let sto = store /[^ \t\n;][^;]*/ . Sep.semicolon in [ Util.indent . key kw . Sep.space . sto . (Util.eol|Util.comment_eol) ]
A block containing simple entries
let block (entry : lens) = [ Util.indent . block_head . Build.block_newlines entry Util.comment . Util.eol ]
let lns = ( Util.comment | Util.empty | directive )*