jfryman/puppet-nginx — pull request #391 by jbussdieker (2014-08-02 07:29:23+00:00)
Title: WIP: Support prepending http config directives

The goal being to support custom logging formats which must be declared before their usage in the access_log directive. However before I finalize this and write tests I started wondering if there would be value in making log_format a parameter in the nginx class. I'm not sure if anyone would ever define multiple log formats in which case a log_formats parameter might make sense. Any and all feedback welcome :smile:

`````
nginx::http_cfg_prepend:
log_format:
|
custom '[$time_local] $remote_addr "$http_x_forwarded_for" $http_host '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" "$upstream_addr" '
'"$upstream_http_x_alpha" "$upstream_http_x_beta"'
nginx::http_access_log: '/var/log/nginx/access.log custom'
`````