Location resources with internal == true are valid, but the module does
not allow them unless one or more of www_root, proxy, location_alias,
stub_status, fastcgi, or location_custom_cfg are set
This patch allows locations with none of those but internal == true to
be created.
This is a re-implementation of jfryman/nginx PR-388.
The super group on many platforms is known as root, which a UID of 0.
However, on other platforms, the UID is still 0, but the group is
'wheel'. Largely historic UNIX jargon, but suffice to say that, to
support FreeBSD and others, setting the group of '0' has the same impact
while supporting a wider range of platforms.
- added raw_prepend / raw_append to vhosts & locations, which
adds raw lines to the vhost/location /without/ semicolons
- added location_raw_prepend / location_raw_append to vhost
for passing through to default location
- added spec tests for new parameters
- cleaned up location specs to match new header/body/footer setup
reducing duplicate checks by testing header/footer separately.
- cleaned up whitespace (2 space) in touched files
- used `<%-` in erb templates to allow the use of leading
whitespace, making the logic flow more readable
- Also adds spec tests for recent vhost updates:
- client_body_timeout
- client_header_timeout
- gzip_types
- testing that the first server_name is used when www_to_non_www is true
With parser 'future', a '\\' counts as one backslash whereas with
parser 'current' it's two. Therefore with 'future' only one gets passed
to regsubst which in turn aborts with
Error: regsubst(): Bad regular expression `\'
The 'future' behaviour is indeed the correct one but 'current' won't be
fixed either. Therefore, use "\\\\" which produces two backslashes with
both parser (ref: https://tickets.puppetlabs.com/browse/PUP-1814).
Following parameters where added to the location resourse. These
already existsed in the vhost resource so the same logic and defaults
where used
* proxy_set_header
* proxy_connect_timeout
* proxy_redirect
Add example nginx::vhost with HTTPS FastCGI and redirection of HTTP
Add location_custom_cfg_prepend & location_custom_cfg_append. Used for logical structures such as if.
Fix puppet-lint
Valid range changed to 401-599:
vhost SSL header has priority 700. If $priority is set to 400 (which
resolves to 400+300=700 for SSL locations), then it would conflict with
the priority of the header. It must be 401 or higher to avoid this.
Top end of range is limited to 599 to reflect documentation however it
could be increased to 698 and still provide expected behavior.