2014-11-08 17:22:30 +01:00
|
|
|
class nginx::params {
|
|
|
|
### Operating System Configuration
|
|
|
|
case $::osfamily {
|
|
|
|
'Archlinux': {
|
|
|
|
$_pid = false
|
|
|
|
$_daemon_user = 'http'
|
|
|
|
}
|
|
|
|
'Debian': {
|
2014-11-17 16:15:01 +01:00
|
|
|
$_daemon_user = 'www-data'
|
2014-11-08 17:22:30 +01:00
|
|
|
}
|
|
|
|
'FreeBSD': {
|
|
|
|
$_conf_dir = '/usr/local/etc/nginx'
|
|
|
|
$_daemon_user = 'www'
|
|
|
|
$_root_group = 'wheel'
|
|
|
|
}
|
|
|
|
'Solaris': {
|
|
|
|
$_daemon_user = 'webservd'
|
|
|
|
}
|
|
|
|
default: {
|
|
|
|
## For cases not covered in $::osfamily
|
|
|
|
case $::operatingsystem {
|
|
|
|
'SmartOS': {
|
|
|
|
$_conf_dir = '/opt/local/etc/nginx'
|
|
|
|
$_daemon_user = 'www'
|
|
|
|
}
|
|
|
|
## True module defaults
|
|
|
|
default: {
|
|
|
|
$_conf_dir = '/etc/nginx'
|
|
|
|
$_daemon_user = 'nginx'
|
|
|
|
$_pid = '/var/run/nginx.pid'
|
|
|
|
$_root_group = 'root'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
### END Operating System Configuration
|
|
|
|
|
|
|
|
### Referenced Variables
|
2014-11-17 16:15:01 +01:00
|
|
|
$conf_dir = $_conf_dir
|
2014-11-08 17:22:30 +01:00
|
|
|
$log_dir = '/var/log/nginx'
|
|
|
|
$run_dir = '/var/nginx'
|
|
|
|
$temp_dir = '/tmp'
|
|
|
|
$pid = $_pid
|
|
|
|
|
|
|
|
$client_body_temp_path = "${run_dir}/client_body_temp"
|
|
|
|
$daemon_user = $_daemon_user
|
|
|
|
$global_owner = 'root'
|
|
|
|
$global_group = 'root'
|
|
|
|
$global_mode = '0644'
|
|
|
|
$http_access_log = "${log_dir}/access.log"
|
|
|
|
$nginx_error_log = "${log_dir}/error.log"
|
|
|
|
$root_group = $_root_group
|
|
|
|
$proxy_temp_path = "${run_dir}/proxy_temp_path"
|
|
|
|
$sites_available_owner = 'root'
|
|
|
|
$sites_available_group = 'root'
|
|
|
|
$sites_available_mode = '0644'
|
|
|
|
$super_user = true
|
|
|
|
### END Referenced Variables
|
|
|
|
}
|