Allow custom nginx config insertion at top-level of nginx.conf
Summary
Add nginx['custom_nginx_top_level_config']
key for inserting custom config at the top level of nginx.conf
.
Proposal
Currently nginx['custom_nginx_config'] = "include /etc/nginx/conf.d/*.conf;"
will result in
http {
...
include /etc/nginx/conf.d/*.conf;
}
in the generated nginx.conf
.
But what if the user needs to insert e.g. a stream
block, for the purpose of doing SSL pass-through to another upstream server? That would need to be inserted at the top-level, outside the http
block. The same goes for any other config that needs to be outside the http
block.
I suggest a new nginx['custom_nginx_top_level_config']
key which would be inserted below (outside) the http
block.