Commit graph

237 commits

Author SHA1 Message Date
Matthew Haughton
a0258920d1 Fix Puppet 3.2.x deprecation warnings 2013-12-08 17:01:12 -05: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
753283286f switch vhost resource to concat pattern
Also uses sites-available/enabled pattern for config files
2013-11-30 21:24:50 -05:00
Dominik Richter
709c25e82e simplified checks if variables are set in vhost_location_proxy template
kudos to Matthew Haughton for this suggestion

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
2013-11-27 19:56:04 +01: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
43d628d4f0 fix auth_basic/auth_basic_user_file variable detection 2013-11-21 23:22:01 -05:00
Matthew Haughton
99e9d82f12 accept boolean for ipv6_enable as documented 2013-11-21 23:18:04 -05:00
Matthew Haughton
e1c4c7470b sort vhost_cfg_append in vhost_ssl_footer 2013-11-21 23:08:36 -05:00
Matthew Haughton
4af2087867 fix spacing issues in various templates
Before this change, vhost_ssl_header would merge
"ssl" with any listen options, e.g.:
    listen       *:443 ssldefault;
when listen_options => 'default'.
2013-11-21 23:04:39 -05:00
Matthew Haughton
ef2a5e4f15 fix syntax of allow/deny directives 2013-11-21 22:35:44 -05:00
Matthew Haughton
3024f2927d fix IPv6 address fact detection 2013-11-21 22:32:23 -05:00
TJ Biddle
3536069f16 Adding upstream fail_timeout. 2013-10-29 11:55:40 -07:00
Daniel Kerwin
b17a8c2952 Fix upstream_cfg_prepend loop to put every element on a dedicated line 2013-10-22 23:19:34 +02:00
Tomas Barton
4e41871dac fixed acces to vhost_cfg_append via instance variable 2013-09-30 00:46:17 +02:00
Tomas Barton
82ce9223a9 possibility to disable default location 2013-09-29 20:53:25 +02:00
Tomas Barton
2cc0a2fcf0 support ssl_cache and for passenger cgi params 2013-09-29 20:36:19 +02:00
James Fryman
315d7e109f Merge pull request #120 from abraham1901/dev
Aggregated some PR & tested & simple bug fix & add new option
2013-09-15 17:29:56 -07:00
James Fryman
6f2eb74558 Merge pull request #140 from alanpearce/patch-1
Fix deprecated variable access warning in vhost footer template
2013-09-15 17:26:14 -07:00
Todd Eddy
9252351986 Fix stub_status location so it has line breaks. 2013-09-14 04:24:01 -04:00
Alan Pearce
05c260a963 Fix deprecated variable access warning in vhost footer template 2013-09-13 15:29:50 +01:00
Lebedev Vadim
20a37a220f Merge branch 'master' of https://github.com/jfryman/puppet-nginx into dev
Conflicts:
	manifests/config.pp
	manifests/resource/location.pp
2013-09-08 16:50:16 +04:00
James Fryman
59106eae7c Merge pull request #128 from leoc/fix-www-rewrite-port
Use correct port for www rewrite
2013-09-06 08:44:49 -07:00
Omar Z
4da3e46207 added proxy_buffer_size with default value of 8k 2013-09-05 23:15:45 +01:00
Omar Z
53b4986b5d make proxy_buffers configurable 2013-09-05 22:57:50 +01:00
Omar Z
08c815d01e Merge remote-tracking branch 'upstream/master' 2013-09-05 22:27:59 +01: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
Lebedev Vadim
4f27265047 remove each_line 2013-09-05 11:43:44 +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
Omar Tamer
fda2969c20 make client_max_body_size configurable 2013-09-04 17:37:18 +01:00
Arthur Leonard Andersen
6934271b85 Use correct port for www rewrite 2013-09-03 23:42:16 +02:00
James Fryman
43d2e86a20 Merge pull request #123 from jhoblitt/sort_vhost_cfg_append
sort $vhost_cfg_append hash in vhost_footer.erb template
2013-09-03 08:08:20 -07:00
Theo Spears
2170297c87 Fix typo in vhost_header 2013-08-31 19:09:58 +01:00
Joshua Hoblitt
df4243491e sort $vhost_cfg_append hash in vhost_footer.erb template
This is so the paremter ordering in the configuration is stable. It also
force the :allow key (if it exists) to be first in the sort ordering.
It would probably be better to change `$vhost_cfg_append` into an array
of one key hashes but would require a public API change.
2013-08-28 10:14:13 -07:00
Lebedev Vadim
1efc72b53a * Bug fix, remove each_line method 2013-08-23 12:58:43 +04:00
Lebedev Vadim
15519e7eef Merge branch 'master' of https://github.com/jfryman/puppet-nginx into dev
Conflicts:
	manifests/package/redhat.pp
	templates/vhost/vhost_footer.erb
	templates/vhost/vhost_header.erb
2013-08-23 01:07:53 +04:00
James Fryman
bd57348454 Merge branch 'master' of https://github.com/jfryman/puppet-nginx 2013-08-22 15:44:51 -05:00
James Fryman
e1aa65d20c Manual merge of https://github.com/jfryman/puppet-nginx/pull/100 2013-08-22 15:44:25 -05:00
James Fryman
b246c13285 Merge pull request #104 from stephenrjohnson/vhost_template_cleanup
fix template, should use @
2013-08-22 13:39:59 -07:00
root
f609f9601d Adding option http_cfg_prepend to class nginx 2013-08-22 23:02:04 +04:00
root
0a53d710c2 Merge branch 'sort_vhost_cfg_append' of https://github.com/jhoblitt/puppet-nginx into dev 2013-08-22 22:24:55 +04:00
Joshua Hoblitt
b8189496a3 sort $vhost_cfg_append hash in vhost_footer.erb template
This is so the paremter ordering in the configuration is stable. It also
force the :allow key (if it exists) to be first in the sort ordering.
It would probably be better to change `$vhost_cfg_append` into an array
of one key hashes but would require a public API change.
2013-08-16 16:29:05 -07:00
Abdoul Bah
b40196f843 Update vhost_location_stub_status.erb
this does not affect ruby1.9
2013-08-15 21:08:03 +02:00
Abdoul Bah
e0f2666077 Update vhost_location_proxy.erb
this does not affect ruby1.9
2013-08-15 21:07:40 +02:00
Abdoul Bah
81c46e165e Update vhost_location_fastcgi.erb 2013-08-15 21:07:06 +02:00
Abdoul Bah
2915ff22db Update vhost_location_empty.erb
this does not affect ruby1.9
2013-08-15 21:06:23 +02:00
Abdoul Bah
e408cdc2f4 Update vhost_location_directory.erb
this does not affect ruby1.9
2013-08-15 21:05:38 +02:00
Abdoul Bah
3a2dd716a0 Update vhost_location_alias.erb
this does not affect ruby1.9
2013-08-15 21:05:02 +02:00
Abdoul Bah
029e40b836 Update vhost_location_stub_status.erb 2013-08-15 18:57:22 +02:00
Abdoul Bah
be5dd67875 Update vhost_location_proxy.erb 2013-08-15 18:56:58 +02:00
Abdoul Bah
0be9924df5 Update vhost_location_fastcgi.erb 2013-08-15 18:56:05 +02:00
Abdoul Bah
f87d4770df Update vhost_location_empty.erb 2013-08-15 18:55:14 +02:00
Abdoul Bah
d10eaa423a Update vhost_location_directory.erb 2013-08-15 18:54:41 +02:00
Abdoul Bah
939d0bd458 Update vhost_location_alias.erb 2013-08-15 18:53:45 +02:00
Abdoul Bah
b432d5269c Update vhost_header.erb 2013-08-15 18:52:35 +02:00
Abdoul Bah
90c5b7349e Update vhost_footer.erb 2013-08-15 18:50:20 +02:00
Abdoul Bah
1f007e3587 add listen_port on rewrite_www_to_non_www
Adding the port in case it is not by default.
2013-08-15 17:04:36 +02:00
Todd Eddy
70207c9a65 Add logging customization to the main logs as well. 2013-08-07 21:27:13 -04:00
Todd Eddy
c6cd476c82 Add custom logs to ssl vhosts as well. 2013-08-07 09:59:44 -04:00
Todd Eddy
94e87d86cd Allow user modification of access and error log in vhost. 2013-08-06 21:11:58 -04:00
Stephen
28f9f74c1b Template variables should start with @ 2013-08-05 08:33:36 +01:00
Justice London
6911b91f9e Merge branch 'master' of https://github.com/jfryman/puppet-nginx into jfryman-master
Conflicts:
	templates/vhost/vhost_location_fastcgi.erb
2013-08-02 13:07:53 -04:00
Lebedev Vadim
49b5b79b76 * Option fastcgi_script fixed
* Options location_cfg_append and location_cfg_prepend added to fastcgi template
* Option www_root is optional now
* Options logging fixed in http template
* Auth_basic fixed in SSL vhost header
2013-08-01 01:07:59 +04:00
Lebedev Vadim
5522f27d9b * Option fastcgi_script fixed
* Options location_cfg_append and location_cfg_prepend added to fastcgi template
* Option www_root is optional now
* Options logging fixed in http template
2013-08-01 00:56:32 +04:00
Justice London
30e9773aeb Merge pull request #1 from jfryman/master
Merging upstream changes
2013-07-25 09:51:45 -07:00
Lebedev Vadim
ae9303233c Merge branch 'master' of https://github.com/jfryman/puppet-nginx into dev
Conflicts:
	manifests/init.pp
2013-07-21 19:40:29 +04:00
Lebedev Vadim
386026fda8 Adding option http_cfg_append to class nginx
Fix puppet-lint
2013-07-21 04:12:18 +04:00
Justice London
aeef0711bb Added split file support to location (for fastcgi) 2013-07-19 11:56:03 -04:00
Pan
b6fb7ae54f Fix undefined method `sort_by' error from vhost_location_empty.erb
In the template, we should check if the variable is defined before use it
2013-07-18 14:36:56 -07:00
Justice London
acfdf04265 Added try_files to fastcgi 2013-07-17 19:29:49 -04:00
Arthur Leonard Andersen
0191a2fe28 Fix deprecated variable names 2013-07-17 20:42:57 +02:00
James Fryman
fc331e8173 Merge pull request #86 from abraham1901/master
Add location priority option
2013-07-09 07:22:14 -07:00
James Fryman
bf8851ee8b Merge pull request #87 from Jonanin/custom_cfg
Sort location_custom_cfg hash to prevent random ordering
2013-07-08 18:44:51 -07:00
Jon Morton
b3ea7b3170 Sort location_custom-cfg hash to prevent random ordering 2013-07-08 20:10:11 -05:00
Lebedev Vadim
a3a1d11400 * Add location priority option 2013-07-08 23:06:02 +04:00
Lebedev Vadim
413271f84d * Fixed log name in template vhost_ssl_header
* Better formatting for vhost_autogen.conf
2013-07-08 18:58:05 +04:00
Jon Morton
d401841279 Change custom_cfg to location_custom_cfg 2013-07-03 15:54:33 -05:00
Jon Morton
d83822810e Add support for locations with only custom directives 2013-07-03 01:47:49 -05:00
Igor Ajdisek
8f49ffa775 vhosts_ssl_header.erb was missing access_log and error_log directives 2013-06-28 10:12:01 +02:00
Igor Ajdisek
e0e5757b55 Made SPDY a toggle param.
Added ssl_ciphers and ssl_protocols as params which default to values as proposed on nginx.org.
If SSL vhost then ssl is added to listen directive as proposed on nginx.org.
2013-06-27 15:42:38 +02:00
Stefan Dorosz
179b1a4b5d Add server_names_hash_bucket_size param 2013-06-20 10:48:52 -04:00
Lebedev Vadim
d7cdd68c63 Merge branch 'master' of https://github.com/jfryman/puppet-nginx 2013-05-21 17:15:59 +04:00
Lebedev Vadim
8d33fd63f1 Merge branch 'master' of https://github.com/jfryman/puppet-nginx
Conflicts:
	manifests/config.pp
	manifests/init.pp
	manifests/params.pp
	manifests/resource/location.pp
	manifests/resource/vhost.pp
	manifests/service.pp
	templates/vhost/vhost_footer.erb
	templates/vhost/vhost_header.erb
	templates/vhost/vhost_location_directory.erb
	templates/vhost/vhost_location_proxy.erb
	templates/vhost/vhost_ssl_header.erb
	tests/vhost.pp
2013-05-21 16:30:21 +04:00
Lebedev Vadim
4f0c311901 * Fixed listen parameter in template vhost_ssl_header
* Added auth basic support
* Added vhost_cfg_append parameter to `nginx::resource::vhost`
2013-05-20 18:30:32 +04:00
James Fryman
169dd8b0d6 Merge pull request #53 from hingstarne/master
Added some minor enhancements
2013-05-15 10:22:46 -07:00
Bayard Randel
896d6658bb added params for types_hash_max_size and types_hash_bucket_size expected by nginx 1.2.x 2013-05-14 14:57:35 +12:00
Arne Hingst
921d7f7d57 ability to add include statements for static config files fro ghosts 2013-05-13 10:57:58 +02:00
Arne Hingst
3c0c836626 enforce ssl protocoll for a vhost 2013-05-13 10:51:47 +02:00
Ingmar Steen
77ed64d2fa Stabilize key/value output by sorting hashes on key. 2013-05-09 14:51:31 +02:00
Sander Hoentjen
57ee1ec1e7 make proxy_http_version configurable 2013-05-06 11:40:46 +02:00
Sander Hoentjen
3630b74c72 return the newline between cfg lines 2013-05-06 11:38:34 +02:00
David Kitchen
6391c08543 Fixed ssl_stapling instruction 2013-04-25 10:54:18 +01:00
David Kitchen
9c93234c27 Added OCSP SSL stapling to reduce SSL handshake by 30% by sparing the revocation list if the certificate includes the intermediate layer to identify the trusted source 2013-04-25 10:48:04 +01:00
David Kitchen
5af32bc82a Added back RC4 to mitigate BEAST attacks 2013-04-25 10:43:21 +01:00
David Kitchen
9cb898f40d Added support for SPDY now that nginx 1.4 has arrived 2013-04-24 22:45:56 +01:00
David Kitchen
7e33272f84 Changed SSL ciphers to the recent default for Nginx which is much
more secure
Added SSL caching to speed up SSL requests
Add server_tokens to the global config so this can be turned on|off
    between dev and prod
Add proxy_set_header to vhost as different vhosts may require different
    headers and the global setting is not ideal
Minor space formatting so that the generated files are fractionally
    more readable
2013-04-24 09:42:06 +01:00
Sander Hoentjen
e0843af76a Add support for upstream_cfg_prepend
Makes things possible like specifying ip_hash and/or keepalive.
2013-04-22 10:03:09 +02:00
Lebedev Vadim
9672b7d345 * Get ssl key/cert with provided file-locations
* Parameter index has now become optional
* Fix typos
2013-04-16 20:12:32 +04:00
Sander Hoentjen
4d05075f64 add support for mail module
See http://wiki.nginx.org/Modules#Mail_modules

Sample Usage:

 nginx::resource::mailhost { 'domain1.example':
   ensure      => present,
   auth_http   => 'server2.example/cgi-bin/auth',
   protocol    => 'smtp',
   listen_port => 587,
   ssl_port    => 465,
   starttls    => 'only',
   xclient     => 'off',
   ssl         => 'true',
   ssl_cert    => '/tmp/server.crt',
   ssl_key     => '/tmp/server.pem',
 }
2013-04-06 11:11:23 +02:00
Lebedev Vadim
bcb564776e Add new line to template 2013-03-28 18:04:50 +04:00
Lebedev Vadim
6defe17d0f Add proxy_cache parameters
Fix puppet-lint
2013-03-27 22:13:52 +04:00
Lebedev Vadim
9e5645670e Add fastcgi template 2013-03-27 19:46:37 +04:00
Lebedev Vadim
a7c9057810 Merge branch 'master' of https://github.com/jfryman/puppet-nginx 2013-03-20 21:11:28 +04:00
Lebedev Vadim
74cfbe6c72 Add $nx_types_hash_max_size params
Fix puppet-lint ERROR
2013-03-16 13:34:07 +04:00
Ryan Fitzgerald
a5b7258f63 fixing vhost template 2013-01-22 18:28:06 +00:00
Hunter Haugen
e419006b74 Add try_files option
Nginx supports a  option via http://wiki.nginx.org/HttpCoreModule#try_files and this adds this as a parameter
2012-11-08 14:15:28 -08:00
Hunter Haugen
b65114d327 Fixup incorrect changes from merge 2012-11-08 14:07:16 -08:00
Hunter Haugen
003f415beb Merge remote-tracking branch 'jfryman/master' into merge_upstream 2012-11-08 10:09:49 -08:00
James Fryman
688948a267 Merge pull request #33 from juaningan/master
Support for SSL only server and SSL defined port
2012-10-24 05:09:43 -07:00
Nick Lewis
4aa2dd3d35 Merge remote-tracking branch 'grooverdan/ticket/11667-try_files_support' 2012-10-18 19:15:09 -07:00
Nick Lewis
7f3f238f96 Merge remote-tracking branch 'cwarden/alternative-ports' 2012-10-18 18:58:59 -07:00
Nick Lewis
20d3e2fc33 Merge pull request #10 from grooverdan/ticket/11664-listen_port_fix
(#11664) Fix listen_port in template so it isn't ignored
2012-10-18 18:52:54 -07:00
juaningan
b4ddaf22df Added SSL port support and if SSL and listen port are the same just creates SSL vhost and location 2012-10-18 15:33:07 +02:00
Lee Boynton
13174e0a3a Fix syntax error in ERB template 2012-10-18 11:12:43 +01:00
Guzmán Brasó
1e6f9dc93c Added listen_options and ipv6_listen_options feature
* Allows to set exta option to listen directives like 'default'.
* This won't change on ipv6 listen template the option ipv6only=on.
2012-10-04 17:17:50 -03:00
Guzmán Brasó
49beb91993 James,
This is the best way I found to tackle the problem of custom directives, trying to
avoid common usage of module involve hacking the module/template to be able place
custom directives.

Right now support was added only for location context (default and custom ones),
it expects a hash with key value and it's supported on all current location types.

Added an example inside location.pp, usage it's pretty easy.
2012-10-02 23:35:56 -03:00
Guzmán Brasó
a9273d7fb8 Added support for stub_status location
If stub_status is provided as true a location will be created to provide
nginx status information from stub_status module.
2012-10-02 20:07:19 -03:00
Guzmán Brasó
73722c0fc6 Fixed merge 2012-10-01 20:10:26 -03:00
James Fryman
af4006cf66 Merge pull request #17 from lboynton/nginx-alias
Add alias support
2012-10-01 12:36:16 -07:00
James Fryman
c7b2446091 Merge pull request #19 from lboynton/server-name-array
Server name array
2012-10-01 12:35:17 -07:00
Guilherme Reis Campos
5c4c00d726 fixing nginx.conf.erb. otherwise it will lookup for a FalseClass or TrueClass variable 2012-10-01 16:00:18 -03:00
Guzmán Brasó
1ccca88dc2 Moved worker_connections, worker_process and proxy_set_header to the new structure, backwards compatible
Defaults are set inside params, nginx class will set default and send it from local var to nginx::config,
so even when there is no need for set default values on nginx::config, in case someone already using
this module it's for some reason calling directly nginx::config, to avoid breaking anything defaults are
set inside nginx::config too.
2012-09-28 14:50:16 -03:00
Lee Boynton
b7e7aa525d Merge remote-tracking branch 'dhutty/master' into server-name-array
Conflicts:
	manifests/resource/vhost.pp
	templates/vhost/vhost_header.erb
2012-09-27 15:42:53 +01:00
Lee Boynton
1d50d9ea05 Add alias support 2012-09-24 17:01:40 +01:00
James Fryman
20fa345416 Merge pull request #13 from drdla/patch-3
This is part of patch-1!
2012-09-17 10:28:15 -07:00
Duncan Hutty
411419960b add an array parameter to resource::vhost, server_name, that goes into the server_name nginx directive for that vhost 2012-09-10 17:15:32 -04:00
drdla
cc4b9615f7 Update templates/vhost/vhost_footer.erb 2012-09-01 18:52:55 +03:00
drdla
4667811324 Update templates/vhost/vhost_header.erb 2012-09-01 18:51:30 +03:00
Christian G. Warden
a214b0ff21 Support vhosts that listen on alternative ports
- Include the port in the listen directive
- Add an optional $server_name parameter to nginx::resource::vhost so
  server_name doesn't have to match the resource's name.  This allows
  the creation of multiple vhosts with the same server_name that listen
  on different ports.
2012-01-30 11:26:10 -08:00
Christian G. Warden
942c659fd0 Add per-location proxy read timeout parameter
Add a proxy_read_timeout parameter to set the read timeout setting
per-location.  The parameter can also be passed when declaring a vhost,
in which case it will apply to the root location.
2012-01-30 11:14:57 -08:00
Daniel Black
719028ce5e (#11667) add try_files support in vhost and location directives
Try_files is how NGINX files the files to serve particularly in a
fallback mode. Using an array for try_files will interate through
these options in the generated configuration file.
2012-01-22 12:49:41 +11:00
Daniel Black
dede78ab3d (#11664) Fix listen_port in template so it isn't ignored
listen_port was being ignore when the template was generated.
This commit fixes it.
2012-01-03 12:20:27 +11:00
James Fryman
eedaa5159c Updated Documentation 2011-06-06 17:38:40 -05:00
James Fryman
ebd481d570 Added SuSE Support 2011-06-06 17:25:04 -05:00
James Fryman
4558791e49 Updated Package Layout 2011-06-06 10:04:24 -05:00
James Fryman
fe3e409c9c Added vhost support 2011-06-02 14:49:39 -05:00
James Fryman
3b036c95e5 20110524 Work Snapshot 2011-05-24 21:20:48 -05:00