2 Nginx module for Augeas
4 Authors: Ian Berry <iberry@barracuda.com>
5 Raphael Pinson <raphael.pinson@camptocamp.com>
9 This module was built to support a limited subset of nginx
10 configuration syntax. It works fine with simple blocks and
14 This file is licenced under the LGPL v2+, like the rest of Augeas.
19 About: Configuration files
20 This lens applies to /etc/nginx/nginx.conf. See <filter>.
23 The <Test_Nginx> file contains various examples and tests.
26 * Convert statement keyworks for a regex
27 * Support more advanced block syntax (location)
35 The keywords reserved for block entries *)
36 let block_re = "http" | "events"
37 | "server" | "upstream"
43 let kw = Rx.word - block_re
44 in let sto = store /[^ \t\n;][^;]*/ . Sep.semicolon
45 in Build.key_value_line_comment
46 kw Sep.space sto Util.comment_eol
49 A block containing <simple> entries *)
51 let entry = Util.indent . simple
53 . Build.block_newlines entry Util.comment
57 let lns = ( Util.comment | Util.empty | simple | block )*
59 (* Variable: filter *)
60 let filter = incl "/etc/nginx/nginx.conf"
61 . incl "/etc/nginx/conf.d/*.conf"
62 . incl "/usr/portage/www-servers/nginx/files/nginx.conf"
64 let xfm = transform lns filter