dev/provisioning/modules/apache/manifests/params.pp
changeset 28 b0b56e0f8c7f
equal deleted inserted replaced
27:a2342f26c9de 28:b0b56e0f8c7f
       
     1 # Class: apache::params
       
     2 #
       
     3 # This class manages Apache parameters
       
     4 #
       
     5 # Parameters:
       
     6 # - The $user that Apache runs as
       
     7 # - The $group that Apache runs as
       
     8 # - The $apache_name is the name of the package and service on the relevant
       
     9 #   distribution
       
    10 # - The $php_package is the name of the package that provided PHP
       
    11 # - The $ssl_package is the name of the Apache SSL package
       
    12 # - The $apache_dev is the name of the Apache development libraries package
       
    13 # - The $conf_contents is the contents of the Apache configuration file
       
    14 #
       
    15 # Actions:
       
    16 #
       
    17 # Requires:
       
    18 #
       
    19 # Sample Usage:
       
    20 #
       
    21 class apache::params inherits ::apache::version {
       
    22   if($::fqdn) {
       
    23     $servername = $::fqdn
       
    24   } else {
       
    25     $servername = $::hostname
       
    26   }
       
    27 
       
    28   # The default error log level
       
    29   $log_level = 'warn'
       
    30   $use_optional_includes = false
       
    31 
       
    32   # should we use systemd module?
       
    33   $use_systemd = true
       
    34 
       
    35   $vhost_include_pattern = '*'
       
    36 
       
    37   if $::operatingsystem == 'Ubuntu' and $::lsbdistrelease == '10.04' {
       
    38     $verify_command = '/usr/sbin/apache2ctl -t'
       
    39   } else {
       
    40     $verify_command = '/usr/sbin/apachectl -t'
       
    41   }
       
    42   if $::osfamily == 'RedHat' or $::operatingsystem == 'amazon' {
       
    43     $user                 = 'apache'
       
    44     $group                = 'apache'
       
    45     $root_group           = 'root'
       
    46     $apache_name          = 'httpd'
       
    47     $service_name         = 'httpd'
       
    48     $httpd_dir            = '/etc/httpd'
       
    49     $server_root          = '/etc/httpd'
       
    50     $conf_dir             = "${httpd_dir}/conf"
       
    51     $confd_dir            = "${httpd_dir}/conf.d"
       
    52     $mod_dir              = "${httpd_dir}/conf.d"
       
    53     $mod_enable_dir       = undef
       
    54     $vhost_dir            = "${httpd_dir}/conf.d"
       
    55     $vhost_enable_dir     = undef
       
    56     $conf_file            = 'httpd.conf'
       
    57     $ports_file           = "${conf_dir}/ports.conf"
       
    58     $pidfile              = 'run/httpd.pid'
       
    59     $logroot              = '/var/log/httpd'
       
    60     $logroot_mode         = undef
       
    61     $lib_path             = 'modules'
       
    62     $mpm_module           = 'prefork'
       
    63     $dev_packages         = 'httpd-devel'
       
    64     $default_ssl_cert     = '/etc/pki/tls/certs/localhost.crt'
       
    65     $default_ssl_key      = '/etc/pki/tls/private/localhost.key'
       
    66     $ssl_certs_dir        = '/etc/pki/tls/certs'
       
    67     $passenger_conf_file  = 'passenger_extra.conf'
       
    68     $passenger_conf_package_file = 'passenger.conf'
       
    69     $passenger_root       = undef
       
    70     $passenger_ruby       = undef
       
    71     $passenger_default_ruby = undef
       
    72     $suphp_addhandler     = 'php5-script'
       
    73     $suphp_engine         = 'off'
       
    74     $suphp_configpath     = undef
       
    75     # NOTE: The module for Shibboleth is not available to RH/CentOS without an additional repository. http://wiki.aaf.edu.au/tech-info/sp-install-guide
       
    76     # NOTE: The auth_cas module isn't available to RH/CentOS without enabling EPEL.
       
    77     $mod_packages         = {
       
    78       'auth_cas'    => 'mod_auth_cas',
       
    79       'auth_kerb'   => 'mod_auth_kerb',
       
    80       'auth_mellon' => 'mod_auth_mellon',
       
    81       'authnz_ldap' => $::apache::version::distrelease ? {
       
    82         '7'     => 'mod_ldap',
       
    83         default => 'mod_authz_ldap',
       
    84       },
       
    85       'fastcgi'     => 'mod_fastcgi',
       
    86       'fcgid'       => 'mod_fcgid',
       
    87       'geoip'       => 'mod_geoip',
       
    88       'ldap'        => $::apache::version::distrelease ? {
       
    89         '7'     => 'mod_ldap',
       
    90         default => undef,
       
    91       },
       
    92       'pagespeed'   => 'mod-pagespeed-stable',
       
    93       'passenger'   => 'mod_passenger',
       
    94       'perl'        => 'mod_perl',
       
    95       'php5'        => $::apache::version::distrelease ? {
       
    96         '5'     => 'php53',
       
    97         default => 'php',
       
    98       },
       
    99       'proxy_html'  => 'mod_proxy_html',
       
   100       'python'      => 'mod_python',
       
   101       'security'    => 'mod_security',
       
   102       'shibboleth'  => 'shibboleth',
       
   103       'ssl'         => 'mod_ssl',
       
   104       'wsgi'        => 'mod_wsgi',
       
   105       'dav_svn'     => 'mod_dav_svn',
       
   106       'suphp'       => 'mod_suphp',
       
   107       'xsendfile'   => 'mod_xsendfile',
       
   108       'nss'         => 'mod_nss',
       
   109       'shib2'       => 'shibboleth',
       
   110     }
       
   111     $mod_libs             = {
       
   112       'php5' => 'libphp5.so',
       
   113       'nss'  => 'libmodnss.so',
       
   114     }
       
   115     $conf_template        = 'apache/httpd.conf.erb'
       
   116     $keepalive            = 'Off'
       
   117     $keepalive_timeout    = 15
       
   118     $max_keepalive_requests = 100
       
   119     $fastcgi_lib_path     = undef
       
   120     $mime_support_package = 'mailcap'
       
   121     $mime_types_config    = '/etc/mime.types'
       
   122     $docroot              = '/var/www/html'
       
   123     $alias_icons_path     = $::apache::version::distrelease ? {
       
   124       '7'     => '/usr/share/httpd/icons',
       
   125       default => '/var/www/icons',
       
   126     }
       
   127     $error_documents_path = $::apache::version::distrelease ? {
       
   128       '7'     => '/usr/share/httpd/error',
       
   129       default => '/var/www/error'
       
   130     }
       
   131     if $::osfamily == 'RedHat' {
       
   132       $wsgi_socket_prefix = '/var/run/wsgi'
       
   133     } else {
       
   134       $wsgi_socket_prefix = undef
       
   135     }
       
   136     $cas_cookie_path      = '/var/cache/mod_auth_cas/'
       
   137     $mellon_lock_file     = '/run/mod_auth_mellon/lock'
       
   138     $mellon_cache_size    = 100
       
   139     $mellon_post_directory = undef
       
   140     $modsec_crs_package   = 'mod_security_crs'
       
   141     $modsec_crs_path      = '/usr/lib/modsecurity.d'
       
   142     $modsec_dir           = '/etc/httpd/modsecurity.d'
       
   143     $modsec_secruleengine = 'On'
       
   144     $modsec_default_rules = [
       
   145       'base_rules/modsecurity_35_bad_robots.data',
       
   146       'base_rules/modsecurity_35_scanners.data',
       
   147       'base_rules/modsecurity_40_generic_attacks.data',
       
   148       'base_rules/modsecurity_41_sql_injection_attacks.data',
       
   149       'base_rules/modsecurity_50_outbound.data',
       
   150       'base_rules/modsecurity_50_outbound_malware.data',
       
   151       'base_rules/modsecurity_crs_20_protocol_violations.conf',
       
   152       'base_rules/modsecurity_crs_21_protocol_anomalies.conf',
       
   153       'base_rules/modsecurity_crs_23_request_limits.conf',
       
   154       'base_rules/modsecurity_crs_30_http_policy.conf',
       
   155       'base_rules/modsecurity_crs_35_bad_robots.conf',
       
   156       'base_rules/modsecurity_crs_40_generic_attacks.conf',
       
   157       'base_rules/modsecurity_crs_41_sql_injection_attacks.conf',
       
   158       'base_rules/modsecurity_crs_41_xss_attacks.conf',
       
   159       'base_rules/modsecurity_crs_42_tight_security.conf',
       
   160       'base_rules/modsecurity_crs_45_trojans.conf',
       
   161       'base_rules/modsecurity_crs_47_common_exceptions.conf',
       
   162       'base_rules/modsecurity_crs_49_inbound_blocking.conf',
       
   163       'base_rules/modsecurity_crs_50_outbound.conf',
       
   164       'base_rules/modsecurity_crs_59_outbound_blocking.conf',
       
   165       'base_rules/modsecurity_crs_60_correlation.conf'
       
   166     ]
       
   167   } elsif $::osfamily == 'Debian' {
       
   168     $user                = 'www-data'
       
   169     $group               = 'www-data'
       
   170     $root_group          = 'root'
       
   171     $apache_name         = 'apache2'
       
   172     $service_name        = 'apache2'
       
   173     $httpd_dir           = '/etc/apache2'
       
   174     $server_root         = '/etc/apache2'
       
   175     $conf_dir            = $httpd_dir
       
   176     $confd_dir           = "${httpd_dir}/conf.d"
       
   177     $mod_dir             = "${httpd_dir}/mods-available"
       
   178     $mod_enable_dir      = "${httpd_dir}/mods-enabled"
       
   179     $vhost_dir           = "${httpd_dir}/sites-available"
       
   180     $vhost_enable_dir    = "${httpd_dir}/sites-enabled"
       
   181     $conf_file           = 'apache2.conf'
       
   182     $ports_file          = "${conf_dir}/ports.conf"
       
   183     $pidfile             = "\${APACHE_PID_FILE}"
       
   184     $logroot             = '/var/log/apache2'
       
   185     $logroot_mode        = undef
       
   186     $lib_path            = '/usr/lib/apache2/modules'
       
   187     $mpm_module          = 'worker'
       
   188     $default_ssl_cert    = '/etc/ssl/certs/ssl-cert-snakeoil.pem'
       
   189     $default_ssl_key     = '/etc/ssl/private/ssl-cert-snakeoil.key'
       
   190     $ssl_certs_dir       = '/etc/ssl/certs'
       
   191     $suphp_addhandler    = 'x-httpd-php'
       
   192     $suphp_engine        = 'off'
       
   193     $suphp_configpath    = '/etc/php5/apache2'
       
   194     $mod_packages        = {
       
   195       'auth_cas'    => 'libapache2-mod-auth-cas',
       
   196       'auth_kerb'   => 'libapache2-mod-auth-kerb',
       
   197       'auth_mellon' => 'libapache2-mod-auth-mellon',
       
   198       'dav_svn'     => 'libapache2-svn',
       
   199       'fastcgi'     => 'libapache2-mod-fastcgi',
       
   200       'fcgid'       => 'libapache2-mod-fcgid',
       
   201       'geoip'       => 'libapache2-mod-geoip',
       
   202       'nss'         => 'libapache2-mod-nss',
       
   203       'pagespeed'   => 'mod-pagespeed-stable',
       
   204       'passenger'   => 'libapache2-mod-passenger',
       
   205       'perl'        => 'libapache2-mod-perl2',
       
   206       'php5'        => 'libapache2-mod-php5',
       
   207       'proxy_html'  => 'libapache2-mod-proxy-html',
       
   208       'python'      => 'libapache2-mod-python',
       
   209       'rpaf'        => 'libapache2-mod-rpaf',
       
   210       'security'    => 'libapache2-modsecurity',
       
   211       'suphp'       => 'libapache2-mod-suphp',
       
   212       'wsgi'        => 'libapache2-mod-wsgi',
       
   213       'xsendfile'   => 'libapache2-mod-xsendfile',
       
   214       'shib2'       => 'libapache2-mod-shib2',
       
   215     }
       
   216     $mod_libs             = {
       
   217       'php5' => 'libphp5.so',
       
   218     }
       
   219     $conf_template          = 'apache/httpd.conf.erb'
       
   220     $keepalive              = 'Off'
       
   221     $keepalive_timeout      = 15
       
   222     $max_keepalive_requests = 100
       
   223     $fastcgi_lib_path       = '/var/lib/apache2/fastcgi'
       
   224     $mime_support_package = 'mime-support'
       
   225     $mime_types_config    = '/etc/mime.types'
       
   226     if ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '13.10') >= 0) or ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '8') >= 0) {
       
   227       $docroot              = '/var/www/html'
       
   228     } else {
       
   229       $docroot              = '/var/www'
       
   230     }
       
   231     $cas_cookie_path      = '/var/cache/apache2/mod_auth_cas/'
       
   232     $mellon_lock_file     = undef
       
   233     $mellon_cache_size    = undef
       
   234     $mellon_post_directory = '/var/cache/apache2/mod_auth_mellon/'
       
   235     $modsec_crs_package   = 'modsecurity-crs'
       
   236     $modsec_crs_path      = '/usr/share/modsecurity-crs'
       
   237     $modsec_dir           = '/etc/modsecurity'
       
   238     $modsec_secruleengine = 'On'
       
   239     $modsec_default_rules = [
       
   240       'base_rules/modsecurity_35_bad_robots.data',
       
   241       'base_rules/modsecurity_35_scanners.data',
       
   242       'base_rules/modsecurity_40_generic_attacks.data',
       
   243       'base_rules/modsecurity_41_sql_injection_attacks.data',
       
   244       'base_rules/modsecurity_50_outbound.data',
       
   245       'base_rules/modsecurity_50_outbound_malware.data',
       
   246       'base_rules/modsecurity_crs_20_protocol_violations.conf',
       
   247       'base_rules/modsecurity_crs_21_protocol_anomalies.conf',
       
   248       'base_rules/modsecurity_crs_23_request_limits.conf',
       
   249       'base_rules/modsecurity_crs_30_http_policy.conf',
       
   250       'base_rules/modsecurity_crs_35_bad_robots.conf',
       
   251       'base_rules/modsecurity_crs_40_generic_attacks.conf',
       
   252       'base_rules/modsecurity_crs_41_sql_injection_attacks.conf',
       
   253       'base_rules/modsecurity_crs_41_xss_attacks.conf',
       
   254       'base_rules/modsecurity_crs_42_tight_security.conf',
       
   255       'base_rules/modsecurity_crs_45_trojans.conf',
       
   256       'base_rules/modsecurity_crs_47_common_exceptions.conf',
       
   257       'base_rules/modsecurity_crs_49_inbound_blocking.conf',
       
   258       'base_rules/modsecurity_crs_50_outbound.conf',
       
   259       'base_rules/modsecurity_crs_59_outbound_blocking.conf',
       
   260       'base_rules/modsecurity_crs_60_correlation.conf'
       
   261     ]
       
   262     $alias_icons_path     = '/usr/share/apache2/icons'
       
   263     $error_documents_path = '/usr/share/apache2/error'
       
   264     if ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '13.10') >= 0) or ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '8') >= 0) {
       
   265       $dev_packages        = ['libaprutil1-dev', 'libapr1-dev', 'apache2-dev']
       
   266     } else {
       
   267       $dev_packages        = ['libaprutil1-dev', 'libapr1-dev', 'apache2-prefork-dev']
       
   268     }
       
   269 
       
   270     #
       
   271     # Passenger-specific settings
       
   272     #
       
   273 
       
   274     $passenger_conf_file         = 'passenger.conf'
       
   275     $passenger_conf_package_file = undef
       
   276 
       
   277     case $::operatingsystem {
       
   278       'Ubuntu': {
       
   279         case $::lsbdistrelease {
       
   280           '12.04': {
       
   281             $passenger_root         = '/usr'
       
   282             $passenger_ruby         = '/usr/bin/ruby'
       
   283             $passenger_default_ruby = undef
       
   284           }
       
   285           '14.04': {
       
   286             $passenger_root         = '/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini'
       
   287             $passenger_ruby         = undef
       
   288             $passenger_default_ruby = '/usr/bin/ruby'
       
   289           }
       
   290           default: {
       
   291             # The following settings may or may not work on Ubuntu releases not
       
   292             # supported by this module.
       
   293             $passenger_root         = '/usr'
       
   294             $passenger_ruby         = '/usr/bin/ruby'
       
   295             $passenger_default_ruby = undef
       
   296           }
       
   297         }
       
   298       }
       
   299       'Debian': {
       
   300         case $::lsbdistcodename {
       
   301           'wheezy': {
       
   302             $passenger_root         = '/usr'
       
   303             $passenger_ruby         = '/usr/bin/ruby'
       
   304             $passenger_default_ruby = undef
       
   305           }
       
   306           'jessie': {
       
   307             $passenger_root         = '/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini'
       
   308             $passenger_ruby         = undef
       
   309             $passenger_default_ruby = '/usr/bin/ruby'
       
   310           }
       
   311           default: {
       
   312             # The following settings may or may not work on Debian releases not
       
   313             # supported by this module.
       
   314             $passenger_root         = '/usr'
       
   315             $passenger_ruby         = '/usr/bin/ruby'
       
   316             $passenger_default_ruby = undef
       
   317           }
       
   318         }
       
   319       }
       
   320     }
       
   321     $wsgi_socket_prefix = undef
       
   322   } elsif $::osfamily == 'FreeBSD' {
       
   323     $user             = 'www'
       
   324     $group            = 'www'
       
   325     $root_group       = 'wheel'
       
   326     $apache_name      = 'apache24'
       
   327     $service_name     = 'apache24'
       
   328     $httpd_dir        = '/usr/local/etc/apache24'
       
   329     $server_root      = '/usr/local'
       
   330     $conf_dir         = $httpd_dir
       
   331     $confd_dir        = "${httpd_dir}/Includes"
       
   332     $mod_dir          = "${httpd_dir}/Modules"
       
   333     $mod_enable_dir   = undef
       
   334     $vhost_dir        = "${httpd_dir}/Vhosts"
       
   335     $vhost_enable_dir = undef
       
   336     $conf_file        = 'httpd.conf'
       
   337     $ports_file       = "${conf_dir}/ports.conf"
       
   338     $pidfile          = '/var/run/httpd.pid'
       
   339     $logroot          = '/var/log/apache24'
       
   340     $logroot_mode     = undef
       
   341     $lib_path         = '/usr/local/libexec/apache24'
       
   342     $mpm_module       = 'prefork'
       
   343     $dev_packages     = undef
       
   344     $default_ssl_cert = '/usr/local/etc/apache24/server.crt'
       
   345     $default_ssl_key  = '/usr/local/etc/apache24/server.key'
       
   346     $ssl_certs_dir    = '/usr/local/etc/apache24'
       
   347     $passenger_conf_file = 'passenger.conf'
       
   348     $passenger_conf_package_file = undef
       
   349     $passenger_root   = '/usr/local/lib/ruby/gems/2.0/gems/passenger-4.0.58'
       
   350     $passenger_ruby   = '/usr/local/bin/ruby'
       
   351     $passenger_default_ruby = undef
       
   352     $suphp_addhandler = 'php5-script'
       
   353     $suphp_engine     = 'off'
       
   354     $suphp_configpath = undef
       
   355     $mod_packages     = {
       
   356       # NOTE: I list here only modules that are not included in www/apache24
       
   357       # NOTE: 'passenger' needs to enable APACHE_SUPPORT in make config
       
   358       # NOTE: 'php' needs to enable APACHE option in make config
       
   359       # NOTE: 'dav_svn' needs to enable MOD_DAV_SVN make config
       
   360       # NOTE: not sure where the shibboleth should come from
       
   361       'auth_kerb'  => 'www/mod_auth_kerb2',
       
   362       'fcgid'      => 'www/mod_fcgid',
       
   363       'passenger'  => 'www/rubygem-passenger',
       
   364       'perl'       => 'www/mod_perl2',
       
   365       'php5'       => 'www/mod_php5',
       
   366       'proxy_html' => 'www/mod_proxy_html',
       
   367       'python'     => 'www/mod_python3',
       
   368       'wsgi'       => 'www/mod_wsgi',
       
   369       'dav_svn'    => 'devel/subversion',
       
   370       'xsendfile'  => 'www/mod_xsendfile',
       
   371       'rpaf'       => 'www/mod_rpaf2',
       
   372       'shib2'      => 'security/shibboleth2-sp',
       
   373     }
       
   374     $mod_libs         = {
       
   375       'php5' => 'libphp5.so',
       
   376     }
       
   377     $conf_template        = 'apache/httpd.conf.erb'
       
   378     $keepalive            = 'Off'
       
   379     $keepalive_timeout    = 15
       
   380     $max_keepalive_requests = 100
       
   381     $fastcgi_lib_path     = undef # TODO: revisit
       
   382     $mime_support_package = 'misc/mime-support'
       
   383     $mime_types_config    = '/usr/local/etc/mime.types'
       
   384     $wsgi_socket_prefix   = undef
       
   385     $docroot              = '/usr/local/www/apache24/data'
       
   386     $alias_icons_path     = '/usr/local/www/apache24/icons'
       
   387     $error_documents_path = '/usr/local/www/apache24/error'
       
   388   } elsif $::osfamily == 'Gentoo' {
       
   389     $user             = 'apache'
       
   390     $group            = 'apache'
       
   391     $root_group       = 'wheel'
       
   392     $apache_name      = 'www-servers/apache'
       
   393     $service_name     = 'apache2'
       
   394     $httpd_dir        = '/etc/apache2'
       
   395     $server_root      = '/var/www'
       
   396     $conf_dir         = $httpd_dir
       
   397     $confd_dir        = "${httpd_dir}/conf.d"
       
   398     $mod_dir          = "${httpd_dir}/modules.d"
       
   399     $mod_enable_dir   = undef
       
   400     $vhost_dir        = "${httpd_dir}/vhosts.d"
       
   401     $vhost_enable_dir = undef
       
   402     $conf_file        = 'httpd.conf'
       
   403     $ports_file       = "${conf_dir}/ports.conf"
       
   404     $logroot          = '/var/log/apache2'
       
   405     $logroot_mode     = undef
       
   406     $lib_path         = '/usr/lib/apache2/modules'
       
   407     $mpm_module       = 'prefork'
       
   408     $dev_packages     = undef
       
   409     $default_ssl_cert = '/etc/ssl/apache2/server.crt'
       
   410     $default_ssl_key  = '/etc/ssl/apache2/server.key'
       
   411     $ssl_certs_dir    = '/etc/ssl/apache2'
       
   412     $passenger_root   = '/usr'
       
   413     $passenger_ruby   = '/usr/bin/ruby'
       
   414     $passenger_conf_file = 'passenger.conf'
       
   415     $passenger_conf_package_file = undef
       
   416     $passenger_default_ruby = undef
       
   417     $suphp_addhandler = 'x-httpd-php'
       
   418     $suphp_engine     = 'off'
       
   419     $suphp_configpath = '/etc/php5/apache2'
       
   420     $mod_packages     = {
       
   421       # NOTE: I list here only modules that are not included in www-servers/apache
       
   422       'auth_kerb'  => 'www-apache/mod_auth_kerb',
       
   423       'fcgid'      => 'www-apache/mod_fcgid',
       
   424       'passenger'  => 'www-apache/passenger',
       
   425       'perl'       => 'www-apache/mod_perl',
       
   426       'php5'       => 'dev-lang/php',
       
   427       'proxy_html' => 'www-apache/mod_proxy_html',
       
   428       'proxy_fcgi' => 'www-apache/mod_proxy_fcgi',
       
   429       'python'     => 'www-apache/mod_python',
       
   430       'wsgi'       => 'www-apache/mod_wsgi',
       
   431       'dav_svn'    => 'dev-vcs/subversion',
       
   432       'xsendfile'  => 'www-apache/mod_xsendfile',
       
   433       'rpaf'       => 'www-apache/mod_rpaf',
       
   434       'xml2enc'    => 'www-apache/mod_xml2enc',
       
   435     }
       
   436     $mod_libs         = {
       
   437       'php5' => 'libphp5.so',
       
   438     }
       
   439     $conf_template        = 'apache/httpd.conf.erb'
       
   440     $keepalive            = 'Off'
       
   441     $keepalive_timeout    = 15
       
   442     $max_keepalive_requests = 100
       
   443     $fastcgi_lib_path     = undef # TODO: revisit
       
   444     $mime_support_package = 'app-misc/mime-types'
       
   445     $mime_types_config    = '/etc/mime.types'
       
   446     $wsgi_socket_prefix   = undef
       
   447     $docroot              = '/var/www/localhost/htdocs'
       
   448     $alias_icons_path     = '/usr/share/apache2/icons'
       
   449     $error_documents_path = '/usr/share/apache2/error'
       
   450   } elsif $::osfamily == 'Suse' {
       
   451     $user                = 'wwwrun'
       
   452     $group               = 'wwwrun'
       
   453     $root_group          = 'root'
       
   454     $apache_name         = 'apache2'
       
   455     $service_name        = 'apache2'
       
   456     $httpd_dir           = '/etc/apache2'
       
   457     $server_root         = '/etc/apache2'
       
   458     $conf_dir            = $httpd_dir
       
   459     $confd_dir           = "${httpd_dir}/conf.d"
       
   460     $mod_dir             = "${httpd_dir}/mods-available"
       
   461     $mod_enable_dir      = "${httpd_dir}/mods-enabled"
       
   462     $vhost_dir           = "${httpd_dir}/sites-available"
       
   463     $vhost_enable_dir    = "${httpd_dir}/sites-enabled"
       
   464     $conf_file           = 'httpd.conf'
       
   465     $ports_file          = "${conf_dir}/ports.conf"
       
   466     $pidfile             = '/var/run/httpd2.pid'
       
   467     $logroot             = '/var/log/apache2'
       
   468     $logroot_mode        = undef
       
   469     $lib_path            = '/usr/lib64/apache2-prefork/'
       
   470     $mpm_module          = 'prefork'
       
   471     $default_ssl_cert    = '/etc/ssl/certs/ssl-cert-snakeoil.pem'
       
   472     $default_ssl_key     = '/etc/ssl/private/ssl-cert-snakeoil.key'
       
   473     $ssl_certs_dir       = '/etc/ssl/certs'
       
   474     $suphp_addhandler    = 'x-httpd-php'
       
   475     $suphp_engine        = 'off'
       
   476     $suphp_configpath    = '/etc/php5/apache2'
       
   477     $mod_packages        = {
       
   478       'auth_kerb'   => 'apache2-mod_auth_kerb',
       
   479       'fcgid'       => 'apache2-mod_fcgid',
       
   480       'perl'        => 'apache2-mod_perl',
       
   481       'php5'        => 'apache2-mod_php53',
       
   482       'python'      => 'apache2-mod_python',
       
   483     }
       
   484     $mod_libs             = {
       
   485       'php5' => 'libphp5.so',
       
   486     }
       
   487     $conf_template          = 'apache/httpd.conf.erb'
       
   488     $keepalive              = 'Off'
       
   489     $keepalive_timeout      = 15
       
   490     $max_keepalive_requests = 100
       
   491     $fastcgi_lib_path       = '/var/lib/apache2/fastcgi'
       
   492     $mime_support_package = 'aaa_base'
       
   493     $mime_types_config    = '/etc/mime.types'
       
   494     $docroot              = '/srv/www'
       
   495     $cas_cookie_path      = '/var/cache/apache2/mod_auth_cas/'
       
   496     $mellon_lock_file     = undef
       
   497     $mellon_cache_size    = undef
       
   498     $mellon_post_directory = undef
       
   499     $alias_icons_path     = '/usr/share/apache2/icons'
       
   500     $error_documents_path = '/usr/share/apache2/error'
       
   501     $dev_packages        = ['libapr-util1-devel', 'libapr1-devel']
       
   502 
       
   503     #
       
   504     # Passenger-specific settings
       
   505     #
       
   506 
       
   507     $passenger_conf_file          = 'passenger.conf'
       
   508     $passenger_conf_package_file  = undef
       
   509 
       
   510     $passenger_root               = '/usr'
       
   511     $passenger_ruby               = '/usr/bin/ruby'
       
   512     $passenger_default_ruby       = undef
       
   513     $wsgi_socket_prefix           = undef
       
   514 
       
   515   } else {
       
   516     fail("Class['apache::params']: Unsupported osfamily: ${::osfamily}")
       
   517   }
       
   518 }