Commit graph

85 commits

Author SHA1 Message Date
Matthew Haughton
f18dcf0f1f fully qualify classes, defines and variables 2014-11-26 23:37:11 -05:00
Daniel Dreier
22c6a7cb57 Allow internal-only location resources
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.
2014-09-25 09:40:32 -07:00
James Fryman
b8e2ccc540 Merge pull request #453 from jfryman/add-puppet-module-tool
Introducing Puppet Module Data
2014-09-24 15:07:28 -07:00
Pierre Radermecker
0a46f25c3c Guard against undef 2014-09-24 02:06:15 +02:00
cdenneen
324179e7a4 Add include files to locations 2014-09-23 18:52:14 -04:00
James Fryman
4c5f1e3b2a pass one of spec cleanup 2014-09-20 18:25:24 -05:00
Matthew Haughton
bbf6f4584d Merge pull request #413 from zshahan/enable_streaming
Add flv and mp4 parameters to vhost::location
2014-08-22 13:24:12 -04:00
Matthew Haughton
88d8984876 Fix remaining lint warnings 2014-08-18 23:04:24 -04:00
zshahan
68a46d3ed1 added streaming options. 2014-08-18 20:34:43 -05:00
Christoph Körner
9bedd7950a Renamed params to fastcgi_param and moved to fastcgi.erb 2014-08-13 12:24:59 +02:00
Christoph Körner
a128713520 Changed description of params in comment block 2014-08-11 10:19:41 +02:00
Christoph Körner
96138715d1 Add support of custom fastcgi_params 2014-08-11 10:04:21 +02:00
Zach Leslie
529fabb866 Update $root_group in manifests to use platform specifics 2014-07-28 14:49:10 -07:00
Zach Leslie
b939e92624 Update root group for wider support
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.
2014-07-12 13:19:38 -07:00
Carl P. Corliss
7be12d0870 new raw_prepend / raw_append feature for vhosts & locations
- 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
2014-06-26 00:00:37 -04:00
Carl P. Corliss
9b14ba901e add ability to designate location as internal 2014-06-24 10:42:27 -04:00
James Fryman
53d17c5d8b Merge pull request #357 from nalbion/feature/ssl_implied_by_ssl_only
$ssl implied by $ssl_only
2014-06-24 09:24:05 -05:00
Nick Albion
5c1cc4f828 $ssl is implied by $ssl_only
(I'm too lazy to add ssl=true AND ssl_only=true to each location)
2014-06-24 16:49:16 +10:00
Nick Albion
8a95137d94 $ssl is implied by $ssl_only
(I'm too lazy to add ssl=true AND ssl_only=true to each location)
2014-06-24 16:48:16 +10:00
Carl P. Corliss
33303102fc refactor locations to remove a bit of redundancy 2014-06-23 17:41:21 -04:00
Jan Örnstedt
d8e6d603e7 Replace hardcoded paths referring to '/etc/nginx' with config variable instead. 2014-06-13 13:51:45 +02:00
Jan Örnstedt
7459e91744 Made config dir available as a parameter. 2014-06-13 13:51:45 +02:00
Jan Örnstedt
8613a52be9 Added 4 proxy parameters.
client_body_buffer_size
proxy_connect_timeout
proxy_read_timeout
proxy_send_timeout

And reference these variabels in the template.
2014-06-04 22:19:10 +02:00
Jan Örnstedt
872d5970a8 Add proxy_read_timeout 2014-06-04 22:19:09 +02:00
Matthew Schmitt
f0f00c6ca8 Puppet-lint fixes 2014-06-04 13:06:37 -07:00
Sebastian Schmidt
c78ee8c551 fix location sanitizing with parser 'future'
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).
2014-05-05 17:07:41 +02:00
Alex
0e27ce101e Use md5 hash for the location temp files 2014-04-13 05:29:20 +03:00
Alex Pica
d4da8f8eff Use md5 for location concat filenames 2014-04-13 05:12:19 +03:00
John Bond
1b7ac9ab43 Add additional config to the locations section of config
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
2014-04-09 17:48:32 +02:00
Nathan Sullivan
8160de83ac allow setting custom priority before and after default SSL priority 2014-03-28 17:20:15 +10:00
Jean-François Roche
4618ab180e fix missing ensure on concat::fragment resources 2014-03-18 13:35:57 +01:00
Lebedev Vadim
a4ddf886b2 Merge branch 'master' of https://github.com/jfryman/puppet-nginx into dev 2014-01-14 19:57:45 +04:00
Lebedev Vadim
088f1414c9 revert change priority type 2014-01-14 19:57:13 +04:00
Matthew Haughton
dc3817f9ae added rewrite to location/proxy & vhost
With credit to https://github.com/OmarzT
2014-01-13 13:20:02 -05:00
Lebedev Vadim
e94af129e4 Fixed long names virtual hosts, such as nginx::resource::vhost { 'name1.domainname.org name2.domainname.org': }
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
2014-01-12 23:15:14 +04:00
Matthew Haughton
8e71d33121 validations for nginx::resource::location 2014-01-07 23:04:49 -05:00
Matthew Haughton
5756568f21 variables should not be substituted in message
Using $priority meant it would be substituted with the value of the
parameter when it should be shown as static text.
2014-01-07 22:12:31 -05:00
Matthew Haughton
d22402c404 Add validation for $priority
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.
2014-01-03 13:03:55 -05:00
Omar Tamer
1566daa60f added rewrite to location/proxy & vhost 2014-01-02 18:13:59 +00:00
Lebedev Vadim
fc6d66fa0b Fixed location containing '\', such as '~ \.php$' 2013-12-25 02:36:01 +04:00
Jason Clark
c7566d9134 Fix for order statements. Concat requires strings 2013-12-17 22:12:31 -06:00
Markus Rekkenbeil
b79259ed8b Add nginx autoindex to resource nginx::location and style up the
nginx::vhost directory template

Signed-off-by: Markus Rekkenbeil <markus@bionix-it.de>
2013-12-16 17:36:24 +01:00
James Fryman
7c1674202a Merge pull request #170 from TelekomCloud/feature/set_proxy_method_and_body
Add support for proxy method and body
2013-12-05 07:48:18 -08:00
Matthew Haughton
d849c31c35 switch location resource to concat pattern 2013-11-30 21:24:55 -05:00
Dominik Richter
a83c513ac4 feature: add configurable proxy_set_body to vhost and location resources
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2013-11-27 15:12:56 +01:00
Dominik Richter
a578dcea50 feature: add configurable proxy_method to vhost and location resources
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2013-11-27 15:12:56 +01:00
Matthew Haughton
354a68ef63 validate all arrays 2013-10-20 17:58:25 -04:00
James Fryman
8845838390 regex replace / in resource::vhost Fixes #102 2013-10-19 15:55:52 -05:00
Lebedev Vadim
757bb87031 Merge branch 'master' of https://github.com/jfryman/puppet-nginx into dev
Conflicts:
	manifests/params.pp
	manifests/resource/location.pp
	manifests/resource/vhost.pp
	templates/vhost/vhost_header.erb
2013-09-05 12:01:00 +04:00
Ashley Penney
39bc3f16ac This commit addresses issue #49, the lack of ways to set allow and
deny rules within a location.
2013-09-04 13:04:28 -04:00