|
74 | 74 | # options like log format to the end.
|
75 | 75 | # [*error_log*] - Where to write error log. May add additional
|
76 | 76 | # options like error level to the end.
|
77 |
| -# |
| 77 | +# [*passenger_cgi_param*] - Allows one to define additional CGI environment |
| 78 | +# variables to pass to the backend application |
78 | 79 | # Actions:
|
79 | 80 | #
|
80 | 81 | # Requires:
|
|
104 | 105 | $ssl_port = '443',
|
105 | 106 | $ssl_protocols = 'SSLv3 TLSv1 TLSv1.1 TLSv1.2',
|
106 | 107 | $ssl_ciphers = 'HIGH:!aNULL:!MD5',
|
| 108 | + $ssl_cache = 'shared:SSL:10m', |
107 | 109 | $spdy = $nginx::params::nx_spdy,
|
108 | 110 | $proxy = undef,
|
109 | 111 | $proxy_read_timeout = $nginx::params::nx_proxy_read_timeout,
|
|
132 | 134 | $include_files = undef,
|
133 | 135 | $access_log = undef,
|
134 | 136 | $error_log = undef,
|
| 137 | + $passenger_cgi_param = undef, |
| 138 | + $use_default_location = true, |
135 | 139 | ) {
|
136 | 140 |
|
137 | 141 | validate_array($location_allow)
|
|
190 | 194 | if ($ssl == true) and ($ssl_port == $listen_port) {
|
191 | 195 | $ssl_only = true
|
192 | 196 | }
|
193 |
| - |
194 |
| - # Create the default location reference for the vHost |
195 |
| - nginx::resource::location {"${name}-default": |
196 |
| - ensure => $ensure, |
197 |
| - vhost => $name, |
198 |
| - ssl => $ssl, |
199 |
| - ssl_only => $ssl_only, |
200 |
| - location => '/', |
201 |
| - location_allow => $location_allow, |
202 |
| - location_deny => $location_deny, |
203 |
| - proxy => $proxy, |
204 |
| - proxy_read_timeout => $proxy_read_timeout, |
205 |
| - proxy_cache => $proxy_cache, |
206 |
| - proxy_cache_valid => $proxy_cache_valid, |
207 |
| - fastcgi => $fastcgi, |
208 |
| - fastcgi_params => $fastcgi_params, |
209 |
| - fastcgi_script => $fastcgi_script, |
210 |
| - try_files => $try_files, |
211 |
| - www_root => $www_root, |
212 |
| - index_files => $index_files, |
213 |
| - location_custom_cfg => $location_custom_cfg, |
214 |
| - notify => Class['nginx::service'], |
| 197 | + |
| 198 | + if $use_default_location == true { |
| 199 | + # Create the default location reference for the vHost |
| 200 | + nginx::resource::location {"${name}-default": |
| 201 | + ensure => $ensure, |
| 202 | + vhost => $name, |
| 203 | + ssl => $ssl, |
| 204 | + ssl_only => $ssl_only, |
| 205 | + location => '/', |
| 206 | + location_allow => $location_allow, |
| 207 | + location_deny => $location_deny, |
| 208 | + proxy => $proxy, |
| 209 | + proxy_read_timeout => $proxy_read_timeout, |
| 210 | + proxy_cache => $proxy_cache, |
| 211 | + proxy_cache_valid => $proxy_cache_valid, |
| 212 | + fastcgi => $fastcgi, |
| 213 | + fastcgi_params => $fastcgi_params, |
| 214 | + fastcgi_script => $fastcgi_script, |
| 215 | + try_files => $try_files, |
| 216 | + www_root => $www_root, |
| 217 | + index_files => $index_files, |
| 218 | + location_custom_cfg => $location_custom_cfg, |
| 219 | + notify => Class['nginx::service'], |
| 220 | + } |
| 221 | + } else { |
| 222 | + $root = $www_root |
215 | 223 | }
|
216 | 224 |
|
217 | 225 | # Support location_cfg_prepend and location_cfg_append on default location created by vhost
|
|
0 commit comments