Puppet Class: jitsimeet::webserver::nginx
- Defined in:
- manifests/webserver/nginx.pp
Summary
Manage the nginx virtualhost.Overview
Original source taken from github.com/b1-systems/puppet-jitsi/blob/a3a2b339549ac3398b782d8217bf335744be6f49/manifests/init.pp#L211
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'manifests/webserver/nginx.pp', line 5
class jitsimeet::webserver::nginx {
class { 'nginx':
service_manage => 'webserver' in $jitsimeet::managed_services,
manage_repo => $jitsimeet::nginx_manage_repo,
}
nginx::resource::server { "${jitsimeet::jitsi_domain} port 80":
ensure => present,
www_root => $jitsimeet::www_root,
location_cfg_append => { 'rewrite' => '^ https://$server_name$request_uri? permanent' },
}
nginx::resource::server { $jitsimeet::jitsi_domain:
index_files => [ 'index.html' ],
listen_port => 443,
ssl => true,
ssl_cert => $jitsimeet::jitsi_vhost_ssl_cert,
ssl_key => $jitsimeet::jitsi_vhost_ssl_key,
use_default_location => false,
www_root => $jitsimeet::www_root,
}
Nginx::Resource::Location {
server => $jitsimeet::jitsi_domain,
ssl => true,
ssl_only => true,
require => Nginx::Resource::Server[$jitsimeet::jitsi_domain],
}
nginx::resource::location { "${jitsimeet::jitsi_domain} config.js":
location => '/config.js',
location_alias => "/etc/jitsi/meet/${jitsimeet::jitsi_domain}-config.js",
}
nginx::resource::location { "${jitsimeet::jitsi_domain} interface_config.js":
location => '/interface_config.js',
location_alias => "/etc/jitsi/meet/${jitsimeet::jitsi_domain}-interface_config.js",
}
nginx::resource::location { "${jitsimeet::jitsi_domain} external_api.js":
location => '/external_api.js',
location_alias => '/usr/share/jitsi-meet/libs/external_api.min.js',
}
nginx::resource::location { "${jitsimeet::jitsi_domain} default":
location => '/',
location_cfg_append => {
ssi => 'on',
},
}
nginx::resource::location { "${jitsimeet::jitsi_domain} rewrite":
location => ' ~ ^/([a-zA-Z0-9=\?]+)$',
rewrite_rules => [
'^/(.*)$ / break',
],
}
nginx::resource::location { "${jitsimeet::jitsi_domain} bosh":
location => '/http-bind',
proxy => 'http://localhost:5280/http-bind',
proxy_set_header => [
'X-Forwarded-For $remote_addr',
'Host $http_host',
],
}
}
|