annotate modules/apache/manifests/fastcgi/server.pp @ 437:b8d6ada284dd

Update Apache module to latest version Also converted some params to ints to match
author IBBoard <dev@ibboard.co.uk>
date Sun, 14 Aug 2022 11:30:13 +0100
parents d9352a684e62
children adf6fe9bbc17
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
275
d9352a684e62 Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents: 257
diff changeset
1 # @summary
d9352a684e62 Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents: 257
diff changeset
2 # Defines one or more external FastCGI servers to handle specific file types. Use this
d9352a684e62 Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents: 257
diff changeset
3 # defined type with `mod_fastcgi`.
d9352a684e62 Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents: 257
diff changeset
4 #
d9352a684e62 Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents: 257
diff changeset
5 # @param host
d9352a684e62 Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents: 257
diff changeset
6 # Determines the FastCGI's hostname or IP address and TCP port number (1-65535).
d9352a684e62 Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents: 257
diff changeset
7 #
d9352a684e62 Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents: 257
diff changeset
8 # @param timeout
d9352a684e62 Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents: 257
diff changeset
9 # Sets the number of seconds a [FastCGI](http://www.fastcgi.com/) application can be inactive before aborting the
d9352a684e62 Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents: 257
diff changeset
10 # request and logging the event at the error LogLevel. The inactivity timer applies only as
d9352a684e62 Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents: 257
diff changeset
11 # long as a connection is pending with the FastCGI application. If a request is queued to an
d9352a684e62 Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents: 257
diff changeset
12 # application, but the application doesn't respond by writing and flushing within this period,
d9352a684e62 Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents: 257
diff changeset
13 # the request is aborted. If communication is complete with the application but incomplete with
d9352a684e62 Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents: 257
diff changeset
14 # the client (the response is buffered), the timeout does not apply.
d9352a684e62 Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents: 257
diff changeset
15 #
d9352a684e62 Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents: 257
diff changeset
16 # @param flush
d9352a684e62 Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents: 257
diff changeset
17 # Forces `mod_fastcgi` to write to the client as data is received from the
d9352a684e62 Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents: 257
diff changeset
18 # application. By default, `mod_fastcgi` buffers data in order to free the application
d9352a684e62 Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents: 257
diff changeset
19 # as quickly as possible.
d9352a684e62 Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents: 257
diff changeset
20 #
d9352a684e62 Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents: 257
diff changeset
21 # @param faux_path
d9352a684e62 Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents: 257
diff changeset
22 # Apache has FastCGI handle URIs that resolve to this filename. The path set in this
d9352a684e62 Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents: 257
diff changeset
23 # parameter does not have to exist in the local filesystem.
d9352a684e62 Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents: 257
diff changeset
24 #
d9352a684e62 Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents: 257
diff changeset
25 # @param fcgi_alias
d9352a684e62 Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents: 257
diff changeset
26 # Internally links actions with the FastCGI server. This alias must be unique.
d9352a684e62 Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents: 257
diff changeset
27 #
d9352a684e62 Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents: 257
diff changeset
28 # @param file_type
d9352a684e62 Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents: 257
diff changeset
29 # Sets the MIME `content-type` of the file to be processed by the FastCGI server.
d9352a684e62 Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents: 257
diff changeset
30 #
437
b8d6ada284dd Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents: 275
diff changeset
31 # @param pass_header
b8d6ada284dd Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents: 275
diff changeset
32 # Sets a header for the server
b8d6ada284dd Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents: 275
diff changeset
33 #
36
37675581a273 Update Puppet module for Apache (pulls in concat module)
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
34 define apache::fastcgi::server (
437
b8d6ada284dd Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents: 275
diff changeset
35 String $host = '127.0.0.1:9000',
b8d6ada284dd Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents: 275
diff changeset
36 Integer $timeout = 15,
b8d6ada284dd Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents: 275
diff changeset
37 Boolean $flush = false,
b8d6ada284dd Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents: 275
diff changeset
38 Stdlib::Absolutepath $faux_path = "/var/www/${name}.fcgi",
b8d6ada284dd Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents: 275
diff changeset
39 Stdlib::Unixpath $fcgi_alias = "/${name}.fcgi",
b8d6ada284dd Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents: 275
diff changeset
40 String $file_type = 'application/x-httpd-php',
b8d6ada284dd Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents: 275
diff changeset
41 Optional[String] $pass_header = undef,
36
37675581a273 Update Puppet module for Apache (pulls in concat module)
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
42 ) {
437
b8d6ada284dd Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents: 275
diff changeset
43 include apache::mod::fastcgi
36
37675581a273 Update Puppet module for Apache (pulls in concat module)
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
44
37675581a273 Update Puppet module for Apache (pulls in concat module)
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
45 Apache::Mod['fastcgi'] -> Apache::Fastcgi::Server[$title]
37675581a273 Update Puppet module for Apache (pulls in concat module)
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
46
275
d9352a684e62 Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents: 257
diff changeset
47 if $host =~ Stdlib::Absolutepath {
257
675c1cc61eaf Update Apache module to get CentOS 8 support
IBBoard <dev@ibboard.co.uk>
parents: 36
diff changeset
48 $socket = $host
675c1cc61eaf Update Apache module to get CentOS 8 support
IBBoard <dev@ibboard.co.uk>
parents: 36
diff changeset
49 }
675c1cc61eaf Update Apache module to get CentOS 8 support
IBBoard <dev@ibboard.co.uk>
parents: 36
diff changeset
50
36
37675581a273 Update Puppet module for Apache (pulls in concat module)
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
51 file { "fastcgi-pool-${name}.conf":
275
d9352a684e62 Mass update of modules to remove deprecation warnings
IBBoard <dev@ibboard.co.uk>
parents: 257
diff changeset
52 ensure => file,
437
b8d6ada284dd Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents: 275
diff changeset
53 path => "${apache::confd_dir}/fastcgi-pool-${name}.conf",
36
37675581a273 Update Puppet module for Apache (pulls in concat module)
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
54 owner => 'root',
437
b8d6ada284dd Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents: 275
diff changeset
55 group => $apache::params::root_group,
b8d6ada284dd Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents: 275
diff changeset
56 mode => $apache::file_mode,
36
37675581a273 Update Puppet module for Apache (pulls in concat module)
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
57 content => template('apache/fastcgi/server.erb'),
437
b8d6ada284dd Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents: 275
diff changeset
58 require => Exec["mkdir ${apache::confd_dir}"],
b8d6ada284dd Update Apache module to latest version
IBBoard <dev@ibboard.co.uk>
parents: 275
diff changeset
59 before => File[$apache::confd_dir],
36
37675581a273 Update Puppet module for Apache (pulls in concat module)
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
60 notify => Class['apache::service'],
37675581a273 Update Puppet module for Apache (pulls in concat module)
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
61 }
37675581a273 Update Puppet module for Apache (pulls in concat module)
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
62 }