|
180 | 180 | # @param reset_timedout_connection |
181 | 181 | # Enables or disables resetting timed out connections and connections closed |
182 | 182 | # with the non-standard code 444. |
| 183 | +# @param format_log |
| 184 | +# Log_format to use with the defined access_log |
| 185 | +# @param access_log |
| 186 | +# Where to write access log (log format can be set with $format_log). This |
| 187 | +# can be either a string or an array; in the latter case, multiple lines will |
| 188 | +# be created. Additionally, unlike the earlier behavior, setting it to |
| 189 | +# 'absent' in the server context will remove this directive entirely from the |
| 190 | +# server stanza, rather than setting a default. Can also be disabled for this |
| 191 | +# server with the string 'off'. |
| 192 | +# @param error_log |
| 193 | +# Where to write error log. May add additional options like error level to |
| 194 | +# the end. May set to 'absent', in which case it will be omitted in this |
| 195 | +# server stanza (and default to nginx.conf setting) |
| 196 | +# @param log_not_found |
| 197 | +# Enables or disables the logging of not found errors in error_log |
183 | 198 | # |
184 | 199 | # @example Simple example |
185 | 200 | # nginx::resource::location { 'test2.local-bob': |
|
237 | 252 | Enum['present', 'absent'] $ensure = 'present', |
238 | 253 | Boolean $internal = false, |
239 | 254 | String $location = $name, |
240 | | - Variant[String[1],Array[String[1],1]] $server = undef, |
| 255 | + Variant[String[1], Array[String[1], 1]] $server = undef, |
241 | 256 | Optional[String] $www_root = undef, |
242 | 257 | Optional[String] $autoindex = undef, |
243 | 258 | Optional[Enum['on', 'off']] $autoindex_exact_size = undef, |
|
305 | 320 | Optional[String] $auth_basic_user_file = undef, |
306 | 321 | Optional[String] $auth_request = undef, |
307 | 322 | Array $rewrite_rules = [], |
308 | | - Integer[401,599] $priority = 500, |
| 323 | + Integer[401, 599] $priority = 500, |
309 | 324 | Boolean $mp4 = false, |
310 | 325 | Boolean $flv = false, |
311 | 326 | Optional[String] $expires = undef, |
312 | 327 | Hash $add_header = {}, |
313 | 328 | Optional[Enum['on', 'off', 'always']] $gzip_static = undef, |
314 | 329 | Optional[Enum['on', 'off']] $reset_timedout_connection = undef, |
| 330 | + Optional[Variant[Array[String[1], 1], String[1]]] $access_log = undef, |
| 331 | + Optional[Variant[Array[String[1], 1], String[1]]] $error_log = undef, |
| 332 | + Optional[String[1]] $format_log = $nginx::http_format_log, |
| 333 | + Optional[Enum['on', 'off']] $log_not_found = undef, |
315 | 334 | ) { |
316 | | - if ! defined(Class['nginx']) { |
| 335 | + if !defined(Class['nginx']) { |
317 | 336 | fail('You must include the nginx base class before using any defined resources') |
318 | 337 | } |
319 | 338 |
|
|
339 | 358 | # Use proxy, fastcgi or uwsgi template if $proxy is defined, otherwise use directory template. |
340 | 359 | # fastcgi_script is deprecated |
341 | 360 | if ($fastcgi_script != undef) { |
342 | | - warning('The $fastcgi_script parameter is deprecated; please use $fastcgi_param instead to define custom fastcgi_params!') |
| 361 | + warning( |
| 362 | + 'The $fastcgi_script parameter is deprecated; please use $fastcgi_param instead to define custom fastcgi_params!') |
343 | 363 | } |
344 | 364 |
|
345 | 365 | # Only try to manage these files if they're the default one (as you presumably |
|
0 commit comments