diff --git a/README.md b/README.md index fc0c66b6..481cda31 100755 --- a/README.md +++ b/README.md @@ -1,1012 +1,1008 @@ # apache [Module description]: #module-description [Setup]: #setup [Beginning with Apache]: #beginning-with-apache [Usage]: #usage [Configuring virtual hosts]: #configuring-virtual-hosts [Configuring virtual hosts with SSL]: #configuring-virtual-hosts-with-ssl [Configuring virtual host port and address bindings]: #configuring-virtual-host-port-and-address-bindings [Configuring virtual hosts for apps and processors]: #configuring-virtual-hosts-for-apps-and-processors [Configuring IP-based virtual hosts]: #configuring-ip-based-virtual-hosts [Installing Apache modules]: #installing-apache-modules [Installing arbitrary modules]: #installing-arbitrary-modules [Installing specific modules]: #installing-specific-modules [Configuring FastCGI servers]: #configuring-fastcgi-servers-to-handle-php-files [Load balancing examples]: #load-balancing-examples [apache affects]: #what-the-apache-module-affects [Reference]: #reference [Limitations]: #limitations [Development]: #development [Contributing]: #contributing [`AddDefaultCharset`]: https://httpd.apache.org/docs/current/mod/core.html#adddefaultcharset [`add_listen`]: #add_listen [`Alias`]: https://httpd.apache.org/docs/current/mod/mod_alias.html#alias [`AliasMatch`]: https://httpd.apache.org/docs/current/mod/mod_alias.html#aliasmatch [aliased servers]: https://httpd.apache.org/docs/current/urlmapping.html [`AllowEncodedSlashes`]: https://httpd.apache.org/docs/current/mod/core.html#allowencodedslashes [`apache`]: #class-apache [`apache_version`]: #apache_version [`apache::balancer`]: #defined-type-apachebalancer [`apache::balancermember`]: #defined-type-apachebalancermember [`apache::fastcgi::server`]: #defined-type-apachefastcgiserver [`apache::mod`]: #defined-type-apachemod [`apache::mod::`]: #classes-apachemodmodule-name [`apache::mod::alias`]: #class-apachemodalias [`apache::mod::auth_cas`]: #class-apachemodauth_cas [`apache::mod::auth_mellon`]: #class-apachemodauth_mellon [`apache::mod::authn_dbd`]: #class-apachemodauthn_dbd [`apache::mod::authnz_ldap`]: #class-apachemodauthnz_ldap [`apache::mod::cluster`]: #class-apachemodcluster [`apache::mod::data]: #class-apachemoddata [`apache::mod::disk_cache`]: #class-apachemoddisk_cache [`apache::mod::dumpio`]: #class-apachemoddumpio [`apache::mod::event`]: #class-apachemodevent [`apache::mod::ext_filter`]: #class-apachemodext_filter [`apache::mod::geoip`]: #class-apachemodgeoip [`apache::mod::http2`]: #class-apachemodhttp2 [`apache::mod::itk`]: #class-apachemoditk [`apache::mod::jk`]: #class-apachemodjk [`apache::mod::ldap`]: #class-apachemodldap [`apache::mod::passenger`]: #class-apachemodpassenger [`apache::mod::peruser`]: #class-apachemodperuser [`apache::mod::prefork`]: #class-apachemodprefork [`apache::mod::proxy`]: #class-apachemodproxy [`apache::mod::proxy_balancer`]: #class-apachemodproxybalancer [`apache::mod::proxy_fcgi`]: #class-apachemodproxy_fcgi [`apache::mod::proxy_html`]: #class-apachemodproxy_html [`apache::mod::python`]: #class-apachemodpython [`apache::mod::security`]: #class-apachemodsecurity [`apache::mod::shib`]: #class-apachemodshib [`apache::mod::ssl`]: #class-apachemodssl [`apache::mod::status`]: #class-apachemodstatus [`apache::mod::userdir`]: #class-apachemoduserdir [`apache::mod::worker`]: #class-apachemodworker [`apache::mod::wsgi`]: #class-apachemodwsgi [`apache::params`]: #class-apacheparams [`apache::version`]: #class-apacheversion [`apache::vhost`]: #defined-type-apachevhost [`apache::vhost::custom`]: #defined-type-apachevhostcustom [`apache::vhost::WSGIImportScript`]: #wsgiimportscript [Apache HTTP Server]: https://httpd.apache.org [Apache modules]: https://httpd.apache.org/docs/current/mod/ [array]: https://docs.puppet.com/puppet/latest/reference/lang_data_array.html [audit log]: https://github.com/SpiderLabs/ModSecurity/wiki/ModSecurity-2-Data-Formats#audit-log [beaker-rspec]: https://github.com/puppetlabs/beaker-rspec [certificate revocation list]: https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslcarevocationfile [certificate revocation list path]: https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslcarevocationpath [common gateway interface]: https://httpd.apache.org/docs/current/howto/cgi.html [`confd_dir`]: #confd_dir [`content`]: #content [CONTRIBUTING.md]: CONTRIBUTING.md [custom error documents]: https://httpd.apache.org/docs/current/custom-error.html [`custom_fragment`]: #custom_fragment [`default_mods`]: #default_mods [`default_ssl_crl`]: #default_ssl_crl [`default_ssl_crl_path`]: #default_ssl_crl_path [`default_ssl_vhost`]: #default_ssl_vhost [`dev_packages`]: #dev_packages [`directory`]: #directory [`directories`]: #parameter-directories-for-apachevhost [`DirectoryIndex`]: https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex [`docroot`]: #docroot [`docroot_owner`]: #docroot_owner [`docroot_group`]: #docroot_group [`DocumentRoot`]: https://httpd.apache.org/docs/current/mod/core.html#documentroot [`EnableSendfile`]: https://httpd.apache.org/docs/current/mod/core.html#enablesendfile [enforcing mode]: http://selinuxproject.org/page/Guide/Mode [`ensure`]: https://docs.puppet.com/latest/type.html#package-attribute-ensure [`error_log_file`]: #error_log_file [`error_log_syslog`]: #error_log_syslog [`error_log_pipe`]: #error_log_pipe [`ExpiresByType`]: https://httpd.apache.org/docs/current/mod/mod_expires.html#expiresbytype [exported resources]: http://docs.puppet.com/latest/reference/lang_exported.md [`ExtendedStatus`]: https://httpd.apache.org/docs/current/mod/core.html#extendedstatus [Facter]: http://docs.puppet.com/facter/ [FastCGI]: http://www.fastcgi.com/ [FallbackResource]: https://httpd.apache.org/docs/current/mod/mod_dir.html#fallbackresource [`fallbackresource`]: #fallbackresource [`FileETag`]: https://httpd.apache.org/docs/current/mod/core.html#fileetag [filter rules]: https://httpd.apache.org/docs/current/filter.html [`filters`]: #filters [`ForceType`]: https://httpd.apache.org/docs/current/mod/core.html#forcetype [GeoIPScanProxyHeaders]: http://dev.maxmind.com/geoip/legacy/mod_geoip2/#Proxy-Related_Directives [`gentoo/puppet-portage`]: https://github.com/gentoo/puppet-portage [Hash]: https://docs.puppet.com/puppet/latest/reference/lang_data_hash.html [`HttpProtocolOptions`]: http://httpd.apache.org/docs/current/mod/core.html#httpprotocoloptions [IAC Team]: https://puppetlabs.github.io/iac/ [`IncludeOptional`]: https://httpd.apache.org/docs/current/mod/core.html#includeoptional [`Include`]: https://httpd.apache.org/docs/current/mod/core.html#include [interval syntax]: https://httpd.apache.org/docs/current/mod/mod_expires.html#AltSyn [`ip`]: #ip [`ip_based`]: #ip_based [IP-based virtual hosts]: https://httpd.apache.org/docs/current/vhosts/ip-based.html [`KeepAlive`]: https://httpd.apache.org/docs/current/mod/core.html#keepalive [`KeepAliveTimeout`]: https://httpd.apache.org/docs/current/mod/core.html#keepalivetimeout [`keepalive` parameter]: #keepalive [`keepalive_timeout`]: #keepalive_timeout [`limitreqfieldsize`]: https://httpd.apache.org/docs/current/mod/core.html#limitrequestfieldsize [`limitreqfields`]: http://httpd.apache.org/docs/current/mod/core.html#limitrequestfields [`lib`]: #lib [`lib_path`]: #lib_path [`Listen`]: https://httpd.apache.org/docs/current/bind.html [`ListenBackLog`]: https://httpd.apache.org/docs/current/mod/mpm_common.html#listenbacklog [`LoadFile`]: https://httpd.apache.org/docs/current/mod/mod_so.html#loadfile [`LogFormat`]: https://httpd.apache.org/docs/current/mod/mod_log_config.html#logformat [`logroot`]: #logroot [Log security]: https://httpd.apache.org/docs/current/logs.html#security [`manage_docroot`]: #manage_docroot [`manage_user`]: #manage_user [`manage_group`]: #manage_group [`supplementary_groups`]: #supplementary_groups [`MaxConnectionsPerChild`]: https://httpd.apache.org/docs/current/mod/mpm_common.html#maxconnectionsperchild [`max_keepalive_requests`]: #max_keepalive_requests [`MaxRequestWorkers`]: https://httpd.apache.org/docs/current/mod/mpm_common.html#maxrequestworkers [`MaxSpareThreads`]: https://httpd.apache.org/docs/current/mod/mpm_common.html#maxsparethreads [MIME `content-type`]: https://www.iana.org/assignments/media-types/media-types.xhtml [`MinSpareThreads`]: https://httpd.apache.org/docs/current/mod/mpm_common.html#minsparethreads [`mod_alias`]: https://httpd.apache.org/docs/current/mod/mod_alias.html [`mod_auth_cas`]: https://github.com/Jasig/mod_auth_cas [`mod_auth_kerb`]: http://modauthkerb.sourceforge.net/configure.html [`mod_auth_gssapi`]: https://github.com/modauthgssapi/mod_auth_gssapi [`mod_authnz_external`]: https://github.com/phokz/mod-auth-external [`mod_auth_dbd`]: http://httpd.apache.org/docs/current/mod/mod_authn_dbd.html [`mod_auth_mellon`]: https://github.com/UNINETT/mod_auth_mellon [`mod_dbd`]: http://httpd.apache.org/docs/current/mod/mod_dbd.html [`mod_disk_cache`]: https://httpd.apache.org/docs/2.2/mod/mod_disk_cache.html [`mod_dumpio`]: https://httpd.apache.org/docs/2.4/mod/mod_dumpio.html [`mod_env`]: http://httpd.apache.org/docs/current/mod/mod_env.html [`mod_expires`]: https://httpd.apache.org/docs/current/mod/mod_expires.html [`mod_ext_filter`]: https://httpd.apache.org/docs/current/mod/mod_ext_filter.html [`mod_fcgid`]: https://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html [`mod_geoip`]: http://dev.maxmind.com/geoip/legacy/mod_geoip2/ [`mod_http2`]: https://httpd.apache.org/docs/current/mod/mod_http2.html [`mod_info`]: https://httpd.apache.org/docs/current/mod/mod_info.html [`mod_ldap`]: https://httpd.apache.org/docs/2.2/mod/mod_ldap.html [`mod_mpm_event`]: https://httpd.apache.org/docs/current/mod/event.html [`mod_negotiation`]: https://httpd.apache.org/docs/current/mod/mod_negotiation.html [`mod_pagespeed`]: https://developers.google.com/speed/pagespeed/module/?hl=en [`mod_passenger`]: https://www.phusionpassenger.com/library/config/apache/reference/ [`mod_php`]: http://php.net/manual/en/book.apache.php [`mod_proxy`]: https://httpd.apache.org/docs/current/mod/mod_proxy.html [`mod_proxy_balancer`]: https://httpd.apache.org/docs/current/mod/mod_proxy_balancer.html [`mod_reqtimeout`]: https://httpd.apache.org/docs/current/mod/mod_reqtimeout.html [`mod_python`]: http://modpython.org/ [`mod_rewrite`]: https://httpd.apache.org/docs/current/mod/mod_rewrite.html [`mod_security`]: https://www.modsecurity.org/ [`mod_ssl`]: https://httpd.apache.org/docs/current/mod/mod_ssl.html [`mod_status`]: https://httpd.apache.org/docs/current/mod/mod_status.html [`mod_version`]: https://httpd.apache.org/docs/current/mod/mod_version.html [`mod_wsgi`]: https://modwsgi.readthedocs.org/en/latest/ [module contribution guide]: https://docs.puppet.com/forge/contributing.html [`mpm_module`]: #mpm_module [multi-processing module]: https://httpd.apache.org/docs/current/mpm.html [name-based virtual hosts]: https://httpd.apache.org/docs/current/vhosts/name-based.html [`no_proxy_uris`]: #no_proxy_uris [open source Puppet]: https://docs.puppet.com/puppet/ [`Options`]: https://httpd.apache.org/docs/current/mod/core.html#options [`path`]: #path [`Peruser`]: https://www.freebsd.org/cgi/url.cgi?ports/www/apache22-peruser-mpm/pkg-descr [`port`]: #port [`priority`]: #defined-types-apachevhost [`proxy_dest`]: #proxy_dest [`proxy_dest_match`]: #proxy_dest_match [`proxy_pass`]: #proxy_pass [`ProxyPass`]: https://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypass [`ProxySet`]: https://httpd.apache.org/docs/current/mod/mod_proxy.html#proxyset [Puppet Enterprise]: https://docs.puppet.com/pe/ [Puppet Forge]: https://forge.puppet.com [Puppet]: https://puppet.com [Puppet module]: https://docs.puppet.com/puppet/latest/reference/modules_fundamentals.html [Puppet module's code]: https://github.com/puppetlabs/puppetlabs-apache/blob/main/manifests/default_mods.pp [`purge_configs`]: #purge_configs [`purge_vhost_dir`]: #purge_vhost_dir [Python]: https://www.python.org/ [Rack]: http://rack.github.io/ [`rack_base_uris`]: #rack_base_uris [RFC 2616]: https://www.ietf.org/rfc/rfc2616.txt [`RequestReadTimeout`]: https://httpd.apache.org/docs/current/mod/mod_reqtimeout.html#requestreadtimeout [rspec-puppet]: http://rspec-puppet.com/ [`ScriptAlias`]: https://httpd.apache.org/docs/current/mod/mod_alias.html#scriptalias [`ScriptAliasMatch`]: https://httpd.apache.org/docs/current/mod/mod_alias.html#scriptaliasmatch [`scriptalias`]: #scriptalias [SELinux]: http://selinuxproject.org/ [`ServerAdmin`]: https://httpd.apache.org/docs/current/mod/core.html#serveradmin [`serveraliases`]: #serveraliases [`ServerLimit`]: https://httpd.apache.org/docs/current/mod/mpm_common.html#serverlimit [`ServerName`]: https://httpd.apache.org/docs/current/mod/core.html#servername [`ServerRoot`]: https://httpd.apache.org/docs/current/mod/core.html#serverroot [`ServerTokens`]: https://httpd.apache.org/docs/current/mod/core.html#servertokens [`ServerSignature`]: https://httpd.apache.org/docs/current/mod/core.html#serversignature [Service attribute restart]: http://docs.puppet.com/latest/type.html#service-attribute-restart [`source`]: #source [`SSLCARevocationCheck`]: https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslcarevocationcheck [SSL certificate key file]: https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslcertificatekeyfile [SSL chain]: https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslcertificatechainfile [SSL encryption]: https://httpd.apache.org/docs/current/ssl/index.html [`ssl`]: #ssl [`ssl_cert`]: #ssl_cert [`ssl_compression`]: #ssl_compression [`ssl_key`]: #ssl_key [`StartServers`]: https://httpd.apache.org/docs/current/mod/mpm_common.html#startservers [suPHP]: http://www.suphp.org/Home.html [`suphp_addhandler`]: #suphp_addhandler [`suphp_configpath`]: #suphp_configpath [`suphp_engine`]: #suphp_engine [supported operating system]: https://forge.puppet.com/supported#puppet-supported-modules-compatibility-matrix [`ThreadLimit`]: https://httpd.apache.org/docs/current/mod/mpm_common.html#threadlimit [`ThreadsPerChild`]: https://httpd.apache.org/docs/current/mod/mpm_common.html#threadsperchild [`TimeOut`]: https://httpd.apache.org/docs/current/mod/core.html#timeout [template]: http://docs.puppet.com/puppet/latest/reference/lang_template.html [`TraceEnable`]: https://httpd.apache.org/docs/current/mod/core.html#traceenable [`UseCanonicalName`]: https://httpd.apache.org/docs/current/mod/core.html#usecanonicalname [`verify_config`]: #verify_config [`vhost`]: #defined-type-apachevhost [`vhost_dir`]: #vhost_dir [`virtual_docroot`]: #virtual_docroot [Web Server Gateway Interface]: https://www.python.org/dev/peps/pep-3333/#abstract [`WSGIRestrictEmbedded`]: http://modwsgi.readthedocs.io/en/develop/configuration-directives/WSGIRestrictEmbedded.html [`WSGIPythonPath`]: http://modwsgi.readthedocs.org/en/develop/configuration-directives/WSGIPythonPath.html [`WSGIPythonHome`]: http://modwsgi.readthedocs.org/en/develop/configuration-directives/WSGIPythonHome.html [`WSGIApplicationGroup`]: https://modwsgi.readthedocs.io/en/develop/configuration-directives/WSGIApplicationGroup.html [`WSGIPythonOptimize`]: https://modwsgi.readthedocs.io/en/develop/configuration-directives/WSGIPythonOptimize.html #### Table of Contents 1. [Module description - What is the apache module, and what does it do?][Module description] 2. [Setup - The basics of getting started with apache][Setup] - [What the apache module affects][apache affects] - [Beginning with Apache - Installation][Beginning with Apache] 3. [Usage - The classes and defined types available for configuration][Usage] - [Configuring virtual hosts - Examples to help get started][Configuring virtual hosts] - [Configuring FastCGI servers to handle PHP files][Configuring FastCGI servers] - [Load balancing with exported and non-exported resources][Load balancing examples] 4. [Reference - An under-the-hood peek at what the module is doing and how][Reference] 5. [Limitations - OS compatibility, etc.][Limitations] 6. [Development - Guide for contributing to the module][Development] - [Contributing to the apache module][Contributing] ## Module description [Apache HTTP Server][] (also called Apache HTTPD, or simply Apache) is a widely used web server. This [Puppet module][] simplifies the task of creating configurations to manage Apache servers in your infrastructure. It can configure and manage a range of virtual host setups and provides a streamlined way to install and configure [Apache modules][]. ## Setup ### What the apache module affects: - Configuration files and directories (created and written to) - **WARNING**: Configurations *not* managed by Puppet will be purged. - Package/service/configuration files for Apache - Apache modules - Virtual hosts - Listened-to ports - `/etc/make.conf` on FreeBSD and Gentoo On Gentoo, this module depends on the [`gentoo/puppet-portage`][] Puppet module. Note that while several options apply or enable certain features and settings for Gentoo, it is not a [supported operating system][] for this module. > **Warning**: This module modifies Apache configuration files and directories and purges any configuration not managed by Puppet. Apache configuration should be managed by Puppet, as unmanaged configuration files can cause unexpected failures. > >To temporarily disable full Puppet management, set the [`purge_configs`][] parameter in the [`apache`][] class declaration to false. We recommend this only as a temporary means of saving and relocating customized configurations. ### Beginning with Apache To have Puppet install Apache with the default parameters, declare the [`apache`][] class: ``` puppet class { 'apache': } ``` When you declare this class with the default options, the module: - Installs the appropriate Apache software package and [required Apache modules](#default_mods) for your operating system. - Places the required configuration files in a directory, with the [default location](#conf_dir) Depends on operating system. - Configures the server with a default virtual host and standard port ('80') and address ('\*') bindings. - Creates a document root directory Depends on operating system, typically `/var/www`. - Starts the Apache service. Apache defaults depend on your operating system. These defaults work in testing environments but are not suggested for production. We recommend customizing the class's parameters to suit your site. For instance, this declaration installs Apache without the apache module's [default virtual host configuration][Configuring virtual hosts], allowing you to customize all Apache virtual hosts: ``` puppet class { 'apache': default_vhost => false, } ``` > **Note**: When `default_vhost` is set to `false`, you have to add at least one `apache::vhost` resource or Apache will not start. To establish a default virtual host, either set the `default_vhost` in the `apache` class or use the [`apache::vhost`][] defined type. You can also configure additional specific virtual hosts with the [`apache::vhost`][] defined type. ## Usage ### Configuring virtual hosts The default [`apache`][] class sets up a virtual host on port 80, listening on all interfaces and serving the [`docroot`][] parameter's default directory of `/var/www`. To configure basic [name-based virtual hosts][], specify the [`port`][] and [`docroot`][] parameters in the [`apache::vhost`][] defined type: ``` puppet apache::vhost { 'vhost.example.com': port => '80', docroot => '/var/www/vhost', } ``` See the [`apache::vhost`][] defined type's reference for a list of all virtual host parameters. > **Note**: Apache processes virtual hosts in alphabetical order, and server administrators can prioritize Apache's virtual host processing by prefixing a virtual host's configuration file name with a number. The [`apache::vhost`][] defined type applies a default [`priority`][] of 25, which Puppet interprets by prefixing the virtual host's file name with `25-`. This means that if multiple sites have the same priority, or if you disable priority numbers by setting the `priority` parameter's value to false, Apache still processes virtual hosts in alphabetical order. To configure user and group ownership for `docroot`, use the [`docroot_owner`][] and [`docroot_group`][] parameters: ``` puppet apache::vhost { 'user.example.com': port => '80', docroot => '/var/www/user', docroot_owner => 'www-data', docroot_group => 'www-data', } ``` #### Configuring virtual hosts with SSL To configure a virtual host to use [SSL encryption][] and default SSL certificates, set the [`ssl`][] parameter. You must also specify the [`port`][] parameter, typically with a value of '443', to accommodate HTTPS requests: ``` puppet apache::vhost { 'ssl.example.com': port => '443', docroot => '/var/www/ssl', ssl => true, } ``` To configure a virtual host to use SSL and specific SSL certificates, use the paths to the certificate and key in the [`ssl_cert`][] and [`ssl_key`][] parameters, respectively: ``` puppet apache::vhost { 'cert.example.com': port => '443', docroot => '/var/www/cert', ssl => true, ssl_cert => '/etc/ssl/fourth.example.com.cert', ssl_key => '/etc/ssl/fourth.example.com.key', } ``` To configure a mix of SSL and unencrypted virtual hosts at the same domain, declare them with separate [`apache::vhost`][] defined types: ``` puppet # The non-ssl virtual host apache::vhost { 'mix.example.com non-ssl': servername => 'mix.example.com', port => '80', docroot => '/var/www/mix', } # The SSL virtual host at the same domain apache::vhost { 'mix.example.com ssl': servername => 'mix.example.com', port => '443', docroot => '/var/www/mix', ssl => true, } ``` To configure a virtual host to redirect unencrypted connections to SSL, declare them with separate [`apache::vhost`][] defined types and redirect unencrypted requests to the virtual host with SSL enabled: ``` puppet apache::vhost { 'redirect.example.com non-ssl': servername => 'redirect.example.com', port => '80', docroot => '/var/www/redirect', redirect_status => 'permanent', redirect_dest => 'https://redirect.example.com/' } apache::vhost { 'redirect.example.com ssl': servername => 'redirect.example.com', port => '443', docroot => '/var/www/redirect', ssl => true, } ``` #### Configuring virtual host port and address bindings Virtual hosts listen on all IP addresses ('\*') by default. To configure the virtual host to listen on a specific IP address, use the [`ip`][] parameter: ``` puppet apache::vhost { 'ip.example.com': ip => '127.0.0.1', port => '80', docroot => '/var/www/ip', } ``` You can also configure more than one IP address per virtual host by using an array of IP addresses for the [`ip`][] parameter: ``` puppet apache::vhost { 'ip.example.com': ip => ['127.0.0.1','169.254.1.1'], port => '80', docroot => '/var/www/ip', } ``` You can configure multiple ports per virtual host by using an array of ports for the [`port`][] parameter: ``` puppet apache::vhost { 'ip.example.com': ip => ['127.0.0.1'], port => ['80','8080'] docroot => '/var/www/ip', } ``` To configure a virtual host with [aliased servers][], refer to the aliases using the [`serveraliases`][] parameter: ``` puppet apache::vhost { 'aliases.example.com': serveraliases => [ 'aliases.example.org', 'aliases.example.net', ], port => '80', docroot => '/var/www/aliases', } ``` To set up a virtual host with a wildcard alias for the subdomain mapped to a directory of the same name, such as 'http://example.com.loc' mapped to `/var/www/example.com`, define the wildcard alias using the [`serveraliases`][] parameter and the document root with the [`virtual_docroot`][] parameter: ``` puppet apache::vhost { 'subdomain.loc': vhost_name => '*', port => '80', virtual_docroot => '/var/www/%-2+', docroot => '/var/www', serveraliases => ['*.loc',], } ``` To configure a virtual host with [filter rules][], pass the filter directives as an [array][] using the [`filters`][] parameter: ``` puppet apache::vhost { 'subdomain.loc': port => '80', filters => [ 'FilterDeclare COMPRESS', 'FilterProvider COMPRESS DEFLATE resp=Content-Type $text/html', 'FilterChain COMPRESS', 'FilterProtocol COMPRESS DEFLATE change=yes;byteranges=no', ], docroot => '/var/www/html', } ``` #### Configuring virtual hosts for apps and processors To set up a virtual host with [suPHP][], use the following parameters: * [`suphp_engine`][], to enable the suPHP engine. * [`suphp_addhandler`][], to define a MIME type. * [`suphp_configpath`][], to set which path suPHP passes to the PHP interpreter. * [`directory`][], to configure Directory, File, and Location directive blocks. For example: ``` puppet apache::vhost { 'suphp.example.com': port => '80', docroot => '/home/appuser/myphpapp', suphp_addhandler => 'x-httpd-php', suphp_engine => 'on', suphp_configpath => '/etc/php5/apache2', directories => [ { 'path' => '/home/appuser/myphpapp', 'suphp' => { user => 'myappuser', group => 'myappgroup', }, }, ], } ``` To configure a virtual host to use the [Web Server Gateway Interface][] (WSGI) for [Python][] applications, use the `wsgi` set of parameters: ``` puppet apache::vhost { 'wsgi.example.com': port => '80', docroot => '/var/www/pythonapp', wsgi_application_group => '%{GLOBAL}', wsgi_daemon_process => 'wsgi', wsgi_daemon_process_options => { processes => '2', threads => '15', display-name => '%{GROUP}', }, wsgi_import_script => '/var/www/demo.wsgi', wsgi_import_script_options => { process-group => 'wsgi', application-group => '%{GLOBAL}', }, wsgi_process_group => 'wsgi', wsgi_script_aliases => { '/' => '/var/www/demo.wsgi' }, } ``` As of Apache 2.2.16, Apache supports [FallbackResource][], a simple replacement for common RewriteRules. You can set a FallbackResource using the [`fallbackresource`][] parameter: ``` puppet apache::vhost { 'wordpress.example.com': port => '80', docroot => '/var/www/wordpress', fallbackresource => '/index.php', } ``` > **Note**: The `fallbackresource` parameter only supports the 'disabled' value since Apache 2.2.24. To configure a virtual host with a designated directory for [Common Gateway Interface][] (CGI) files, use the [`scriptalias`][] parameter to define the `cgi-bin` path: ``` puppet apache::vhost { 'cgi.example.com': port => '80', docroot => '/var/www/cgi', scriptalias => '/usr/lib/cgi-bin', } ``` To configure a virtual host for [Rack][], use the [`rack_base_uris`][] parameter: ``` puppet apache::vhost { 'rack.example.com': port => '80', docroot => '/var/www/rack', rack_base_uris => ['/rackapp1', '/rackapp2'], } ``` #### Configuring IP-based virtual hosts You can configure [IP-based virtual hosts][] to listen on any port and have them respond to requests on specific IP addresses. In this example, the server listens on ports 80 and 81, because the example virtual hosts are _not_ declared with a [`port`][] parameter: ``` puppet apache::listen { '80': } apache::listen { '81': } ``` Configure the IP-based virtual hosts with the [`ip_based`][] parameter: ``` puppet apache::vhost { 'first.example.com': ip => '10.0.0.10', docroot => '/var/www/first', ip_based => true, } apache::vhost { 'second.example.com': ip => '10.0.0.11', docroot => '/var/www/second', ip_based => true, } ``` You can also configure a mix of IP- and [name-based virtual hosts][] in any combination of [SSL][SSL encryption] and unencrypted configurations. In this example, we add two IP-based virtual hosts on an IP address (in this example, 10.0.0.10). One uses SSL and the other is unencrypted: ``` puppet apache::vhost { 'The first IP-based virtual host, non-ssl': servername => 'first.example.com', ip => '10.0.0.10', port => '80', ip_based => true, docroot => '/var/www/first', } apache::vhost { 'The first IP-based vhost, ssl': servername => 'first.example.com', ip => '10.0.0.10', port => '443', ip_based => true, docroot => '/var/www/first-ssl', ssl => true, } ``` Next, we add two name-based virtual hosts listening on a second IP address (10.0.0.20): ``` puppet apache::vhost { 'second.example.com': ip => '10.0.0.20', port => '80', docroot => '/var/www/second', } apache::vhost { 'third.example.com': ip => '10.0.0.20', port => '80', docroot => '/var/www/third', } ``` To add name-based virtual hosts that answer on either 10.0.0.10 or 10.0.0.20, you **must** disable the Apache default `Listen 80`, as it conflicts with the preceding IP-based virtual hosts. To do this, set the [`add_listen`][] parameter to `false`: ``` puppet apache::vhost { 'fourth.example.com': port => '80', docroot => '/var/www/fourth', add_listen => false, } apache::vhost { 'fifth.example.com': port => '80', docroot => '/var/www/fifth', add_listen => false, } ``` ### Installing Apache modules There are two ways to install [Apache modules][] using the Puppet apache module: - Use the [`apache::mod::`][] classes to [install specific Apache modules with parameters][Installing specific modules]. - Use the [`apache::mod`][] defined type to [install arbitrary Apache modules][Installing arbitrary modules]. #### Installing specific modules The Puppet apache module supports installing many common [Apache modules][], often with parameterized configuration options. For a list of supported Apache modules, see the [`apache::mod::`][] class references. For example, you can install the `mod_ssl` Apache module with default settings by declaring the [`apache::mod::ssl`][] class: ``` puppet class { 'apache::mod::ssl': } ``` [`apache::mod::ssl`][] has several parameterized options that you can set when declaring it. For instance, to enable `mod_ssl` with compression enabled, set the [`ssl_compression`][] parameter to true: ``` puppet class { 'apache::mod::ssl': ssl_compression => true, } ``` Note that some modules have prerequisites, which are documented in their references under [`apache::mod::`][]. #### Installing arbitrary modules You can pass the name of any module that your operating system's package manager can install to the [`apache::mod`][] defined type to install it. Unlike the specific-module classes, the [`apache::mod`][] defined type doesn't tailor the installation based on other installed modules or with specific parameters---Puppet only grabs and installs the module's package, leaving detailed configuration up to you. For example, to install the [`mod_authnz_external`][] Apache module, declare the defined type with the 'mod_authnz_external' name: ``` puppet apache::mod { 'mod_authnz_external': } ``` There are several optional parameters you can specify when defining Apache modules this way. See the [defined type's reference][`apache::mod`] for details. ### Configuring FastCGI servers to handle PHP files #### FastCGI on Ubuntu 18.04 On Ubuntu 18.04, `mod_fastcgi` is no longer supported. So considering: * an Apache Vhost with docroot set to `/var/www/html` * a FastCGI server listening on `127.0.0.1:9000` you can then use the [`custom_fragment`][] parameter to configure the virtual host to have the FastCGI server handle the specified file type: ``` puppet apache::vhost { 'www': ... docroot => '/var/www/html/', custom_fragment => 'ProxyPassMatch ^/(.*\.php)$ fcgi://127.0.0.1:9000/var/www/html/$1', ... } ``` Please note you have to adjust the second ProxyPassMatch parameter to you docroot value (here `/var/www/html/`). #### Other OSes Add the [`apache::fastcgi::server`][] defined type to allow [FastCGI][] servers to handle requests for specific files. For example, the following defines a FastCGI server at 127.0.0.1 (localhost) on port 9000 to handle PHP requests: ``` puppet apache::fastcgi::server { 'php': host => '127.0.0.1:9000', timeout => 15, flush => false, faux_path => '/var/www/php.fcgi', fcgi_alias => '/php.fcgi', file_type => 'application/x-httpd-php' } ``` You can then use the [`custom_fragment`][] parameter to configure the virtual host to have the FastCGI server handle the specified file type: ``` puppet apache::vhost { 'www': ... custom_fragment => 'AddType application/x-httpd-php .php' ... } ``` ### Load balancing examples Apache supports load balancing across groups of servers through the [`mod_proxy`][] Apache module. Puppet supports configuring Apache load balancing groups (also known as balancer clusters) through the [`apache::balancer`][] and [`apache::balancermember`][] defined types. To enable load balancing with [exported resources][], export the [`apache::balancermember`][] defined type from the load balancer member server: ``` puppet @@apache::balancermember { "${::fqdn}-puppet00": balancer_cluster => 'puppet00', url => "ajp://${::fqdn}:8009", options => ['ping=5', 'disablereuse=on', 'retry=5', 'ttl=120'], } ``` Then, on the proxy server, create the load balancing group: ``` puppet apache::balancer { 'puppet00': } ``` To enable load balancing without exporting resources, declare the following on the proxy server: ``` puppet apache::balancer { 'puppet00': } apache::balancermember { "${::fqdn}-puppet00": balancer_cluster => 'puppet00', url => "ajp://${::fqdn}:8009", options => ['ping=5', 'disablereuse=on', 'retry=5', 'ttl=120'], } ``` Then declare the `apache::balancer` and `apache::balancermember` defined types on the proxy server. To use the [ProxySet](https://httpd.apache.org/docs/current/mod/mod_proxy.html#proxyset) directive on the balancer, use the [`proxy_set`](#proxy_set) parameter of `apache::balancer`: ``` puppet apache::balancer { 'puppet01': proxy_set => { 'stickysession' => 'JSESSIONID', 'lbmethod' => 'bytraffic', }, } ``` Load balancing scheduler algorithms (`lbmethod`) are listed [in mod_proxy_balancer documentation](https://httpd.apache.org/docs/current/mod/mod_proxy_balancer.html). ## Reference For information on classes, types and functions see the [REFERENCE.md](https://github.com/puppetlabs/puppetlabs-apache/blob/main/REFERENCE.md) ### Templates The Apache module relies heavily on templates to enable the [`apache::vhost`][] and [`apache::mod`][] defined types. These templates are built based on [Facter][] facts that are specific to your operating system. Unless explicitly called out, most templates are not meant for configuration. ### Tasks The Apache module has a task that allows a user to reload the Apache config without restarting the service. Please refer to to the [PE documentation](https://puppet.com/docs/pe/2017.3/orchestrator/running_tasks.html) or [Bolt documentation](https://puppet.com/docs/bolt/latest/bolt.html) on how to execute a task. ## Limitations For an extensive list of supported operating systems, see [metadata.json](https://github.com/puppetlabs/puppetlabs-apache/blob/main/metadata.json) ### FreeBSD In order to use this module on FreeBSD, you _must_ use apache24-2.4.12 (www/apache24) or newer. ### Gentoo On Gentoo, this module depends on the [`gentoo/puppet-portage`][] Puppet module. Although several options apply or enable certain features and settings for Gentoo, it is not a [supported operating system][] for this module. ### RHEL/CentOS The [`apache::mod::auth_cas`][], [`apache::mod::passenger`][], [`apache::mod::proxy_html`][] and [`apache::mod::shib`][] classes are not functional on RH/CentOS without providing dependency packages from extra repositories. See their respective documentation below for related repositories and packages. #### RHEL/CentOS 5 The [`apache::mod::passenger`][] and [`apache::mod::proxy_html`][] classes are untested because repositories are missing compatible packages. #### RHEL/CentOS 6 The [`apache::mod::passenger`][] class is not installing, because the EL6 repository is missing compatible packages. #### RHEL/CentOS 7 The [`apache::mod::passenger`][] and [`apache::mod::proxy_html`][] classes are untested because the EL7 repository is missing compatible packages, which also blocks us from testing the [`apache::vhost`][] defined type's [`rack_base_uris`][] parameter. ### SELinux and custom paths If [SELinux][] is in [enforcing mode][] and you want to use custom paths for `logroot`, `mod_dir`, `vhost_dir`, and `docroot`, you need to manage the files' context yourself. You can do this with Puppet: ``` puppet exec { 'set_apache_defaults': command => 'semanage fcontext -a -t httpd_sys_content_t "/custom/path(/.*)?"', path => '/bin:/usr/bin/:/sbin:/usr/sbin', require => Package['policycoreutils-python'], } package { 'policycoreutils-python': ensure => installed, } exec { 'restorecon_apache': command => 'restorecon -Rv /apache_spec', path => '/bin:/usr/bin/:/sbin:/usr/sbin', before => Class['Apache::Service'], require => Class['apache'], } class { 'apache': } host { 'test.server': ip => '127.0.0.1', } file { '/custom/path': ensure => directory, } file { '/custom/path/include': ensure => present, content => '#additional_includes', } apache::vhost { 'test.server': docroot => '/custom/path', additional_includes => '/custom/path/include', } ``` **NOTE:** On RHEL 8, the SELinux packages contained in `policycoreutils-python` have been replaced by the `policycoreutils-python-utils` package. See [here](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/considerations_in_adopting_rhel_8/index#selinux-python3_security) for more details. You must set the contexts using `semanage fcontext` instead of `chcon` because Puppet's `file` resources reset the values' context in the database if the resource doesn't specify it. -### Ubuntu 10.04 - -The [`apache::vhost::WSGIImportScript`][] parameter creates a statement inside the virtual host that is unsupported on older versions of Apache, causing it to fail. This will be remedied in a future refactoring. - ### Ubuntu 16.04 The [`apache::mod::suphp`][] class is untested since repositories are missing compatible packages. ## Development ### Testing To run the unit tests, install the necessary gems: ``` bundle install ``` And then execute the command: ``` bundle exec rake parallel_spec ``` To check the code coverage, run: ``` COVERAGE=yes bundle exec rake parallel_spec ``` Acceptance tests for this module leverage [puppet_litmus](https://github.com/puppetlabs/puppet_litmus). To run the acceptance tests follow the instructions [here](https://github.com/puppetlabs/puppet_litmus/wiki/Tutorial:-use-Litmus-to-execute-acceptance-tests-with-a-sample-module-(MoTD)#install-the-necessary-gems-for-the-module). You can also find a tutorial and walkthrough of using Litmus and the PDK on [YouTube](https://www.youtube.com/watch?v=FYfR7ZEGHoE). ### Development Support If you run into an issue with this module, or if you would like to request a feature, please [file a ticket](https://tickets.puppetlabs.com/browse/MODULES/). Every Monday the Puppet IA Content Team has [office hours](https://puppet.com/community/office-hours) in the [Puppet Community Slack](http://slack.puppet.com/), alternating between an EMEA friendly time (1300 UTC) and an Americas friendly time (0900 Pacific, 1700 UTC). If you have problems getting this module up and running, please [contact Support](http://puppetlabs.com/services/customer-support). If you submit a change to this module, be sure to regenerate the reference documentation as follows: ```bash puppet strings generate --format markdown --out REFERENCE.md ``` ### Apache MOD Test & Support Lifecycle #### Adding Support for a new Apache MOD Support for new [Apache Modules] can be added under the [`apache::mod`] namespace. Acceptance tests should be added for each new [Apache Module][Apache Modules] added. Ideally, the acceptance tests should run on all compatible platforms that this module is supported on (see `metdata.json`), however there are cases when a more niche module is difficult to set up and install on a particular Linux distro. This could be for one or more of the following reasons: - Package not available in default repositories of distro - Package dependencies not available in default repositories of distro - Package (and/or its dependencies) are only available in a specific version of an OS In these cases, it is possible to exclude a module from a test platform using a specific tag, defined above the class declaration: ```puppet # @note Unsupported platforms: OS: ver, ver; OS: ver, ver, ver; OS: all class apache::mod::foobar { ... } ``` For example: ```puppet # @note Unsupported platforms: RedHat: 5, 6; Ubuntu: 14.04; SLES: all; Scientific: 11 SP1 class apache::mod::actions { ... } ``` Please be aware of the following format guidelines for the tag: - All OS/Version declarations must be preceded with `@note Unsupported platforms:` - The tag must be declared ABOVE the class declaration (i.e. not as footer at the bottom of the file) - Each OS/Version declaration must be separated by semicolons (`;`) - Each version must be separated by a comma (`,`) - Versions CANNOT be declared in ranges (e.g. `RedHat:5-7`), they should be explicitly declared (e.g. `RedHat:5,6,7`) - However, to declare all versions of an OS as unsupported, use the word `all` (e.g. `SLES:all`) - OSs with word characters as part of their versions are acceptable (e.g. `Scientific: 11 SP1, 11 SP2, 12, 13`) - Spaces are permitted between OS/Version declarations and version numbers within a declaration - Refer to the `operatingsystem_support` values in the `metadata.json` to find the acceptable OS name and version syntax: - E.g. `OracleLinux` OR `oraclelinux`, not: `Oracle` or `OraLinux` - E.g. `RedHat` OR `redhat`, not: `Red Hat Enterprise Linux`, `RHEL`, or `Red Hat` If the tag is incorrectly formatted, a warning will be printed out at the end of the test run, indicating what tag(s) could not be parsed. This will not halt the execution of other tests. Once the class is tagged, it is possible to exclude a test for that particular [Apache MOD][Apache Modules] using RSpec's filtering and a helper method: ```ruby describe 'auth_oidc', if: mod_supported_on_platform('apache::mod::auth_openidc') do ``` The `mod_supported_on_platform` helper method takes the [Apache Module][Apache Modules] class definition as defined in the manifests under `manifest/mod`. This functionality can be disabled by setting the `DISABLE_MOD_TEST_EXCLUSION` environment variable. When set, all exclusions will be ignored. #### Test Support Lifecycle The puppetlabs-apache module supports a large number of compatible platforms and [Apache Modules][Apache modules]. As a result, Apache Module tests can fail because a package or package dependency has been removed from a Linux distribution repository. The [IAC Team][IAC Team] will try to resolve these issues and keep instructions updated, but due to limited resources this won’t always be possible. In these cases, we will exclude test(s) from certain platforms. As always, we welcome help from our community members, and the IAC team is here to assist and answer questions. diff --git a/REFERENCE.md b/REFERENCE.md index 1962888b..8543c985 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -1,10163 +1,10162 @@ # Reference ## Table of Contents ### Classes #### Public Classes * [`apache`](#apache): Guides the basic setup and installation of Apache on your system. * [`apache::dev`](#apachedev): Installs Apache development libraries. * [`apache::mod::actions`](#apachemodactions): Installs Apache mod_actions * [`apache::mod::alias`](#apachemodalias): Installs and configures `mod_alias`. * [`apache::mod::apreq2`](#apachemodapreq2): Installs `mod_apreq2`. * [`apache::mod::auth_basic`](#apachemodauth_basic): Installs `mod_auth_basic` * [`apache::mod::auth_cas`](#apachemodauth_cas): Installs and configures `mod_auth_cas`. * [`apache::mod::auth_gssapi`](#apachemodauth_gssapi): Installs `mod_auth_gsappi`. * [`apache::mod::auth_kerb`](#apachemodauth_kerb): Installs `mod_auth_kerb` * [`apache::mod::auth_mellon`](#apachemodauth_mellon): Installs and configures `mod_auth_mellon`. * [`apache::mod::auth_openidc`](#apachemodauth_openidc): Installs and configures `mod_auth_openidc`. * [`apache::mod::authn_core`](#apachemodauthn_core): Installs `mod_authn_core`. * [`apache::mod::authn_dbd`](#apachemodauthn_dbd): Installs `mod_authn_dbd`. * [`apache::mod::authn_file`](#apachemodauthn_file): Installs `mod_authn_file`. * [`apache::mod::authnz_ldap`](#apachemodauthnz_ldap): Installs `mod_authnz_ldap`. * [`apache::mod::authnz_pam`](#apachemodauthnz_pam): Installs `mod_authnz_pam`. * [`apache::mod::authz_default`](#apachemodauthz_default): Installs and configures `mod_authz_default`. * [`apache::mod::authz_user`](#apachemodauthz_user): Installs `mod_authz_user` * [`apache::mod::autoindex`](#apachemodautoindex): Installs `mod_autoindex` * [`apache::mod::cache`](#apachemodcache): Installs `mod_cache` * [`apache::mod::cgi`](#apachemodcgi): Installs `mod_cgi`. * [`apache::mod::cgid`](#apachemodcgid): Installs `mod_cgid`. * [`apache::mod::cluster`](#apachemodcluster): Installs `mod_cluster`. * [`apache::mod::data`](#apachemoddata): Installs and configures `mod_data`. * [`apache::mod::dav`](#apachemoddav): Installs `mod_dav`. * [`apache::mod::dav_fs`](#apachemoddav_fs): Installs `mod_dav_fs`. * [`apache::mod::dav_svn`](#apachemoddav_svn): Installs and configures `mod_dav_svn`. * [`apache::mod::dbd`](#apachemoddbd): Installs `mod_dbd`. * [`apache::mod::deflate`](#apachemoddeflate): Installs and configures `mod_deflate`. * [`apache::mod::dev`](#apachemoddev): Installs `mod_dev`. * [`apache::mod::dir`](#apachemoddir): Installs and configures `mod_dir`. * [`apache::mod::disk_cache`](#apachemoddisk_cache): Installs and configures `mod_disk_cache`. * [`apache::mod::dumpio`](#apachemoddumpio): Installs and configures `mod_dumpio`. * [`apache::mod::env`](#apachemodenv): Installs `mod_env`. * [`apache::mod::event`](#apachemodevent): Installs and configures `mod_event`. * [`apache::mod::expires`](#apachemodexpires): Installs and configures `mod_expires`. * [`apache::mod::ext_filter`](#apachemodext_filter): Installs and configures `mod_ext_filter`. * [`apache::mod::fastcgi`](#apachemodfastcgi): Installs `mod_fastcgi`. * [`apache::mod::fcgid`](#apachemodfcgid): Installs and configures `mod_fcgid`. * [`apache::mod::filter`](#apachemodfilter): Installs `mod_filter`. * [`apache::mod::geoip`](#apachemodgeoip): Installs and configures `mod_geoip`. * [`apache::mod::headers`](#apachemodheaders): Installs and configures `mod_headers`. * [`apache::mod::http2`](#apachemodhttp2): Installs and configures `mod_http2`. * [`apache::mod::include`](#apachemodinclude): Installs `mod_include`. * [`apache::mod::info`](#apachemodinfo): Installs and configures `mod_info`. * [`apache::mod::intercept_form_submit`](#apachemodintercept_form_submit): Installs `mod_intercept_form_submit`. * [`apache::mod::itk`](#apachemoditk): Installs MPM `mod_itk`. * [`apache::mod::jk`](#apachemodjk): Installs `mod_jk`. * [`apache::mod::ldap`](#apachemodldap): Installs and configures `mod_ldap`. * [`apache::mod::lookup_identity`](#apachemodlookup_identity): Installs `mod_lookup_identity` * [`apache::mod::macro`](#apachemodmacro): Installs `mod_macro`. * [`apache::mod::md`](#apachemodmd): Installs and configures `mod_md`. * [`apache::mod::mime`](#apachemodmime): Installs and configures `mod_mime`. * [`apache::mod::mime_magic`](#apachemodmime_magic): Installs and configures `mod_mime_magic`. * [`apache::mod::negotiation`](#apachemodnegotiation): Installs and configures `mod_negotiation`. * [`apache::mod::nss`](#apachemodnss): Installs and configures `mod_nss`. * [`apache::mod::pagespeed`](#apachemodpagespeed): Installs and configures `mod_pagespeed`. * [`apache::mod::passenger`](#apachemodpassenger): Installs `mod_pasenger`. * [`apache::mod::perl`](#apachemodperl): Installs `mod_perl`. * [`apache::mod::peruser`](#apachemodperuser): Installs `mod_peruser`. * [`apache::mod::php`](#apachemodphp): Installs `mod_php`. * [`apache::mod::prefork`](#apachemodprefork): Installs and configures MPM `prefork`. * [`apache::mod::proxy`](#apachemodproxy): Installs and configures `mod_proxy`. * [`apache::mod::proxy_ajp`](#apachemodproxy_ajp): Installs `mod_proxy_ajp`. * [`apache::mod::proxy_balancer`](#apachemodproxy_balancer): Installs and configures `mod_proxy_balancer`. * [`apache::mod::proxy_connect`](#apachemodproxy_connect): Installs `mod_proxy_connect`. * [`apache::mod::proxy_fcgi`](#apachemodproxy_fcgi): Installs `mod_proxy_fcgi`. * [`apache::mod::proxy_html`](#apachemodproxy_html): Installs `mod_proxy_html`. * [`apache::mod::proxy_http`](#apachemodproxy_http): Installs `mod_proxy_http`. * [`apache::mod::proxy_wstunnel`](#apachemodproxy_wstunnel): Installs `mod_proxy_wstunnel`. * [`apache::mod::python`](#apachemodpython): Installs and configures `mod_python`. * [`apache::mod::remoteip`](#apachemodremoteip): Installs and configures `mod_remoteip`. * [`apache::mod::reqtimeout`](#apachemodreqtimeout): Installs and configures `mod_reqtimeout`. * [`apache::mod::rewrite`](#apachemodrewrite): Installs `mod_rewrite`. * [`apache::mod::rpaf`](#apachemodrpaf): Installs and configures `mod_rpaf`. * [`apache::mod::security`](#apachemodsecurity): Installs and configures `mod_security`. * [`apache::mod::setenvif`](#apachemodsetenvif): Installs `mod_setenvif`. * [`apache::mod::shib`](#apachemodshib): Installs and configures `mod_shib`. * [`apache::mod::socache_shmcb`](#apachemodsocache_shmcb): Installs `mod_socache_shmcb`. * [`apache::mod::speling`](#apachemodspeling): Installs `mod_spelling`. * [`apache::mod::ssl`](#apachemodssl): Installs `mod_ssl`. * [`apache::mod::status`](#apachemodstatus): Installs and configures `mod_status`. * [`apache::mod::suexec`](#apachemodsuexec): Installs `mod_suexec`. * [`apache::mod::suphp`](#apachemodsuphp): Installs `mod_suphp`. * [`apache::mod::userdir`](#apachemoduserdir): Installs and configures `mod_userdir`. * [`apache::mod::version`](#apachemodversion): Installs `mod_version`. * [`apache::mod::vhost_alias`](#apachemodvhost_alias): Installs Apache `mod_vhost_alias`. * [`apache::mod::watchdog`](#apachemodwatchdog): Installs and configures `mod_watchdog`. * [`apache::mod::worker`](#apachemodworker): Installs and manages the MPM `worker`. * [`apache::mod::wsgi`](#apachemodwsgi): Installs and configures `mod_wsgi`. * [`apache::mod::xsendfile`](#apachemodxsendfile): Installs `mod_xsendfile`. * [`apache::mpm::disable_mpm_event`](#apachempmdisable_mpm_event) * [`apache::mpm::disable_mpm_prefork`](#apachempmdisable_mpm_prefork) * [`apache::mpm::disable_mpm_worker`](#apachempmdisable_mpm_worker) * [`apache::vhosts`](#apachevhosts): Creates `apache::vhost` defined types. #### Private Classes * `apache::confd::no_accf`: Manages the `no-accf.conf` file. * `apache::default_confd_files`: Helper for setting up default conf.d files. * `apache::default_mods`: Installs and congfigures default mods for Apache * `apache::package`: Installs an Apache MPM. * `apache::params`: This class manages Apache parameters * `apache::php`: This class installs PHP for Apache. * `apache::proxy`: This class enabled the proxy module for Apache. * `apache::python`: This class installs Python for Apache * `apache::service`: Installs and configures Apache service. * `apache::ssl`: This class installs Apache SSL capabilities * `apache::version`: Try to automatically detect the version by OS ### Defined types #### Public Defined types * [`apache::balancer`](#apachebalancer): This type will create an apache balancer cluster file inside the conf.d directory. * [`apache::balancermember`](#apachebalancermember): Defines members of `mod_proxy_balancer` * [`apache::custom_config`](#apachecustom_config): Adds a custom configuration file to the Apache server's `conf.d` directory. * [`apache::fastcgi::server`](#apachefastcgiserver): Defines one or more external FastCGI servers to handle specific file types. Use this defined type with `mod_fastcgi`. * [`apache::listen`](#apachelisten): Adds `Listen` directives to `ports.conf` that define the Apache server's or a virtual host's listening address and port. * [`apache::mod`](#apachemod): Installs packages for an Apache module that doesn't have a corresponding `apache::mod::` class. * [`apache::namevirtualhost`](#apachenamevirtualhost): Enables name-based virtual hosts * [`apache::vhost`](#apachevhost) * [`apache::vhost::custom`](#apachevhostcustom): A wrapper around the `apache::custom_config` defined type. * [`apache::vhost::fragment`](#apachevhostfragment): Define a fragment within a vhost #### Private Defined types * `apache::default_mods::load`: Helper used by `apache::default_mods` * `apache::mpm`: Enables the use of Apache MPMs. * `apache::peruser::multiplexer`: Checks if an Apache module has a class. * `apache::peruser::processor`: Enables the `Peruser` module for FreeBSD only. * `apache::security::rule_link`: Links the activated_rules from `apache::mod::security` to the respective CRS rules on disk. ### Resource types * [`a2mod`](#a2mod): Manage Apache 2 modules ### Functions * [`apache::apache_pw_hash`](#apacheapache_pw_hash): DEPRECATED. Use the function [`apache::pw_hash`](#apachepw_hash) instead. * [`apache::bool2httpd`](#apachebool2httpd): Transform a supposed boolean to On or Off. Passes all other values through. * [`apache::pw_hash`](#apachepw_hash): Hashes a password in a format suitable for htpasswd files read by apache. * [`apache_pw_hash`](#apache_pw_hash): DEPRECATED. Use the namespaced function [`apache::pw_hash`](#apachepw_hash) instead. * [`bool2httpd`](#bool2httpd): DEPRECATED. Use the namespaced function [`apache::bool2httpd`](#apachebool2httpd) instead. ### Data types * [`Apache::LogLevel`](#apacheloglevel): A string that conforms to the Apache `LogLevel` syntax. * [`Apache::OIDCSettings`](#apacheoidcsettings): https://github.com/zmartzone/mod_auth_openidc/blob/master/auth_openidc.conf ### Tasks * [`init`](#init): Allows you to perform apache service functions ## Classes ### `apache` When this class is declared with the default options, Puppet: - Installs the appropriate Apache software package and [required Apache modules](#default_mods) for your operating system. - Places the required configuration files in a directory, with the [default location](#conf_dir) determined by your operating system. - Configures the server with a default virtual host and standard port (`80`) and address (`\*`) bindings. - Creates a document root directory determined by your operating system, typically `/var/www`. - Starts the Apache service. If an ldaps:// URL is specified, the mode becomes SSL and the setting of LDAPTrustedMode is ignored. #### Examples ##### ```puppet class { 'apache': } ``` #### Parameters The following parameters are available in the `apache` class: * [`allow_encoded_slashes`](#allow_encoded_slashes) * [`apache_version`](#apache_version) * [`conf_dir`](#conf_dir) * [`conf_template`](#conf_template) * [`confd_dir`](#confd_dir) * [`default_charset`](#default_charset) * [`default_confd_files`](#default_confd_files) * [`default_mods`](#default_mods) * [`default_ssl_ca`](#default_ssl_ca) * [`default_ssl_cert`](#default_ssl_cert) * [`default_ssl_chain`](#default_ssl_chain) * [`default_ssl_crl`](#default_ssl_crl) * [`default_ssl_crl_path`](#default_ssl_crl_path) * [`default_ssl_crl_check`](#default_ssl_crl_check) * [`default_ssl_key`](#default_ssl_key) * [`default_ssl_vhost`](#default_ssl_vhost) * [`default_type`](#default_type) * [`default_vhost`](#default_vhost) * [`dev_packages`](#dev_packages) * [`docroot`](#docroot) * [`error_documents`](#error_documents) * [`group`](#group) * [`httpd_dir`](#httpd_dir) * [`http_protocol_options`](#http_protocol_options) * [`keepalive`](#keepalive) * [`keepalive_timeout`](#keepalive_timeout) * [`max_keepalive_requests`](#max_keepalive_requests) * [`hostname_lookups`](#hostname_lookups) * [`ldap_trusted_mode`](#ldap_trusted_mode) * [`ldap_verify_server_cert`](#ldap_verify_server_cert) * [`lib_path`](#lib_path) * [`log_level`](#log_level) * [`log_formats`](#log_formats) * [`logroot`](#logroot) * [`logroot_mode`](#logroot_mode) * [`manage_group`](#manage_group) * [`supplementary_groups`](#supplementary_groups) * [`manage_user`](#manage_user) * [`mod_dir`](#mod_dir) * [`mod_libs`](#mod_libs) * [`mod_packages`](#mod_packages) * [`mpm_module`](#mpm_module) * [`package_ensure`](#package_ensure) * [`pidfile`](#pidfile) * [`ports_file`](#ports_file) * [`protocols`](#protocols) * [`protocols_honor_order`](#protocols_honor_order) * [`purge_configs`](#purge_configs) * [`purge_vhost_dir`](#purge_vhost_dir) * [`rewrite_lock`](#rewrite_lock) * [`sendfile`](#sendfile) * [`serveradmin`](#serveradmin) * [`servername`](#servername) * [`server_root`](#server_root) * [`server_signature`](#server_signature) * [`server_tokens`](#server_tokens) * [`service_enable`](#service_enable) * [`service_ensure`](#service_ensure) * [`service_name`](#service_name) * [`service_manage`](#service_manage) * [`service_restart`](#service_restart) * [`timeout`](#timeout) * [`trace_enable`](#trace_enable) * [`use_canonical_name`](#use_canonical_name) * [`use_systemd`](#use_systemd) * [`file_mode`](#file_mode) * [`root_directory_options`](#root_directory_options) * [`root_directory_secured`](#root_directory_secured) * [`vhost_dir`](#vhost_dir) * [`vhost_include_pattern`](#vhost_include_pattern) * [`user`](#user) * [`apache_name`](#apache_name) * [`error_log`](#error_log) * [`scriptalias`](#scriptalias) * [`access_log_file`](#access_log_file) * [`limitreqfields`](#limitreqfields) * [`limitreqfieldsize`](#limitreqfieldsize) * [`ip`](#ip) * [`purge_vdir`](#purge_vdir) * [`conf_enabled`](#conf_enabled) * [`vhost_enable_dir`](#vhost_enable_dir) * [`mod_enable_dir`](#mod_enable_dir) * [`ssl_file`](#ssl_file) * [`file_e_tag`](#file_e_tag) * [`use_optional_includes`](#use_optional_includes) * [`mime_types_additional`](#mime_types_additional) ##### `allow_encoded_slashes` Data type: `Optional[Enum['on', 'off', 'nodecode']]` Sets the server default for the `AllowEncodedSlashes` declaration, which modifies the responses to URLs containing '\' and '/' characters. If not specified, this parameter omits the declaration from the server's configuration and uses Apache's default setting of 'off'. Default value: ``undef`` ##### `apache_version` Data type: `Any` Configures module template behavior, package names, and default Apache modules by defining the version of Apache to use. We do not recommend manually configuring this parameter without reason. Default value: `$apache::version::default` ##### `conf_dir` Data type: `Any` Sets the directory where the Apache server's main configuration file is located. Default value: `$apache::params::conf_dir` ##### `conf_template` Data type: `Any` Defines the template used for the main Apache configuration file. Modifying this parameter is potentially risky, as the apache module is designed to use a minimal configuration file customized by `conf.d` entries. Default value: `$apache::params::conf_template` ##### `confd_dir` Data type: `Any` Sets the location of the Apache server's custom configuration directory. Default value: `$apache::params::confd_dir` ##### `default_charset` Data type: `Any` Used as the `AddDefaultCharset` directive in the main configuration file. Default value: ``undef`` ##### `default_confd_files` Data type: `Boolean` Determines whether Puppet generates a default set of includable Apache configuration files in the directory defined by the `confd_dir` parameter. These configuration files correspond to what is typically installed with the Apache package on the server's operating system. Default value: ``true`` ##### `default_mods` Data type: `Any` Determines whether to configure and enable a set of default Apache modules depending on your operating system.
If `false`, Puppet includes only the Apache modules required to make the HTTP daemon work on your operating system, and you can declare any other modules separately using the `apache::mod::` class or `apache::mod` defined type.
If `true`, Puppet installs additional modules, depending on the operating system and the values of `apache_version` and `mpm_module` parameters. Because these lists of modules can change frequently, consult the Puppet module's code for up-to-date lists.
If this parameter contains an array, Puppet instead enables all passed Apache modules. Default value: ``true`` ##### `default_ssl_ca` Data type: `Any` Sets the default certificate authority for the Apache server.
Although the default value results in a functioning Apache server, you **must** update this parameter with your certificate authority information before deploying this server in a production environment. Default value: ``undef`` ##### `default_ssl_cert` Data type: `Any` Sets the SSL encryption certificate location.
Although the default value results in a functioning Apache server, you **must** update this parameter with your certificate location before deploying this server in a production environment. Default value: `$apache::params::default_ssl_cert` ##### `default_ssl_chain` Data type: `Any` Sets the default SSL chain location.
Although this default value results in a functioning Apache server, you **must** update this parameter with your SSL chain before deploying this server in a production environment. Default value: ``undef`` ##### `default_ssl_crl` Data type: `Any` Sets the path of the default certificate revocation list (CRL) file to use.
Although this default value results in a functioning Apache server, you **must** update this parameter with the CRL file path before deploying this server in a production environment. You can use this parameter with or in place of the `default_ssl_crl_path`. Default value: ``undef`` ##### `default_ssl_crl_path` Data type: `Any` Sets the server's certificate revocation list path, which contains your CRLs.
Although this default value results in a functioning Apache server, you **must** update this parameter with the CRL file path before deploying this server in a production environment. Default value: ``undef`` ##### `default_ssl_crl_check` Data type: `Any` Sets the default certificate revocation check level via the `SSLCARevocationCheck` directive. This parameter applies only to Apache 2.4 or higher and is ignored on older versions.
Although this default value results in a functioning Apache server, you **must** specify this parameter when using certificate revocation lists in a production environment. Default value: ``undef`` ##### `default_ssl_key` Data type: `Any` Sets the SSL certificate key file location. Although the default values result in a functioning Apache server, you **must** update this parameter with your SSL key's location before deploying this server in a production environment. Default value: `$apache::params::default_ssl_key` ##### `default_ssl_vhost` Data type: `Boolean` Configures a default SSL virtual host. If `true`, Puppet automatically configures the following virtual host using the `apache::vhost` defined type: ```puppet apache::vhost { 'default-ssl': port => 443, ssl => true, docroot => $docroot, scriptalias => $scriptalias, serveradmin => $serveradmin, access_log_file => "ssl_${access_log_file}", } ``` **Note**: SSL virtual hosts only respond to HTTPS queries. Default value: ``false`` ##### `default_type` Data type: `Any` _Apache 2.2 only_. Sets the MIME `content-type` sent if the server cannot otherwise determine an appropriate `content-type`. This directive is deprecated in Apache 2.4 and newer, and is only for backwards compatibility in configuration files. Default value: `'none'` ##### `default_vhost` Data type: `Boolean` Configures a default virtual host when the class is declared.
To configure customized virtual hosts, set this parameter's value to `false`.
> **Note**: Apache will not start without at least one virtual host. If you set this to `false` you must configure a virtual host elsewhere. Default value: ``true`` ##### `dev_packages` Data type: `Any` Configures a specific dev package to use.
For example, using httpd 2.4 from the IUS yum repo:
``` puppet include ::apache::dev class { 'apache': apache_name => 'httpd24u', dev_packages => 'httpd24u-devel', } ``` Default value: `$apache::params::dev_packages` ##### `docroot` Data type: `Any` Sets the default `DocumentRoot` location. Default value: `$apache::params::docroot` ##### `error_documents` Data type: `Any` Determines whether to enable [custom error documents](https://httpd.apache.org/docs/current/custom-error.html) on the Apache server. Default value: ``false`` ##### `group` Data type: `Any` Sets the group ID that owns any Apache processes spawned to answer requests.
By default, Puppet attempts to manage this group as a resource under the `apache` class, determining the group based on the operating system as detected by the `apache::params` class. To prevent the group resource from being created and use a group created by another Puppet module, set the `manage_group` parameter's value to `false`.
> **Note**: Modifying this parameter only changes the group ID that Apache uses to spawn child processes to access resources. It does not change the user that owns the parent server process. Default value: `$apache::params::group` ##### `httpd_dir` Data type: `Any` Sets the Apache server's base configuration directory. This is useful for specially repackaged Apache server builds but might have unintended consequences when combined with the default distribution packages. Default value: `$apache::params::httpd_dir` ##### `http_protocol_options` Data type: `Any` Specifies the strictness of HTTP protocol checks.
Valid options: any sequence of the following alternative values: `Strict` or `Unsafe`, `RegisteredMethods` or `LenientMethods`, and `Allow0.9` or `Require1.0`. Default value: `$apache::params::http_protocol_options` ##### `keepalive` Data type: `Any` Determines whether to enable persistent HTTP connections with the `KeepAlive` directive. If you set this to `On`, use the `keepalive_timeout` and `max_keepalive_requests` parameters to set relevant options.
Default value: `$apache::params::keepalive` ##### `keepalive_timeout` Data type: `Any` Sets the `KeepAliveTimeout` directive, which determines the amount of time the Apache server waits for subsequent requests on a persistent HTTP connection. This parameter is only relevant if the `keepalive` parameter is enabled. Default value: `$apache::params::keepalive_timeout` ##### `max_keepalive_requests` Data type: `Any` Limits the number of requests allowed per connection when the `keepalive` parameter is enabled. Default value: `$apache::params::max_keepalive_requests` ##### `hostname_lookups` Data type: `Enum['Off', 'On', 'Double', 'off', 'on', 'double']` This directive enables DNS lookups so that host names can be logged and passed to CGIs/SSIs in REMOTE_HOST.
> **Note**: If enabled, it impacts performance significantly. Default value: `$apache::params::hostname_lookups` ##### `ldap_trusted_mode` Data type: `Any` The following modes are supported: NONE - no encryption SSL - ldaps:// encryption on default port 636 TLS - STARTTLS encryption on default port 389 Not all LDAP toolkits support all the above modes. An error message will be logged at runtime if a mode is not supported, and the connection to the LDAP server will fail. Default value: ``undef`` ##### `ldap_verify_server_cert` Data type: `Any` Specifies whether to force the verification of a server certificate when establishing an SSL connection to the LDAP server. On|Off Default value: ``undef`` ##### `lib_path` Data type: `Any` Specifies the location whereApache module files are stored.
> **Note**: Do not configure this parameter manually without special reason. Default value: `$apache::params::lib_path` ##### `log_level` Data type: `Apache::LogLevel` Configures the apache [LogLevel](https://httpd.apache.org/docs/current/mod/core.html#loglevel) directive which adjusts the verbosity of the messages recorded in the error logs. Default value: `$apache::params::log_level` ##### `log_formats` Data type: `Any` Define additional `LogFormat` directives. Values: A hash, such as: ``` puppet $log_formats = { vhost_common => '%v %h %l %u %t \"%r\" %>s %b' } ``` There are a number of predefined `LogFormats` in the `httpd.conf` that Puppet creates: ``` httpd LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common LogFormat "%{Referer}i -> %U" referer LogFormat "%{User-agent}i" agent LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-agent}i\"" forwarded ``` If your `log_formats` parameter contains one of those, it will be overwritten with **your** definition. Default value: `{}` ##### `logroot` Data type: `Any` Changes the directory of Apache log files for the virtual host. Default value: `$apache::params::logroot` ##### `logroot_mode` Data type: `Any` Overrides the default `logroot` directory's mode.
> **Note**: Do _not_ grant write access to the directory where the logs are stored without being aware of the consequences. See the [Apache documentation](https://httpd.apache.org/docs/current/logs.html#security) for details. Default value: `$apache::params::logroot_mode` ##### `manage_group` Data type: `Boolean` When `false`, stops Puppet from creating the group resource.
If you have a group created from another Puppet module that you want to use to run Apache, set this to `false`. Without this parameter, attempting to use a previously established group results in a duplicate resource error. Default value: ``true`` ##### `supplementary_groups` Data type: `Any` A list of groups to which the user belongs. These groups are in addition to the primary group.
Notice: This option only has an effect when `manage_user` is set to true. Default value: `[]` ##### `manage_user` Data type: `Boolean` When `false`, stops Puppet from creating the user resource.
This is for instances when you have a user, created from another Puppet module, you want to use to run Apache. Without this parameter, attempting to use a previously established user would result in a duplicate resource error. Default value: ``true`` ##### `mod_dir` Data type: `Any` Sets where Puppet places configuration files for your Apache modules. Default value: `$apache::params::mod_dir` ##### `mod_libs` Data type: `Any` Allows the user to override default module library names. ```puppet include apache::params class { 'apache': mod_libs => merge($::apache::params::mod_libs, { 'wsgi' => 'mod_wsgi_python3.so', }) } ``` Default value: `$apache::params::mod_libs` ##### `mod_packages` Data type: `Any` Allows the user to override default module package names. ```puppet include apache::params class { 'apache': mod_packages => merge($::apache::params::mod_packages, { 'auth_kerb' => 'httpd24-mod_auth_kerb', }) } ``` Default value: `$apache::params::mod_packages` ##### `mpm_module` Data type: `Any` Determines which [multi-processing module](https://httpd.apache.org/docs/current/mpm.html) (MPM) is loaded and configured for the HTTPD process. Valid values are: `event`, `itk`, `peruser`, `prefork`, `worker` or `false`.
You must set this to `false` to explicitly declare the following classes with custom parameters: - `apache::mod::event` - `apache::mod::itk` - `apache::mod::peruser` - `apache::mod::prefork` - `apache::mod::worker` Default value: `$apache::params::mpm_module` ##### `package_ensure` Data type: `Any` Controls the `package` resource's `ensure` attribute. Valid values are: `absent`, `installed` (or equivalent `present`), or a version string. Default value: `'installed'` ##### `pidfile` Data type: `Any` Allows settting a custom location for the pid file. Useful if using a custom-built Apache rpm. Default value: `$apache::params::pidfile` ##### `ports_file` Data type: `Any` Sets the path to the file containing Apache ports configuration. Default value: `$apache::params::ports_file` ##### `protocols` Data type: `Array[Enum['h2', 'h2c', 'http/1.1']]` Sets the [Protocols](https://httpd.apache.org/docs/current/en/mod/core.html#protocols) directive, which lists available protocols for the server. Default value: `[]` ##### `protocols_honor_order` Data type: `Optional[Boolean]` Sets the [ProtocolsHonorOrder](https://httpd.apache.org/docs/current/en/mod/core.html#protocolshonororder) directive which determines whether the order of Protocols sets precedence during negotiation. Default value: ``undef`` ##### `purge_configs` Data type: `Any` Removes all other Apache configs and virtual hosts.
Setting this to `false` is a stopgap measure to allow the apache module to coexist with existing or unmanaged configurations. We recommend moving your configuration to resources within this module. For virtual host configurations, see `purge_vhost_dir`. Default value: ``true`` ##### `purge_vhost_dir` Data type: `Any` If the `vhost_dir` parameter's value differs from the `confd_dir` parameter's, this parameter determines whether Puppet removes any configurations inside `vhost_dir` that are _not_ managed by Puppet.
Setting `purge_vhost_dir` to `false` is a stopgap measure to allow the apache module to coexist with existing or otherwise unmanaged configurations within `vhost_dir`. Default value: ``undef`` ##### `rewrite_lock` Data type: `Optional[Stdlib::Absolutepath]` Allows setting a custom location for a rewrite lock - considered best practice if using a RewriteMap of type prg in the `rewrites` parameter of your virtual host. This parameter only applies to Apache version 2.2 or lower and is ignored on newer versions. Default value: ``undef`` ##### `sendfile` Data type: `Enum['On', 'Off', 'on', 'off']` Forces Apache to use the Linux kernel's `sendfile` support to serve static files, via the `EnableSendfile` directive. Default value: `'On'` ##### `serveradmin` Data type: `Any` Sets the Apache server administrator's contact information via Apache's `ServerAdmin` directive. Default value: `'root@localhost'` ##### `servername` Data type: `Any` Sets the Apache server name via Apache's `ServerName` directive. Setting to `false` will not set ServerName at all. Default value: `$apache::params::servername` ##### `server_root` Data type: `Any` Sets the Apache server's root directory via Apache's `ServerRoot` directive. Default value: `$apache::params::server_root` ##### `server_signature` Data type: `Any` Configures a trailing footer line to display at the bottom of server-generated documents, such as error documents and output of certain Apache modules, via Apache's `ServerSignature` directive. Valid values are: `On` or `Off`. Default value: `'On'` ##### `server_tokens` Data type: `Any` Controls how much information Apache sends to the browser about itself and the operating system, via Apache's `ServerTokens` directive. Default value: `'Prod'` ##### `service_enable` Data type: `Boolean` Determines whether Puppet enables the Apache HTTPD service when the system is booted. Default value: ``true`` ##### `service_ensure` Data type: `Any` Determines whether Puppet should make sure the service is running. Valid values are: `true` (or `running`) or `false` (or `stopped`).
The `false` or `stopped` values set the 'httpd' service resource's `ensure` parameter to `false`, which is useful when you want to let the service be managed by another application, such as Pacemaker.
Default value: `'running'` ##### `service_name` Data type: `Any` Sets the name of the Apache service. Default value: `$apache::params::service_name` ##### `service_manage` Data type: `Boolean` Determines whether Puppet manages the HTTPD service's state. Default value: ``true`` ##### `service_restart` Data type: `Any` Determines whether Puppet should use a specific command to restart the HTTPD service. Values: a command to restart the Apache service. Default value: ``undef`` ##### `timeout` Data type: `Any` Sets Apache's `TimeOut` directive, which defines the number of seconds Apache waits for certain events before failing a request. Default value: `'60'` ##### `trace_enable` Data type: `Any` Controls how Apache handles `TRACE` requests (per RFC 2616) via the `TraceEnable` directive. Default value: `'On'` ##### `use_canonical_name` Data type: `Optional[Enum['On', 'on', 'Off', 'off', 'DNS', 'dns']]` Controls Apache's `UseCanonicalName` directive which controls how Apache handles self-referential URLs. If not specified, this parameter omits the declaration from the server's configuration and uses Apache's default setting of 'off'. Default value: ``undef`` ##### `use_systemd` Data type: `Any` Controls whether the systemd module should be installed on Centos 7 servers, this is especially useful if using custom-built RPMs. Default value: `$apache::params::use_systemd` ##### `file_mode` Data type: `Any` Sets the desired permissions mode for config files. Valid values are: a string, with permissions mode in symbolic or numeric notation. Default value: `$apache::params::file_mode` ##### `root_directory_options` Data type: `Any` Array of the desired options for the `/` directory in httpd.conf. Default value: `$apache::params::root_directory_options` ##### `root_directory_secured` Data type: `Boolean` Sets the default access policy for the `/` directory in httpd.conf. A value of `false` allows access to all resources that are missing a more specific access policy. A value of `true` denies access to all resources by default. If `true`, more specific rules must be used to allow access to these resources (for example, in a directory block using the `directories` parameter). Default value: ``false`` ##### `vhost_dir` Data type: `Any` Changes your virtual host configuration files' location. Default value: `$apache::params::vhost_dir` ##### `vhost_include_pattern` Data type: `Any` Defines the pattern for files included from the `vhost_dir`. If set to a value like `[^.#]\*.conf[^~]` to make sure that files accidentally created in this directory (such as files created by version control systems or editor backups) are *not* included in your server configuration.
Some operating systems use a value of `*.conf`. By default, this module creates configuration files ending in `.conf`. Default value: `$apache::params::vhost_include_pattern` ##### `user` Data type: `Any` Changes the user that Apache uses to answer requests. Apache's parent process continues to run as root, but child processes access resources as the user defined by this parameter. To prevent Puppet from managing the user, set the `manage_user` parameter to `false`. Default value: `$apache::params::user` ##### `apache_name` Data type: `Any` The name of the Apache package to install. If you are using a non-standard Apache package you might need to override the default setting.
For CentOS/RHEL Software Collections (SCL), you can also use `apache::version::scl_httpd_version`. Default value: `$apache::params::apache_name` ##### `error_log` Data type: `Any` The name of the error log file for the main server instance. If the string starts with `/`, `|`, or `syslog`: the full path is set. Otherwise, the filename is prefixed with `$logroot`. Default value: `$apache::params::error_log` ##### `scriptalias` Data type: `Any` Directory to use for global script alias Default value: `$apache::params::scriptalias` ##### `access_log_file` Data type: `Any` The name of the access log file for the main server instance. Default value: `$apache::params::access_log_file` ##### `limitreqfields` Data type: `Any` The `limitreqfields` parameter sets the maximum number of request header fields in an HTTP request. This directive gives the server administrator greater control over abnormal client request behavior, which may be useful for avoiding some forms of denial-of-service attacks. The value should be increased if normal clients see an error response from the server that indicates too many fields were sent in the request. Default value: `'100'` ##### `limitreqfieldsize` Data type: `Any` The `limitreqfieldsize` parameter sets the maximum ammount of _bytes_ that will be allowed within a request header. Default value: `'8190'` ##### `ip` Data type: `Any` Specifies the ip address Default value: ``undef`` ##### `purge_vdir` Data type: `Any` Removes all other Apache configs and virtual hosts.
> **Note**: This parameter is deprecated in favor of the `purge_config` parameter.
Default value: ``false`` ##### `conf_enabled` Data type: `Any` Whether the additional config files in `/etc/apache2/conf-enabled` should be managed. Default value: `$apache::params::conf_enabled` ##### `vhost_enable_dir` Data type: `Any` Set's whether the vhost definitions will be stored in sites-availible and if they will be symlinked to and from sites-enabled. Default value: `$apache::params::vhost_enable_dir` ##### `mod_enable_dir` Data type: `Any` Set's whether the mods-enabled directory should be managed. Default value: `$apache::params::mod_enable_dir` ##### `ssl_file` Data type: `Any` This parameter allows you to set an ssl.conf file to be managed in order to implement an SSL Certificate. Default value: ``undef`` ##### `file_e_tag` Data type: `Any` Sets the server default for the `FileETag` declaration, which modifies the response header field for static files. Default value: ``undef`` ##### `use_optional_includes` Data type: `Boolean` Specifies whether Apache uses the `IncludeOptional` directive instead of `Include` for `additional_includes` in Apache 2.4 or newer. Default value: `$apache::params::use_optional_includes` ##### `mime_types_additional` Data type: `Any` Specifies any idditional Internet media (mime) types that you wish to be configured. Default value: `$apache::params::mime_types_additional` ### `apache::dev` The libraries installed depends on the `dev_packages` parameter of the `apache::params` class, based on your operating system: - **Debian** : `libaprutil1-dev`, `libapr1-dev`; `apache2-dev` on Ubuntu 13.10 and Debian 8; `apache2-prefork-dev` on other versions. - **FreeBSD**: `undef`; on FreeBSD, you must declare the `apache::package` or `apache` classes before declaring `apache::dev`. - **Gentoo**: `undef`. - **Red Hat**: `httpd-devel`. ### `apache::mod::actions` Installs Apache mod_actions * **See also** * https://httpd.apache.org/docs/current/mod/mod_actions.html * for additional documentation. ### `apache::mod::alias` Installs and configures `mod_alias`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_alias.html * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::alias` class: * [`apache_version`](#apache_version) * [`icons_options`](#icons_options) * [`icons_path`](#icons_path) * [`icons_path`](#icons_path) * [`icons_prefix`](#icons_prefix) ##### `apache_version` Data type: `Any` The version of Apache, if not set will be retrieved from the init class. Default value: ``undef`` ##### `icons_options` Data type: `Any` Disables directory listings for the icons directory, via Apache [Options](https://httpd.apache.org/docs/current/mod/core.html#options) directive. Default value: `'Indexes MultiViews'` ##### `icons_path` Data type: `Any` Sets the local path for an /icons/ Alias. Default depends on operating system: - Debian: /usr/share/apache2/icons - FreeBSD: /usr/local/www/apache24/icons - Gentoo: /var/www/icons - Red Hat: /var/www/icons, except on Apache 2.4, where it's /usr/share/httpd/icons Default value: `$apache::params::alias_icons_path` ##### `icons_path` Change the alias for /icons/. Default value: `$apache::params::alias_icons_path` ##### `icons_prefix` Data type: `Any` Default value: `$apache::params::icons_prefix` ### `apache::mod::apreq2` Installs `mod_apreq2`. * **Note** Unsupported platforms: CentOS: all; Debian: 8; OracleLinux: all; RedHat: all; Scientific: all; SLES: all; Ubuntu: all * **See also** * http://httpd.apache.org/apreq/docs/libapreq2/group__mod__apreq2.html * for additional documentation. ### `apache::mod::auth_basic` Installs `mod_auth_basic` * **See also** * https://httpd.apache.org/docs/current/mod/mod_auth_basic.html * for additional documentation. ### `apache::mod::auth_cas` Installs and configures `mod_auth_cas`. * **Note** The auth_cas module isn't available on RH/CentOS without providing dependency packages provided by EPEL. * **See also** * https://github.com/apereo/mod_auth_cas * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::auth_cas` class: * [`cas_login_url`](#cas_login_url) * [`cas_validate_url`](#cas_validate_url) * [`cas_cookie_path`](#cas_cookie_path) * [`cas_cookie_path_mode`](#cas_cookie_path_mode) * [`cas_version`](#cas_version) * [`cas_debug`](#cas_debug) * [`cas_validate_server`](#cas_validate_server) * [`cas_validatedepth`](#cas_validatedepth) * [`cas_proxy_validate_url`](#cas_proxy_validate_url) * [`cas_root_proxied_as`](#cas_root_proxied_as) * [`cas_cookie_entropy`](#cas_cookie_entropy) * [`cas_timeout`](#cas_timeout) * [`cas_idle_timeout`](#cas_idle_timeout) * [`cas_cache_clean_interval`](#cas_cache_clean_interval) * [`cas_cookie_domain`](#cas_cookie_domain) * [`cas_cookie_http_only`](#cas_cookie_http_only) * [`cas_authoritative`](#cas_authoritative) * [`cas_validate_saml`](#cas_validate_saml) * [`cas_sso_enabled`](#cas_sso_enabled) * [`cas_attribute_prefix`](#cas_attribute_prefix) * [`cas_attribute_delimiter`](#cas_attribute_delimiter) * [`cas_scrub_request_headers`](#cas_scrub_request_headers) * [`suppress_warning`](#suppress_warning) * [`cas_validate_depth`](#cas_validate_depth) * [`cas_certificate_path`](#cas_certificate_path) ##### `cas_login_url` Data type: `String` Sets the URL to which the module redirects users when they attempt to access a CAS-protected resource and don't have an active session. ##### `cas_validate_url` Data type: `String` Sets the URL to use when validating a client-presented ticket in an HTTP query string. ##### `cas_cookie_path` Data type: `String` Sets the location where information on the current session should be stored. This should be writable by the web server only. Default value: `$apache::params::cas_cookie_path` ##### `cas_cookie_path_mode` Data type: `Any` The mode of cas_cookie_path. Default value: `'0750'` ##### `cas_version` Data type: `Any` The version of the CAS protocol to adhere to. Default value: `2` ##### `cas_debug` Data type: `Any` Whether to enable or disable debug mode. Default value: `'Off'` ##### `cas_validate_server` Data type: `Any` Whether to validate the presented certificate. This has been deprecated and removed from Version 1.1-RC1 onward. Default value: ``undef`` ##### `cas_validatedepth` The maximum depth for chained certificate validation. ##### `cas_proxy_validate_url` Data type: `Any` The URL to use when performing a proxy validation. Default value: ``undef`` ##### `cas_root_proxied_as` Data type: `Any` Sets the URL end users see when access to this Apache server is proxied per vhost. This URL should not include a trailing slash. Default value: ``undef`` ##### `cas_cookie_entropy` Data type: `Any` When creating a local session, this many random bytes are used to create a unique session identifier. Default value: ``undef`` ##### `cas_timeout` Data type: `Any` The hard limit, in seconds, for a mod_auth_cas session. Default value: ``undef`` ##### `cas_idle_timeout` Data type: `Any` The limit, in seconds, of how long a mod_auth_cas session can be idle. Default value: ``undef`` ##### `cas_cache_clean_interval` Data type: `Any` The minimum amount of time that must pass inbetween cache cleanings. Default value: ``undef`` ##### `cas_cookie_domain` Data type: `Any` The value for the 'Domain=' parameter in the Set-Cookie header. Default value: ``undef`` ##### `cas_cookie_http_only` Data type: `Any` Setting this flag prevents the mod_auth_cas cookies from being accessed by client side Javascript. Default value: ``undef`` ##### `cas_authoritative` Data type: `Any` Determines whether an optional authorization directive is authoritative and thus binding. Default value: ``undef`` ##### `cas_validate_saml` Data type: `Any` Parse response from CAS server for SAML. Default value: ``undef`` ##### `cas_sso_enabled` Data type: `Any` Enables experimental support for single sign out (may mangle POST data). Default value: ``undef`` ##### `cas_attribute_prefix` Data type: `Any` Adds a header with the value of this header being the attribute values when SAML validation is enabled. Default value: ``undef`` ##### `cas_attribute_delimiter` Data type: `Any` Sets the delimiter between attribute values in the header created by `cas_attribute_prefix`. Default value: ``undef`` ##### `cas_scrub_request_headers` Data type: `Any` Remove inbound request headers that may have special meaning within mod_auth_cas. Default value: ``undef`` ##### `suppress_warning` Data type: `Any` Suppress warning about being on RedHat (mod_auth_cas package is now available in epel-testing repo). Default value: ``false`` ##### `cas_validate_depth` Data type: `Any` Default value: ``undef`` ##### `cas_certificate_path` Data type: `Any` Default value: ``undef`` ### `apache::mod::auth_gssapi` Installs `mod_auth_gsappi`. * **See also** * https://github.com/modauthgssapi/mod_auth_gssapi * for additional documentation. ### `apache::mod::auth_kerb` Installs `mod_auth_kerb` * **See also** * http://modauthkerb.sourceforge.net * for additional documentation. ### `apache::mod::auth_mellon` Installs and configures `mod_auth_mellon`. * **See also** * https://github.com/Uninett/mod_auth_mellon * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::auth_mellon` class: * [`mellon_cache_size`](#mellon_cache_size) * [`mellon_lock_file`](#mellon_lock_file) * [`mellon_post_directory`](#mellon_post_directory) * [`mellon_cache_entry_size`](#mellon_cache_entry_size) * [`mellon_post_ttl`](#mellon_post_ttl) * [`mellon_post_size`](#mellon_post_size) * [`mellon_post_count`](#mellon_post_count) ##### `mellon_cache_size` Data type: `Any` Maximum number of sessions which can be active at once. Default value: `$apache::params::mellon_cache_size` ##### `mellon_lock_file` Data type: `Any` Full path to a file used for synchronizing access to the session data. Default value: `$apache::params::mellon_lock_file` ##### `mellon_post_directory` Data type: `Any` Full path of a directory where POST requests are saved during authentication. Default value: `$apache::params::mellon_post_directory` ##### `mellon_cache_entry_size` Data type: `Any` Maximum size for a single session entry in bytes. Default value: ``undef`` ##### `mellon_post_ttl` Data type: `Any` Delay in seconds before a saved POST request can be flushed. Default value: ``undef`` ##### `mellon_post_size` Data type: `Any` Maximum size for saved POST requests. Default value: ``undef`` ##### `mellon_post_count` Data type: `Any` Maximum amount of saved POST requests. Default value: ``undef`` ### `apache::mod::auth_openidc` Installs and configures `mod_auth_openidc`. * **See also** * https://github.com/zmartzone/mod_auth_openidc * for additional documentation. ### `apache::mod::authn_core` Installs `mod_authn_core`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_authn_core.html * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::authn_core` class: * [`apache_version`](#apache_version) ##### `apache_version` Data type: `Any` The version of apache being run. Default value: `$apache::apache_version` ### `apache::mod::authn_dbd` Installs `mod_authn_dbd`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_authn_dbd.html * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::authn_dbd` class: * [`authn_dbd_params`](#authn_dbd_params) * [`authn_dbd_dbdriver`](#authn_dbd_dbdriver) * [`authn_dbd_query`](#authn_dbd_query) * [`authn_dbd_min`](#authn_dbd_min) * [`authn_dbd_max`](#authn_dbd_max) * [`authn_dbd_keep`](#authn_dbd_keep) * [`authn_dbd_exptime`](#authn_dbd_exptime) * [`authn_dbd_alias`](#authn_dbd_alias) ##### `authn_dbd_params` Data type: `Any` The params needed for the mod to function. ##### `authn_dbd_dbdriver` Data type: `Any` Selects an apr_dbd driver by name. Default value: `'mysql'` ##### `authn_dbd_query` Data type: `Any` Default value: ``undef`` ##### `authn_dbd_min` Data type: `Any` Set the minimum number of connections per process. Default value: `'4'` ##### `authn_dbd_max` Data type: `Any` Set the maximum number of connections per process. Default value: `'20'` ##### `authn_dbd_keep` Data type: `Any` Set the maximum number of connections per process to be sustained. Default value: `'8'` ##### `authn_dbd_exptime` Data type: `Any` Set the time to keep idle connections alive when the number of connections specified in DBDKeep has been exceeded. Default value: `'300'` ##### `authn_dbd_alias` Data type: `Any` Sets an alias for `AuthnProvider. Default value: ``undef`` ### `apache::mod::authn_file` Installs `mod_authn_file`. * **See also** * https://httpd.apache.org/docs/2.4/mod/mod_authn_file.html * for additional documentation. ### `apache::mod::authnz_ldap` Installs `mod_authnz_ldap`. * **Note** Unsupported platforms: RedHat: 6, 8; CentOS: 6, 8; OracleLinux: 6, 8; Ubuntu: all; Debian: all; SLES: all * **See also** * https://httpd.apache.org/docs/current/mod/mod_authnz_ldap.html * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::authnz_ldap` class: * [`verify_server_cert`](#verify_server_cert) * [`package_name`](#package_name) ##### `verify_server_cert` Data type: `Boolean` Whether to force te verification of a server cert or not. Default value: ``true`` ##### `package_name` Data type: `Any` The name of the ldap package. Default value: ``undef`` ### `apache::mod::authnz_pam` Installs `mod_authnz_pam`. * **See also** * https://www.adelton.com/apache/mod_authnz_pam * for additional documentation. ### `apache::mod::authz_default` Installs and configures `mod_authz_default`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_authz_default.html * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::authz_default` class: * [`apache_version`](#apache_version) ##### `apache_version` Data type: `Any` Version of Apache to install module on. Default value: `$apache::apache_version` ### `apache::mod::authz_user` Installs `mod_authz_user` * **See also** * https://httpd.apache.org/docs/current/mod/mod_authz_user.html * for additional documentation. ### `apache::mod::autoindex` Installs `mod_autoindex` * **See also** * https://httpd.apache.org/docs/current/mod/mod_autoindex.html * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::autoindex` class: * [`icons_prefix`](#icons_prefix) ##### `icons_prefix` Data type: `Any` Default value: `$apache::params::icons_prefix` ### `apache::mod::cache` Installs `mod_cache` * **See also** * https://httpd.apache.org/docs/current/mod/mod_cache.html * for additional documentation. ### `apache::mod::cgi` Installs `mod_cgi`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_cgi.html * for additional documentation. ### `apache::mod::cgid` Installs `mod_cgid`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_cgid.html ### `apache::mod::cluster` Installs `mod_cluster`. * **Note** There is no official package available for mod_cluster, so you must make it available outside of the apache module. Binaries can be found [here](https://modcluster.io/). * **See also** * https://modcluster.io/ * for additional documentation. #### Examples ##### ```puppet class { '::apache::mod::cluster': ip => '172.17.0.1', allowed_network => '172.17.0.', balancer_name => 'mycluster', version => '1.3.1' } ``` #### Parameters The following parameters are available in the `apache::mod::cluster` class: * [`allowed_network`](#allowed_network) * [`balancer_name`](#balancer_name) * [`ip`](#ip) * [`version`](#version) * [`enable_mcpm_receive`](#enable_mcpm_receive) * [`port`](#port) * [`keep_alive_timeout`](#keep_alive_timeout) * [`manager_allowed_network`](#manager_allowed_network) * [`max_keep_alive_requests`](#max_keep_alive_requests) * [`server_advertise`](#server_advertise) * [`advertise_frequency`](#advertise_frequency) ##### `allowed_network` Data type: `Any` Balanced members network. ##### `balancer_name` Data type: `Any` Name of balancer. ##### `ip` Data type: `Any` Specifies the IP address to listen to. ##### `version` Data type: `Any` Specifies the mod_cluster version. Version 1.3.0 or greater is required for httpd 2.4. ##### `enable_mcpm_receive` Data type: `Any` Whether MCPM should be enabled. Default value: ``true`` ##### `port` Data type: `Any` mod_cluster listen port. Default value: `'6666'` ##### `keep_alive_timeout` Data type: `Any` Specifies how long Apache should wait for a request, in seconds. Default value: `60` ##### `manager_allowed_network` Data type: `Any` Whether to allow the network to access the mod_cluster_manager. Default value: `'127.0.0.1'` ##### `max_keep_alive_requests` Data type: `Any` Maximum number of requests kept alive. Default value: `0` ##### `server_advertise` Data type: `Any` Whether the server should advertise. Default value: ``true`` ##### `advertise_frequency` Data type: `Any` Sets the interval between advertise messages in seconds. Default value: ``undef`` ### `apache::mod::data` Installs and configures `mod_data`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_data.html * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::data` class: * [`apache_version`](#apache_version) ##### `apache_version` Data type: `Any` Version of Apache to install module on. Default value: ``undef`` ### `apache::mod::dav` Installs `mod_dav`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_dav.html * for additional documentation. ### `apache::mod::dav_fs` Installs `mod_dav_fs`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_dav_fs.html * for additional documentation. ### `apache::mod::dav_svn` Installs and configures `mod_dav_svn`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_dav_svn.html * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::dav_svn` class: * [`authz_svn_enabled`](#authz_svn_enabled) ##### `authz_svn_enabled` Data type: `Any` Specifies whether to install Apache mod_authz_svn Default value: ``false`` ### `apache::mod::dbd` Installs `mod_dbd`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_dbd.html * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::dbd` class: * [`apache_version`](#apache_version) ##### `apache_version` Used to verify that the Apache version you have requested is compatible with the module. ### `apache::mod::deflate` Installs and configures `mod_deflate`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_deflate.html * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::deflate` class: * [`types`](#types) * [`notes`](#notes) ##### `types` Data type: `Any` An array of MIME types to be deflated. See https://www.iana.org/assignments/media-types/media-types.xhtml. Default value: `[ 'text/html text/plain text/xml', 'text/css', 'application/x-javascript application/javascript application/ecmascript', 'application/rss+xml', 'application/json', ]` ##### `notes` Data type: `Any` A Hash where the key represents the type and the value represents the note name. Default value: `{ 'Input' => 'instream', 'Output' => 'outstream', 'Ratio' => 'ratio', }` ### `apache::mod::dev` Installs `mod_dev`. * **Note** This module is deprecated. Please use `apache::dev`. ### `apache::mod::dir` Installs and configures `mod_dir`. * **TODO** This sets the global DirectoryIndex directive, so it may be necessary to consider being able to modify the apache::vhost to declare DirectoryIndex statements in a vhost configuration * **See also** * https://httpd.apache.org/docs/current/mod/mod_dir.html * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::dir` class: * [`types`](#types) * [`indexes`](#indexes) * [`dir`](#dir) ##### `types` Specifies the text-based content types to compress. ##### `indexes` Data type: `Array[String]` Provides a string for the DirectoryIndex directive Default value: `['index.html','index.html.var','index.cgi','index.pl','index.php','index.xhtml']` ##### `dir` Data type: `Any` Default value: `'public_html'` ### `apache::mod::disk_cache` Installs and configures `mod_disk_cache`. * **Note** Apache 2.2, mod_disk_cache installed. On Apache 2.4, mod_cache_disk installed. * **See also** * https://httpd.apache.org/docs/2.2/mod/mod_disk_cache.html * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::disk_cache` class: * [`cache_root`](#cache_root) * [`cache_ignore_headers`](#cache_ignore_headers) ##### `cache_root` Data type: `Any` Defines the name of the directory on the disk to contain cache files. Default depends on the Apache version and operating system: - Debian: /var/cache/apache2/mod_cache_disk - FreeBSD: /var/cache/mod_cache_disk - Red Hat, Apache 2.4: /var/cache/httpd/proxy - Red Hat, Apache 2.2: /var/cache/mod_proxy Default value: ``undef`` ##### `cache_ignore_headers` Data type: `Any` Specifies HTTP header(s) that should not be stored in the cache. Default value: ``undef`` ### `apache::mod::dumpio` Installs and configures `mod_dumpio`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_dumpio.html * for additional documentation. #### Examples ##### ```puppet class{'apache': default_mods => false, log_level => 'dumpio:trace7', } class{'apache::mod::dumpio': dump_io_input => 'On', dump_io_output => 'Off', } ``` #### Parameters The following parameters are available in the `apache::mod::dumpio` class: * [`dump_io_input`](#dump_io_input) * [`dump_io_output`](#dump_io_output) ##### `dump_io_input` Data type: `Enum['Off', 'On', 'off', 'on']` Dump all input data to the error log Default value: `'Off'` ##### `dump_io_output` Data type: `Enum['Off', 'On', 'off', 'on']` Dump all output data to the error log Default value: `'Off'` ### `apache::mod::env` Installs `mod_env`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_env.html * for additional documentation. ### `apache::mod::event` Installs and configures `mod_event`. * **Note** You cannot include apache::mod::event with apache::mod::itk, apache::mod::peruser, apache::mod::prefork, or apache::mod::worker on the same server. * **See also** * https://httpd.apache.org/docs/current/mod/event.html * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::event` class: * [`startservers`](#startservers) * [`maxclients`](#maxclients) * [`maxrequestworkers`](#maxrequestworkers) * [`minsparethreads`](#minsparethreads) * [`maxsparethreads`](#maxsparethreads) * [`threadsperchild`](#threadsperchild) * [`maxrequestsperchild`](#maxrequestsperchild) * [`maxconnectionsperchild`](#maxconnectionsperchild) * [`serverlimit`](#serverlimit) * [`apache_version`](#apache_version) * [`threadlimit`](#threadlimit) * [`listenbacklog`](#listenbacklog) ##### `startservers` Data type: `Any` Sets the number of child server processes created at startup, via the module's `StartServers` directive. Setting this to `false` removes the parameter. Default value: `'2'` ##### `maxclients` Data type: `Any` Apache 2.3.12 or older alias for the `MaxRequestWorkers` directive. Default value: `'150'` ##### `maxrequestworkers` Data type: `Any` Sets the maximum number of connections Apache can simultaneously process, via the module's `MaxRequestWorkers` directive. Setting these to `false` removes the parameters. Default value: ``undef`` ##### `minsparethreads` Data type: `Any` Sets the minimum number of idle threads, via the `MinSpareThreads` directive. Setting this to `false` removes the parameters. Default value: `'25'` ##### `maxsparethreads` Data type: `Any` Sets the maximum number of idle threads, via the `MaxSpareThreads` directive. Setting this to `false` removes the parameters. Default value: `'75'` ##### `threadsperchild` Data type: `Any` Number of threads created by each child process. Default value: `'25'` ##### `maxrequestsperchild` Data type: `Any` Apache 2.3.8 or older alias for the `MaxConnectionsPerChild` directive. Default value: `'0'` ##### `maxconnectionsperchild` Data type: `Any` Limit on the number of connections that an individual child server will handle during its life. Default value: ``undef`` ##### `serverlimit` Data type: `Any` Limits the configurable number of processes via the `ServerLimit` directive. Setting this to `false` removes the parameter. Default value: `'25'` ##### `apache_version` Data type: `Any` Version of Apache to install module on. Default value: ``undef`` ##### `threadlimit` Data type: `Any` Limits the number of event threads via the module's `ThreadLimit` directive. Setting this to `false` removes the parameter. Default value: `'64'` ##### `listenbacklog` Data type: `Any` Sets the maximum length of the pending connections queue via the module's `ListenBackLog` directive. Setting this to `false` removes the parameter. Default value: `'511'` ### `apache::mod::expires` Installs and configures `mod_expires`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_expires.html * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::expires` class: * [`expires_active`](#expires_active) * [`expires_default`](#expires_default) * [`expires_by_type`](#expires_by_type) ##### `expires_active` Data type: `Any` Enables generation of Expires headers. Default value: ``true`` ##### `expires_default` Data type: `Any` Specifies the default algorithm for calculating expiration time using ExpiresByType syntax or interval syntax. Default value: ``undef`` ##### `expires_by_type` Data type: `Any` Describes a set of [MIME content-types](https://www.iana.org/assignments/media-types/media-types.xhtml) and their expiration times. This should be used as an array of Hashes, with each Hash's key a valid MIME content-type (i.e. 'text/json') and its value following valid interval syntax. Default value: ``undef`` ### `apache::mod::ext_filter` Installs and configures `mod_ext_filter`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_ext_filter.html * for additional documentation. #### Examples ##### ```puppet class { 'apache::mod::ext_filter': ext_filter_define => { 'slowdown' => 'mode=output cmd=/bin/cat preservescontentlength', 'puppetdb-strip' => 'mode=output outtype=application/json cmd="pdb-resource-filter"', }, } ``` #### Parameters The following parameters are available in the `apache::mod::ext_filter` class: * [`ext_filter_define`](#ext_filter_define) ##### `ext_filter_define` Data type: `Optional[Hash]` Hash of filter names and their parameters. Default value: ``undef`` ### `apache::mod::fastcgi` Installs `mod_fastcgi`. * **See also** * https://github.com/FastCGI-Archives/mod_fastcgi * for additional documentation. ### `apache::mod::fcgid` loaded first; Puppet will not automatically enable it if you set the fcgiwrapper parameter in apache::vhost. include apache::mod::fcgid apache::vhost { 'example.org': docroot => '/var/www/html', directories => { path => '/var/www/html', fcgiwrapper => { command => '/usr/local/bin/fcgiwrapper', } }, } * **See also** * https://httpd.apache.org/docs/current/mod/mod_fcgid.html * for additional documentation. #### Examples ##### The class does not individually parameterize all available options. Instead, configure mod_fcgid using the options hash. ```puppet class { 'apache::mod::fcgid': options => { 'FcgidIPCDir' => '/var/run/fcgidsock', 'SharememPath' => '/var/run/fcgid_shm', 'AddHandler' => 'fcgid-script .fcgi', }, } ``` ##### If you include apache::mod::fcgid, you can set the [FcgidWrapper][] per directory, per virtual host. The module must be ```puppet ``` #### Parameters The following parameters are available in the `apache::mod::fcgid` class: * [`expires_active`](#expires_active) * [`expires_default`](#expires_default) * [`expires_by_type`](#expires_by_type) * [`options`](#options) ##### `expires_active` Enables generation of Expires headers. ##### `expires_default` Default algorithm for calculating expiration time. ##### `expires_by_type` Value of the Expires header configured by MIME type. ##### `options` Data type: `Any` Default value: `{}` ### `apache::mod::filter` Installs `mod_filter`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_filter.html * for additional documentation. ### `apache::mod::geoip` Installs and configures `mod_geoip`. * **See also** * https://dev.maxmind.com/geoip/legacy/mod_geoip2 * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::geoip` class: * [`enable`](#enable) * [`db_file`](#db_file) * [`flag`](#flag) * [`output`](#output) * [`enable_utf8`](#enable_utf8) * [`scan_proxy_headers`](#scan_proxy_headers) * [`scan_proxy_headers_field`](#scan_proxy_headers_field) * [`use_last_xforwarededfor_ip`](#use_last_xforwarededfor_ip) * [`scan_proxy_header_field`](#scan_proxy_header_field) ##### `enable` Data type: `Any` Toggles whether to enable geoip. Default value: ``false`` ##### `db_file` Data type: `Any` Path to database for GeoIP to use. Default value: `'/usr/share/GeoIP/GeoIP.dat'` ##### `flag` Data type: `Any` Caching directive to use. Values: 'CheckCache', 'IndexCache', 'MemoryCache', 'Standard'. Default value: `'Standard'` ##### `output` Data type: `Any` Output variable locations. Values: 'All', 'Env', 'Request', 'Notes'. Default value: `'All'` ##### `enable_utf8` Data type: `Any` Changes the output from ISO88591 (Latin1) to UTF8. Default value: ``undef`` ##### `scan_proxy_headers` Data type: `Any` Enables the GeoIPScanProxyHeaders option. Default value: ``undef`` ##### `scan_proxy_headers_field` Specifies the header mod_geoip uses to determine the client's IP address. ##### `use_last_xforwarededfor_ip` Data type: `Any` Determines whether to use the first or last IP address for the client's IP in a comma-separated list of IP addresses is found. Default value: ``undef`` ##### `scan_proxy_header_field` Data type: `Any` Default value: ``undef`` ### `apache::mod::headers` Installs and configures `mod_headers`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_headers.html * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::headers` class: * [`apache_version`](#apache_version) ##### `apache_version` Version of Apache to install module on. ### `apache::mod::http2` Installs and configures `mod_http2`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_http2.html * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::http2` class: * [`h2_copy_files`](#h2_copy_files) * [`h2_direct`](#h2_direct) * [`h2_early_hints`](#h2_early_hints) * [`h2_max_session_streams`](#h2_max_session_streams) * [`h2_max_worker_idle_seconds`](#h2_max_worker_idle_seconds) * [`h2_max_workers`](#h2_max_workers) * [`h2_min_workers`](#h2_min_workers) * [`h2_modern_tls_only`](#h2_modern_tls_only) * [`h2_push`](#h2_push) * [`h2_push_diary_size`](#h2_push_diary_size) * [`h2_priority`](#h2_priority) * [`h2_push_resource`](#h2_push_resource) * [`h2_serialize_headers`](#h2_serialize_headers) * [`h2_stream_max_mem_size`](#h2_stream_max_mem_size) * [`h2_tls_cool_down_secs`](#h2_tls_cool_down_secs) * [`h2_tls_warm_up_size`](#h2_tls_warm_up_size) * [`h2_upgrade`](#h2_upgrade) * [`h2_window_size`](#h2_window_size) * [`apache_version`](#apache_version) * [`h2_push_priority`](#h2_push_priority) ##### `h2_copy_files` Data type: `Optional[Boolean]` Determine file handling in responses. Default value: ``undef`` ##### `h2_direct` Data type: `Optional[Boolean]` H2 Direct Protocol Switch. Default value: ``undef`` ##### `h2_early_hints` Data type: `Optional[Boolean]` Determine sending of 103 status codes. Default value: ``undef`` ##### `h2_max_session_streams` Data type: `Optional[Integer]` Sets maximum number of active streams per HTTP/2 session. Default value: ``undef`` ##### `h2_max_worker_idle_seconds` Data type: `Optional[Integer]` Sets maximum number of seconds h2 workers remain idle until shut down. Default value: ``undef`` ##### `h2_max_workers` Data type: `Optional[Integer]` Sets maximum number of worker threads to use per child process. Default value: ``undef`` ##### `h2_min_workers` Data type: `Optional[Integer]` Sets minimal number of worker threads to use per child process. Default value: ``undef`` ##### `h2_modern_tls_only` Data type: `Optional[Boolean]` Toggles the security checks on HTTP/2 connections in TLS mode Default value: ``undef`` ##### `h2_push` Data type: `Optional[Boolean]` Toggles the usage of the HTTP/2 server push protocol feature. Default value: ``undef`` ##### `h2_push_diary_size` Data type: `Optional[Integer]` Sets maximum number of HTTP/2 server pushes that are remembered per HTTP/2 connection. Default value: ``undef`` ##### `h2_priority` Require HTTP/2 connections to be "modern TLS" only ##### `h2_push_resource` Data type: `Array[String]` When added to a directory/location, HTTP/2 PUSHes will be attempted for all paths added via this directive Default value: `[]` ##### `h2_serialize_headers` Data type: `Optional[Boolean]` Toggles if HTTP/2 requests shall be serialized in HTTP/1.1 format for processing by httpd core or if received binary data shall be passed into the request_recs directly. Default value: ``undef`` ##### `h2_stream_max_mem_size` Data type: `Optional[Integer]` Sets the maximum number of outgoing data bytes buffered in memory for an active streams. Default value: ``undef`` ##### `h2_tls_cool_down_secs` Data type: `Optional[Integer]` Sets the number of seconds of idle time on a TLS connection before the TLS write size falls back to small (~1300 bytes) length. Default value: ``undef`` ##### `h2_tls_warm_up_size` Data type: `Optional[Integer]` Sets the number of bytes to be sent in small TLS records (~1300 bytes) until doing maximum sized writes (16k) on https: HTTP/2 connections. Default value: ``undef`` ##### `h2_upgrade` Data type: `Optional[Boolean]` Toggles the usage of the HTTP/1.1 Upgrade method for switching to HTTP/2. Default value: ``undef`` ##### `h2_window_size` Data type: `Optional[Integer]` Sets the size of the window that is used for flow control from client to server and limits the amount of data the server has to buffer. Default value: ``undef`` ##### `apache_version` Data type: `Optional[String]` Version of Apache to install module on. Default value: ``undef`` ##### `h2_push_priority` Data type: `Array[String]` Default value: `[]` ### `apache::mod::include` Installs `mod_include`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_include.html * for additional documentation. ### `apache::mod::info` Installs and configures `mod_info`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_info.html * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::info` class: * [`allow_from`](#allow_from) * [`apache_version`](#apache_version) * [`restrict_access`](#restrict_access) * [`info_path`](#info_path) ##### `allow_from` Data type: `Any` Allowlist of IPv4 or IPv6 addresses or ranges that can access the info path. Default value: `['127.0.0.1','::1']` ##### `apache_version` Data type: `Any` Version of Apache to install module on. Default value: ``undef`` ##### `restrict_access` Data type: `Any` Toggles whether to restrict access to info path. If `false`, the `allow_from` allowlist is ignored and any IP address can access the info path. Default value: ``true`` ##### `info_path` Data type: `Any` Path on server to file containing server configuration information. Default value: `'/server-info'` ### `apache::mod::intercept_form_submit` Installs `mod_intercept_form_submit`. * **See also** * https://www.adelton.com/apache/mod_intercept_form_submit * for additional documentation. ### `apache::mod::itk` Installs MPM `mod_itk`. * **Note** Unsupported platforms: CentOS: 8; RedHat: 8; SLES: all * **See also** * http://mpm-itk.sesse.net * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::itk` class: * [`startservers`](#startservers) * [`minspareservers`](#minspareservers) * [`maxspareservers`](#maxspareservers) * [`serverlimit`](#serverlimit) * [`maxclients`](#maxclients) * [`maxrequestsperchild`](#maxrequestsperchild) * [`enablecapabilities`](#enablecapabilities) * [`apache_version`](#apache_version) ##### `startservers` Data type: `Any` Number of child server processes created on startup. Default value: `'8'` ##### `minspareservers` Data type: `Any` Minimum number of idle child server processes. Default value: `'5'` ##### `maxspareservers` Data type: `Any` Maximum number of idle child server processes. Default value: `'20'` ##### `serverlimit` Data type: `Any` Maximum configured value for `MaxRequestWorkers` for the lifetime of the Apache httpd process. Default value: `'256'` ##### `maxclients` Data type: `Any` Limit on the number of simultaneous requests that will be served. Default value: `'256'` ##### `maxrequestsperchild` Data type: `Any` Limit on the number of connections that an individual child server process will handle. Default value: `'4000'` ##### `enablecapabilities` Data type: `Any` Drop most root capabilities in the parent process, and instead run as the user given by the User/Group directives with some extra capabilities (in particular setuid). Somewhat more secure, but can cause problems when serving from filesystems that do not honor capabilities, such as NFS. Default value: ``undef`` ##### `apache_version` Data type: `Any` Used to verify that the Apache version you have requested is compatible with the module. Default value: ``undef`` ### `apache::mod::jk` Installs `mod_jk`. * **Note** shm_file and log_file Depending on how these files are specified, the class creates their final path differently: Relative path: prepends supplied path with logroot (see below) Absolute path or pipe: uses supplied path as-is ``` shm_file => 'shm_file' # Ends up in $shm_path = '/var/log/httpd/shm_file' shm_file => '/run/shm_file' # Ends up in $shm_path = '/run/shm_file' shm_file => '"|rotatelogs /var/log/httpd/mod_jk.log.%Y%m%d 86400 -180"' # Ends up in $shm_path = '"|rotatelogs /var/log/httpd/mod_jk.log.%Y%m%d 86400 -180"' ``` * **See also** * https://tomcat.apache.org/connectors-doc/reference/apache.html * for additional documentation. #### Examples ##### ```puppet class { '::apache::mod::jk': ip => '192.168.2.15', workers_file => 'conf/workers.properties', mount_file => 'conf/uriworkermap.properties', shm_file => 'run/jk.shm', shm_size => '50M', workers_file_content => { }, } ``` #### Parameters The following parameters are available in the `apache::mod::jk` class: * [`ip`](#ip) * [`port`](#port) * [`add_listen`](#add_listen) * [`workers_file`](#workers_file) * [`worker_property`](#worker_property) * [`logroot`](#logroot) * [`shm_file`](#shm_file) * [`shm_size`](#shm_size) * [`mount_file`](#mount_file) * [`mount_file_reload`](#mount_file_reload) * [`mount`](#mount) * [`un_mount`](#un_mount) * [`auto_alias`](#auto_alias) * [`mount_copy`](#mount_copy) * [`worker_indicator`](#worker_indicator) * [`watchdog_interval`](#watchdog_interval) * [`log_file`](#log_file) * [`log_level`](#log_level) * [`log_stamp_format`](#log_stamp_format) * [`request_log_format`](#request_log_format) * [`extract_ssl`](#extract_ssl) * [`https_indicator`](#https_indicator) * [`sslprotocol_indicator`](#sslprotocol_indicator) * [`certs_indicator`](#certs_indicator) * [`cipher_indicator`](#cipher_indicator) * [`certchain_prefix`](#certchain_prefix) * [`session_indicator`](#session_indicator) * [`keysize_indicator`](#keysize_indicator) * [`local_name_indicator`](#local_name_indicator) * [`ignore_cl_indicator`](#ignore_cl_indicator) * [`local_addr_indicator`](#local_addr_indicator) * [`local_port_indicator`](#local_port_indicator) * [`remote_host_indicator`](#remote_host_indicator) * [`remote_addr_indicator`](#remote_addr_indicator) * [`remote_port_indicator`](#remote_port_indicator) * [`remote_user_indicator`](#remote_user_indicator) * [`auth_type_indicator`](#auth_type_indicator) * [`options`](#options) * [`env_var`](#env_var) * [`strip_session`](#strip_session) * [`workers_file_content`](#workers_file_content) * [`mount_file_content`](#mount_file_content) * [`location_list`](#location_list) ##### `ip` Data type: `Optional[String]` IP for binding to mod_jk. Useful when the binding address is not the primary network interface IP. Default value: ``undef`` ##### `port` Data type: `Integer` Port for binding to mod_jk. Useful when something else, like a reverse proxy or cache, is receiving requests at port 80, then needs to forward them to Apache at a different port. Default value: `80` ##### `add_listen` Data type: `Boolean` Defines if a Listen directive according to parameters ip and port (see below), so that Apache listens to the IP/port combination and redirect to mod_jk. Useful when another Listen directive, like Listen *: or Listen , can conflict with the one necessary for mod_jk binding. Default value: ``true`` ##### `workers_file` Data type: `Any` The name of a worker file for the Tomcat servlet containers. Default value: ``undef`` ##### `worker_property` Data type: `Any` Enables setting worker properties inside Apache configuration file. Default value: `{}` ##### `logroot` Data type: `Any` The base directory for shm_file and log_file is determined by the logroot parameter. If unspecified, defaults to apache::params::logroot. The default logroot is sane enough therefore it is not recommended to override it. Default value: ``undef`` ##### `shm_file` Data type: `Any` Shared memory file name. Default value: `'jk-runtime-status'` ##### `shm_size` Data type: `Any` Size of the shared memory file name. Default value: ``undef`` ##### `mount_file` Data type: `Any` File containing multiple mappings from a context to a Tomcat worker. Default value: ``undef`` ##### `mount_file_reload` Data type: `Any` This directive configures the reload check interval in seconds. Default value: ``undef`` ##### `mount` Data type: `Any` A mount point from a context to a Tomcat worker. Default value: `{}` ##### `un_mount` Data type: `Any` An exclusion mount point from a context to a Tomcat worker. Default value: `{}` ##### `auto_alias` Data type: `Any` Automatically Alias webapp context directories into the Apache document space Default value: ``undef`` ##### `mount_copy` Data type: `Any` If this directive is set to "On" in some virtual server, the mounts from the global server will be copied to this virtual server, more precisely all mounts defined by JkMount or JkUnMount. Default value: ``undef`` ##### `worker_indicator` Data type: `Any` Name of the Apache environment variable that can be used to set worker names in combination with SetHandler jakarta-servlet. Default value: ``undef`` ##### `watchdog_interval` Data type: `Any` This directive configures the watchdog thread interval in seconds. Default value: ``undef`` ##### `log_file` Data type: `Any` Full or server relative path to the mod_jk log file. Default value: `'mod_jk.log'` ##### `log_level` Data type: `Any` The mod_jk log level, can be debug, info, warn error or trace. Default value: ``undef`` ##### `log_stamp_format` Data type: `Any` The mod_jk date log format, using an extended strftime syntax. Default value: ``undef`` ##### `request_log_format` Data type: `Any` Request log format string. Default value: ``undef`` ##### `extract_ssl` Data type: `Any` Turns on SSL processing and information gathering by mod_jk. Default value: ``undef`` ##### `https_indicator` Data type: `Any` Name of the Apache environment variable that contains SSL indication. Default value: ``undef`` ##### `sslprotocol_indicator` Data type: `Any` Name of the Apache environment variable that contains the SSL protocol name. Default value: ``undef`` ##### `certs_indicator` Data type: `Any` Name of the Apache environment variable that contains SSL client certificates. Default value: ``undef`` ##### `cipher_indicator` Data type: `Any` Name of the Apache environment variable that contains SSL client cipher. Default value: ``undef`` ##### `certchain_prefix` Data type: `Any` Name of the Apache environment (prefix) that contains SSL client chain certificates. Default value: ``undef`` ##### `session_indicator` Data type: `Any` Name of the Apache environment variable that contains SSL session. Default value: ``undef`` ##### `keysize_indicator` Data type: `Any` Name of the Apache environment variable that contains SSL key size in use. Default value: ``undef`` ##### `local_name_indicator` Data type: `Any` Name of the Apache environment variable which can be used to overwrite the forwarded local name. Default value: ``undef`` ##### `ignore_cl_indicator` Data type: `Any` Name of the Apache environment variable which forces to ignore an existing Content-Length request header. Default value: ``undef`` ##### `local_addr_indicator` Data type: `Any` Name of the Apache environment variable which can be used to overwrite the forwarded local IP address. Default value: ``undef`` ##### `local_port_indicator` Data type: `Any` Name of the Apache environment variable which can be used to overwrite the forwarded local port. Default value: ``undef`` ##### `remote_host_indicator` Data type: `Any` Name of the Apache environment variable which can be used to overwrite the forwarded remote (client) host name. Default value: ``undef`` ##### `remote_addr_indicator` Data type: `Any` Name of the Apache environment variable which can be used to overwrite the forwarded remote (client) IP address. Default value: ``undef`` ##### `remote_port_indicator` Data type: `Any` Name of the Apache environment variable which can be used to overwrite the forwarded remote (client) IP address. Default value: ``undef`` ##### `remote_user_indicator` Data type: `Any` Name of the Apache environment variable which can be used to overwrite the forwarded user name. Default value: ``undef`` ##### `auth_type_indicator` Data type: `Any` Name of the Apache environment variable which can be used to overwrite the forwarded authentication type. Default value: ``undef`` ##### `options` Data type: `Any` Set one of more options to configure the mod_jk module. Default value: `[]` ##### `env_var` Data type: `Any` Adds a name and an optional default value of environment variable that should be sent to servlet-engine as a request attribute. Default value: `{}` ##### `strip_session` Data type: `Any` If this directive is set to On in some virtual server, the session IDs ;jsessionid=... will be removed for URLs which are not forwarded but instead are handled by the local server. Default value: ``undef`` ##### `workers_file_content` Data type: `Any` Each directive has the format worker..=. This maps as a hash of hashes, where the outer hash specifies workers, and each inner hash specifies each worker properties and values. Plus, there are two global directives, 'worker.list' and 'worker.maintain' For example, the workers file below should be parameterized as follows: Worker file: ``` worker.list = status worker.list = some_name,other_name worker.maintain = 60 # Optional comment worker.some_name.type=ajp13 worker.some_name.socket_keepalive=true # I just like comments worker.other_name.type=ajp12 (why would you?) worker.other_name.socket_keepalive=false ``` Puppet file: ``` $workers_file_content = { worker_lists => ['status', 'some_name,other_name'], worker_maintain => '60', some_name => { comment => 'Optional comment', type => 'ajp13', socket_keepalive => 'true', }, other_name => { comment => 'I just like comments', type => 'ajp12', socket_keepalive => 'false', }, } ``` Default value: `{}` ##### `mount_file_content` Data type: `Any` Each directive has the format = . This maps as a hash of hashes, where the outer hash specifies workers, and each inner hash contains two items: - uri_list-an array with URIs to be mapped to the worker - comment-an optional string with a comment for the worker. For example, the mount file below should be parameterized as Figure 2: Worker file: ``` # Worker 1 /context_1/ = worker_1 /context_1/* = worker_1 # Worker 2 / = worker_2 /context_2/ = worker_2 /context_2/* = worker_2 ``` Puppet file: ``` $mount_file_content = { worker_1 => { uri_list => ['/context_1/', '/context_1/*'], comment => 'Worker 1', }, worker_2 => { uri_list => ['/context_2/', '/context_2/*'], comment => 'Worker 2', }, }, ``` Default value: `{}` ##### `location_list` Data type: `Any` Default value: `[]` ### `apache::mod::ldap` Installs and configures `mod_ldap`. * **Note** Unsupported platforms: CentOS: 8; RedHat: 8 * **See also** * https://httpd.apache.org/docs/current/mod/mod_ldap.html * for additional documentation. #### Examples ##### ```puppet class { 'apache::mod::ldap': ldap_trusted_global_cert_file => '/etc/pki/tls/certs/ldap-trust.crt', ldap_trusted_global_cert_type => 'CA_DER', ldap_trusted_mode => 'TLS', ldap_shared_cache_size => '500000', ldap_cache_entries => '1024', ldap_cache_ttl => '600', ldap_opcache_entries => '1024', ldap_opcache_ttl => '600', } ``` #### Parameters The following parameters are available in the `apache::mod::ldap` class: * [`apache_version`](#apache_version) * [`package_name`](#package_name) * [`ldap_trusted_global_cert_file`](#ldap_trusted_global_cert_file) * [`ldap_trusted_global_cert_type`](#ldap_trusted_global_cert_type) * [`ldap_shared_cache_size`](#ldap_shared_cache_size) * [`ldap_cache_entries`](#ldap_cache_entries) * [`ldap_cache_ttl`](#ldap_cache_ttl) * [`ldap_opcache_entries`](#ldap_opcache_entries) * [`ldap_opcache_ttl`](#ldap_opcache_ttl) * [`ldap_trusted_mode`](#ldap_trusted_mode) * [`ldap_path`](#ldap_path) ##### `apache_version` Data type: `Any` Used to verify that the Apache version you have requested is compatible with the module. Default value: ``undef`` ##### `package_name` Data type: `Any` Specifies the custom package name. Default value: ``undef`` ##### `ldap_trusted_global_cert_file` Data type: `Any` Sets the file or database containing global trusted Certificate Authority or global client certificates. Default value: ``undef`` ##### `ldap_trusted_global_cert_type` Data type: `Optional[String]` Sets the certificate parameter of the global trusted Certificate Authority or global client certificates. Default value: `'CA_BASE64'` ##### `ldap_shared_cache_size` Data type: `Any` Size in bytes of the shared-memory cache Default value: ``undef`` ##### `ldap_cache_entries` Data type: `Any` Maximum number of entries in the primary LDAP cache Default value: ``undef`` ##### `ldap_cache_ttl` Data type: `Any` Time that cached items remain valid (in seconds). Default value: ``undef`` ##### `ldap_opcache_entries` Data type: `Any` Number of entries used to cache LDAP compare operations Default value: ``undef`` ##### `ldap_opcache_ttl` Data type: `Any` Time that entries in the operation cache remain valid (in seconds). Default value: ``undef`` ##### `ldap_trusted_mode` Data type: `Any` Specifies the SSL/TLS mode to be used when connecting to an LDAP server. Default value: ``undef`` ##### `ldap_path` Data type: `String` The server location of the ldap status page. Default value: `'/ldap-status'` ### `apache::mod::lookup_identity` Installs `mod_lookup_identity` * **See also** * https://www.adelton.com/apache/mod_lookup_identity * for additional documentation. ### `apache::mod::macro` Installs `mod_macro`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_macro.html * for additional documentation. ### `apache::mod::md` Installs and configures `mod_md`. * **Note** Unsupported platforms: CentOS: 6, 7; Debian: 8, 9; OracleLinux: all; RedHat: 6, 7; Scientific: all; SLES: all; Ubuntu: 14, 16, 18 * **See also** * https://httpd.apache.org/docs/current/mod/mod_md.html * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::md` class: * [`md_activation_delay`](#md_activation_delay) * [`md_base_server`](#md_base_server) * [`md_ca_challenges`](#md_ca_challenges) * [`md_certificate_agreement`](#md_certificate_agreement) * [`md_certificate_authority`](#md_certificate_authority) * [`md_certificate_check`](#md_certificate_check) * [`md_certificate_monitor`](#md_certificate_monitor) * [`md_certificate_protocol`](#md_certificate_protocol) * [`md_certificate_status`](#md_certificate_status) * [`md_challenge_dns01`](#md_challenge_dns01) * [`md_contact_email`](#md_contact_email) * [`md_http_proxy`](#md_http_proxy) * [`md_members`](#md_members) * [`md_message_cmd`](#md_message_cmd) * [`md_must_staple`](#md_must_staple) * [`md_notify_cmd`](#md_notify_cmd) * [`md_port_map`](#md_port_map) * [`md_private_keys`](#md_private_keys) * [`md_renew_mode`](#md_renew_mode) * [`md_renew_window`](#md_renew_window) * [`md_require_https`](#md_require_https) * [`md_server_status`](#md_server_status) * [`md_staple_others`](#md_staple_others) * [`md_stapling`](#md_stapling) * [`md_stapling_keep_response`](#md_stapling_keep_response) * [`md_stapling_renew_window`](#md_stapling_renew_window) * [`md_store_dir`](#md_store_dir) * [`md_warn_window`](#md_warn_window) ##### `md_activation_delay` Data type: `Optional[String]` - Default value: ``undef`` ##### `md_base_server` Data type: `Optional[Enum['on', 'off']]` Control if base server may be managed or only virtual hosts. Default value: ``undef`` ##### `md_ca_challenges` Data type: `Optional[Array[Enum['dns-01', 'http-01', 'tls-alpn-01']]]` Type of ACME challenge used to prove domain ownership. Default value: ``undef`` ##### `md_certificate_agreement` Data type: `Optional[Enum['accepted']]` You confirm that you accepted the Terms of Service of the Certificate Authority. Default value: ``undef`` ##### `md_certificate_authority` Data type: `Optional[Stdlib::HTTPUrl]` The URL of the ACME Certificate Authority service. Default value: ``undef`` ##### `md_certificate_check` Data type: `Optional[String]` - Default value: ``undef`` ##### `md_certificate_monitor` Data type: `Optional[String]` The URL of a certificate log monitor. Default value: ``undef`` ##### `md_certificate_protocol` Data type: `Optional[Enum['ACME']]` The protocol to use with the Certificate Authority. Default value: ``undef`` ##### `md_certificate_status` Data type: `Optional[Enum['on', 'off']]` Exposes public certificate information in JSON. Default value: ``undef`` ##### `md_challenge_dns01` Data type: `Optional[Stdlib::Absolutepath]` Define a program to be called when the `dns-01` challenge needs to be setup/torn down. Default value: ``undef`` ##### `md_contact_email` Data type: `Optional[String]` The ACME protocol requires you to give a contact url when you sign up. Default value: ``undef`` ##### `md_http_proxy` Data type: `Optional[Stdlib::HTTPUrl]` Define a proxy for outgoing connections. Default value: ``undef`` ##### `md_members` Data type: `Optional[Enum['auto', 'manual']]` Control if the alias domain names are automatically added. Default value: ``undef`` ##### `md_message_cmd` Data type: `Optional[Stdlib::Absolutepath]` Handle events for Manage Domains. Default value: ``undef`` ##### `md_must_staple` Data type: `Optional[Enum['on', 'off']]` Control if new certificates carry the OCSP Must Staple flag. Default value: ``undef`` ##### `md_notify_cmd` Data type: `Optional[Stdlib::Absolutepath]` Run a program when a Managed Domain is ready. Default value: ``undef`` ##### `md_port_map` Data type: `Optional[String]` Map external to internal ports for domain ownership verification. Default value: ``undef`` ##### `md_private_keys` Data type: `Optional[String]` Set type and size of the private keys generated. Default value: ``undef`` ##### `md_renew_mode` Data type: `Optional[Enum['always', 'auto', 'manual']]` Controls if certificates shall be renewed. Default value: ``undef`` ##### `md_renew_window` Data type: `Optional[String]` Control when a certificate will be renewed. Default value: ``undef`` ##### `md_require_https` Data type: `Optional[Enum['off', 'permanent', 'temporary']]` Redirects http: traffic to https: for Managed Domains. An http: Virtual Host must nevertheless be setup for that domain. Default value: ``undef`` ##### `md_server_status` Data type: `Optional[Enum['on', 'off']]` Control if Managed Domain information is added to server-status. Default value: ``undef`` ##### `md_staple_others` Data type: `Optional[Enum['on', 'off']]` Enable stapling for certificates not managed by mod_md. Default value: ``undef`` ##### `md_stapling` Data type: `Optional[Enum['on', 'off']]` Enable stapling for all or a particular MDomain. Default value: ``undef`` ##### `md_stapling_keep_response` Data type: `Optional[String]` Controls when old responses should be removed. Default value: ``undef`` ##### `md_stapling_renew_window` Data type: `Optional[String]` Control when the stapling responses will be renewed. Default value: ``undef`` ##### `md_store_dir` Data type: `Optional[Stdlib::Absolutepath]` Path on the local file system to store the Managed Domains data. Default value: ``undef`` ##### `md_warn_window` Data type: `Optional[String]` Define the time window when you want to be warned about an expiring certificate. Default value: ``undef`` ### `apache::mod::mime` Installs and configures `mod_mime`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_mime.html * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::mime` class: * [`mime_support_package`](#mime_support_package) * [`mime_types_config`](#mime_types_config) * [`mime_types_additional`](#mime_types_additional) ##### `mime_support_package` Data type: `Any` Name of the MIME package to be installed. Default value: `$apache::params::mime_support_package` ##### `mime_types_config` Data type: `Any` The location of the mime.types file. Default value: `$apache::params::mime_types_config` ##### `mime_types_additional` Data type: `Any` List of additional MIME types to include. Default value: ``undef`` ### `apache::mod::mime_magic` Installs and configures `mod_mime_magic`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_mime_magic.html * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::mime_magic` class: * [`magic_file`](#magic_file) ##### `magic_file` Data type: `Any` Enable MIME-type determination based on file contents using the specified magic file. Default value: ``undef`` ### `apache::mod::negotiation` Installs and configures `mod_negotiation`. * **See also** * [https://httpd.apache.org/docs/current/mod/mod_negotiation.html * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::negotiation` class: * [`force_language_priority`](#force_language_priority) * [`language_priority`](#language_priority) ##### `force_language_priority` Data type: `Variant[Array[String], String]` Action to take if a single acceptable document is not found. Default value: `'Prefer Fallback'` ##### `language_priority` Data type: `Variant[Array[String], String]` The precedence of language variants for cases where the client does not express a preference. Default value: `['en', 'ca', 'cs', 'da', 'de', 'el', 'eo', 'es', 'et', 'fr', 'he', 'hr', 'it', 'ja', 'ko', 'ltz', 'nl', 'nn', 'no', 'pl', 'pt', 'pt-BR', 'ru', 'sv', 'zh-CN', 'zh-TW']` ### `apache::mod::nss` Installs and configures `mod_nss`. * **See also** * https://pagure.io/mod_nss * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::nss` class: * [`transfer_log`](#transfer_log) * [`error_Log`](#error_Log) * [`passwd_file`](#passwd_file) * [`port`](#port) * [`error_log`](#error_log) ##### `transfer_log` Data type: `Any` Path to `access.log`. Default value: `"${apache::params::logroot}/access.log"` ##### `error_Log` Path to `error.log` ##### `passwd_file` Data type: `Any` Path to file containing token passwords used for NSSPassPhraseDialog. Default value: ``undef`` ##### `port` Data type: `Any` Sets the SSL port that should be used by mod_nss. Default value: `8443` ##### `error_log` Data type: `Any` Default value: `"${apache::params::logroot}/error.log"` ### `apache::mod::pagespeed` Although this apache module requires the mod-pagespeed-stable package, Puppet does not manage the software repositories required to automatically install the package. If you declare this class when the package is either not installed or not available to your package manager, your Puppet run will fail. * **TODO** Add docs * **Note** Verify that your system is compatible with the latest Google Pagespeed requirements. * **See also** * https://developers.google.com/speed/pagespeed/module/ * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::pagespeed` class: * [`inherit_vhost_config`](#inherit_vhost_config) * [`filter_xhtml`](#filter_xhtml) * [`cache_path`](#cache_path) * [`log_dir`](#log_dir) * [`memcache_servers`](#memcache_servers) * [`rewrite_level`](#rewrite_level) * [`disable_filters`](#disable_filters) * [`enable_filters`](#enable_filters) * [`forbid_filters`](#forbid_filters) * [`rewrite_deadline_per_flush_ms`](#rewrite_deadline_per_flush_ms) * [`additional_domains`](#additional_domains) * [`file_cache_size_kb`](#file_cache_size_kb) * [`file_cache_clean_interval_ms`](#file_cache_clean_interval_ms) * [`lru_cache_per_process`](#lru_cache_per_process) * [`lru_cache_byte_limit`](#lru_cache_byte_limit) * [`css_flatten_max_bytes`](#css_flatten_max_bytes) * [`css_inline_max_bytes`](#css_inline_max_bytes) * [`css_image_inline_max_bytes`](#css_image_inline_max_bytes) * [`image_inline_max_bytes`](#image_inline_max_bytes) * [`js_inline_max_bytes`](#js_inline_max_bytes) * [`css_outline_min_bytes`](#css_outline_min_bytes) * [`js_outline_min_bytes`](#js_outline_min_bytes) * [`inode_limit`](#inode_limit) * [`image_max_rewrites_at_once`](#image_max_rewrites_at_once) * [`num_rewrite_threads`](#num_rewrite_threads) * [`num_expensive_rewrite_threads`](#num_expensive_rewrite_threads) * [`collect_statistics`](#collect_statistics) * [`statistics_logging`](#statistics_logging) * [`allow_view_stats`](#allow_view_stats) * [`allow_pagespeed_console`](#allow_pagespeed_console) * [`allow_pagespeed_message`](#allow_pagespeed_message) * [`message_buffer_size`](#message_buffer_size) * [`additional_configuration`](#additional_configuration) * [`apache_version`](#apache_version) * [`package_ensure`](#package_ensure) ##### `inherit_vhost_config` Data type: `Any` Default value: `'on'` ##### `filter_xhtml` Data type: `Any` Default value: ``false`` ##### `cache_path` Data type: `Any` Default value: `'/var/cache/mod_pagespeed/'` ##### `log_dir` Data type: `Any` Default value: `'/var/log/pagespeed'` ##### `memcache_servers` Data type: `Any` Default value: `[]` ##### `rewrite_level` Data type: `Any` Default value: `'CoreFilters'` ##### `disable_filters` Data type: `Any` Default value: `[]` ##### `enable_filters` Data type: `Any` Default value: `[]` ##### `forbid_filters` Data type: `Any` Default value: `[]` ##### `rewrite_deadline_per_flush_ms` Data type: `Any` Default value: `10` ##### `additional_domains` Data type: `Any` Default value: ``undef`` ##### `file_cache_size_kb` Data type: `Any` Default value: `102400` ##### `file_cache_clean_interval_ms` Data type: `Any` Default value: `3600000` ##### `lru_cache_per_process` Data type: `Any` Default value: `1024` ##### `lru_cache_byte_limit` Data type: `Any` Default value: `16384` ##### `css_flatten_max_bytes` Data type: `Any` Default value: `2048` ##### `css_inline_max_bytes` Data type: `Any` Default value: `2048` ##### `css_image_inline_max_bytes` Data type: `Any` Default value: `2048` ##### `image_inline_max_bytes` Data type: `Any` Default value: `2048` ##### `js_inline_max_bytes` Data type: `Any` Default value: `2048` ##### `css_outline_min_bytes` Data type: `Any` Default value: `3000` ##### `js_outline_min_bytes` Data type: `Any` Default value: `3000` ##### `inode_limit` Data type: `Any` Default value: `500000` ##### `image_max_rewrites_at_once` Data type: `Any` Default value: `8` ##### `num_rewrite_threads` Data type: `Any` Default value: `4` ##### `num_expensive_rewrite_threads` Data type: `Any` Default value: `4` ##### `collect_statistics` Data type: `Any` Default value: `'on'` ##### `statistics_logging` Data type: `Any` Default value: `'on'` ##### `allow_view_stats` Data type: `Any` Default value: `[]` ##### `allow_pagespeed_console` Data type: `Any` Default value: `[]` ##### `allow_pagespeed_message` Data type: `Any` Default value: `[]` ##### `message_buffer_size` Data type: `Any` Default value: `100000` ##### `additional_configuration` Data type: `Any` Default value: `{}` ##### `apache_version` Data type: `Any` Default value: ``undef`` ##### `package_ensure` Data type: `Any` Default value: ``undef`` ### `apache::mod::passenger` The current set of server configurations settings were taken directly from the Passenger Reference. To enable deprecation warnings and removal failure messages, set the passenger_installed_version to the version number installed on the server. Change Log: - As of 08/13/2017 there are 84 available/deprecated/removed settings. - Around 08/20/2017 UnionStation was discontinued options were removed. - As of 08/20/2017 there are 77 available/deprecated/removed settings. * **Note** In Passenger source code you can strip out what are all the available options by looking in - src/apache2_module/Configuration.cpp - src/apache2_module/ConfigurationCommands.cpp There are also several undocumented settings. * **See also** * https://www.phusionpassenger.com/docs/references/config_reference/apache/ * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::passenger` class: * [`manage_repo`](#manage_repo) * [`mod_id`](#mod_id) * [`mod_lib`](#mod_lib) * [`mod_lib_path`](#mod_lib_path) * [`mod_package`](#mod_package) * [`mod_package_ensure`](#mod_package_ensure) * [`mod_path`](#mod_path) * [`passenger_allow_encoded_slashes`](#passenger_allow_encoded_slashes) * [`passenger_app_env`](#passenger_app_env) * [`passenger_app_group_name`](#passenger_app_group_name) * [`passenger_app_root`](#passenger_app_root) * [`passenger_app_type`](#passenger_app_type) * [`passenger_base_uri`](#passenger_base_uri) * [`passenger_buffer_response`](#passenger_buffer_response) * [`passenger_buffer_upload`](#passenger_buffer_upload) * [`passenger_concurrency_model`](#passenger_concurrency_model) * [`passenger_conf_file`](#passenger_conf_file) * [`passenger_conf_package_file`](#passenger_conf_package_file) * [`passenger_data_buffer_dir`](#passenger_data_buffer_dir) * [`passenger_debug_log_file`](#passenger_debug_log_file) * [`passenger_debugger`](#passenger_debugger) * [`passenger_default_group`](#passenger_default_group) * [`passenger_default_ruby`](#passenger_default_ruby) * [`passenger_default_user`](#passenger_default_user) * [`passenger_disable_security_update_check`](#passenger_disable_security_update_check) * [`passenger_enabled`](#passenger_enabled) * [`passenger_error_override`](#passenger_error_override) * [`passenger_file_descriptor_log_file`](#passenger_file_descriptor_log_file) * [`passenger_fly_with`](#passenger_fly_with) * [`passenger_force_max_concurrent_requests_per_process`](#passenger_force_max_concurrent_requests_per_process) * [`passenger_friendly_error_pages`](#passenger_friendly_error_pages) * [`passenger_group`](#passenger_group) * [`passenger_high_performance`](#passenger_high_performance) * [`passenger_installed_version`](#passenger_installed_version) * [`passenger_instance_registry_dir`](#passenger_instance_registry_dir) * [`passenger_load_shell_envvars`](#passenger_load_shell_envvars) * [`passenger_log_file`](#passenger_log_file) * [`passenger_log_level`](#passenger_log_level) * [`passenger_lve_min_uid`](#passenger_lve_min_uid) * [`passenger_max_instances`](#passenger_max_instances) * [`passenger_max_instances_per_app`](#passenger_max_instances_per_app) * [`passenger_max_pool_size`](#passenger_max_pool_size) * [`passenger_max_preloader_idle_time`](#passenger_max_preloader_idle_time) * [`passenger_max_request_queue_size`](#passenger_max_request_queue_size) * [`passenger_max_request_time`](#passenger_max_request_time) * [`passenger_max_requests`](#passenger_max_requests) * [`passenger_memory_limit`](#passenger_memory_limit) * [`passenger_meteor_app_settings`](#passenger_meteor_app_settings) * [`passenger_min_instances`](#passenger_min_instances) * [`passenger_nodejs`](#passenger_nodejs) * [`passenger_pool_idle_time`](#passenger_pool_idle_time) * [`passenger_pre_start`](#passenger_pre_start) * [`passenger_python`](#passenger_python) * [`passenger_resist_deployment_errors`](#passenger_resist_deployment_errors) * [`passenger_resolve_symlinks_in_document_root`](#passenger_resolve_symlinks_in_document_root) * [`passenger_response_buffer_high_watermark`](#passenger_response_buffer_high_watermark) * [`passenger_restart_dir`](#passenger_restart_dir) * [`passenger_rolling_restarts`](#passenger_rolling_restarts) * [`passenger_root`](#passenger_root) * [`passenger_ruby`](#passenger_ruby) * [`passenger_security_update_check_proxy`](#passenger_security_update_check_proxy) * [`passenger_show_version_in_header`](#passenger_show_version_in_header) * [`passenger_socket_backlog`](#passenger_socket_backlog) * [`passenger_spawn_method`](#passenger_spawn_method) * [`passenger_start_timeout`](#passenger_start_timeout) * [`passenger_startup_file`](#passenger_startup_file) * [`passenger_stat_throttle_rate`](#passenger_stat_throttle_rate) * [`passenger_sticky_sessions`](#passenger_sticky_sessions) * [`passenger_sticky_sessions_cookie_name`](#passenger_sticky_sessions_cookie_name) * [`passenger_thread_count`](#passenger_thread_count) * [`passenger_use_global_queue`](#passenger_use_global_queue) * [`passenger_user`](#passenger_user) * [`passenger_user_switching`](#passenger_user_switching) * [`rack_auto_detect`](#rack_auto_detect) * [`rack_autodetect`](#rack_autodetect) * [`rack_base_uri`](#rack_base_uri) * [`rack_env`](#rack_env) * [`rails_allow_mod_rewrite`](#rails_allow_mod_rewrite) * [`rails_app_spawner_idle_time`](#rails_app_spawner_idle_time) * [`rails_auto_detect`](#rails_auto_detect) * [`rails_autodetect`](#rails_autodetect) * [`rails_base_uri`](#rails_base_uri) * [`rails_default_user`](#rails_default_user) * [`rails_env`](#rails_env) * [`rails_framework_spawner_idle_time`](#rails_framework_spawner_idle_time) * [`rails_ruby`](#rails_ruby) * [`rails_spawn_method`](#rails_spawn_method) * [`rails_user_switching`](#rails_user_switching) * [`wsgi_auto_detect`](#wsgi_auto_detect) * [`passenger_anonymous_telemetry_proxy`](#passenger_anonymous_telemetry_proxy) * [`passenger_disable_anonymous_telemetry`](#passenger_disable_anonymous_telemetry) * [`passenger_disable_log_prefix`](#passenger_disable_log_prefix) * [`passenger_spawn_dir`](#passenger_spawn_dir) * [`passenger_sticky_sessions_cookie_attributes`](#passenger_sticky_sessions_cookie_attributes) ##### `manage_repo` Data type: `Any` Toggle whether to manage yum repo if on a RedHat node. Default value: ``true`` ##### `mod_id` Data type: `Any` Specifies the package id. Default value: ``undef`` ##### `mod_lib` Data type: `Any` Defines the module's shared object name. Do not configure manually without special reason. Default value: ``undef`` ##### `mod_lib_path` Data type: `Any` Specifies a path to the module's libraries. Do not manually set this parameter without special reason. The `path` parameter overrides this value. Default value: ``undef`` ##### `mod_package` Data type: `Any` Name of the module package to install. Default value: ``undef`` ##### `mod_package_ensure` Data type: `Any` Determines whether Puppet ensures the module should be installed. Default value: ``undef`` ##### `mod_path` Data type: `Any` Specifies a path to the module. Do not manually set this parameter without a special reason. Default value: ``undef`` ##### `passenger_allow_encoded_slashes` Data type: `Any` Toggle whether URLs with encoded slashes (%2f) can be used (by default Apache does not support this). Default value: ``undef`` ##### `passenger_app_env` Data type: `Any` This option sets, for the current application, the value of the following environment variables: - RAILS_ENV - RACK_ENV - WSGI_ENV - NODE_ENV - PASSENGER_APP_ENV Default value: ``undef`` ##### `passenger_app_group_name` Data type: `Any` Sets the name of the application group that the current application should belong to. Default value: ``undef`` ##### `passenger_app_root` Data type: `Any` Path to the application root which allows access independent from the DocumentRoot. Default value: ``undef`` ##### `passenger_app_type` Data type: `Any` Specifies the type of the application. If you set this option, then you must also set PassengerAppRoot, otherwise Passenger will not properly recognize your application. Default value: ``undef`` ##### `passenger_base_uri` Data type: `Any` Used to specify that the given URI is an distinct application that should be served by Passenger. Default value: ``undef`` ##### `passenger_buffer_response` Data type: `Any` Toggle whether application-generated responses are buffered by Apache. Buffering will happen in memory. Default value: ``undef`` ##### `passenger_buffer_upload` Data type: `Any` Toggle whether HTTP client request bodies are buffered before they are sent to the application. Default value: ``undef`` ##### `passenger_concurrency_model` Data type: `Any` Specifies the I/O concurrency model that should be used for Ruby application processes. Default value: ``undef`` ##### `passenger_conf_file` Data type: `Any` Default value: `$apache::params::passenger_conf_file` ##### `passenger_conf_package_file` Data type: `Any` Default value: `$apache::params::passenger_conf_package_file` ##### `passenger_data_buffer_dir` Data type: `Any` Specifies the directory in which to store data buffers. Default value: ``undef`` ##### `passenger_debug_log_file` Data type: `Any` Default value: ``undef`` ##### `passenger_debugger` Data type: `Any` Turns support for Ruby application debugging on or off. Default value: ``undef`` ##### `passenger_default_group` Data type: `Any` Allows you to specify the group that applications must run as, if user switching fails or is disabled. Default value: ``undef`` ##### `passenger_default_ruby` Data type: `Any` File path to desired ruby interpreter to use by default. Default value: `$apache::params::passenger_default_ruby` ##### `passenger_default_user` Data type: `Any` Allows you to specify the user that applications must run as, if user switching fails or is disabled. Default value: ``undef`` ##### `passenger_disable_security_update_check` Data type: `Any` Allows disabling the Passenger security update check, a daily check with https://securitycheck.phusionpassenger.com for important security updates that might be available. Default value: ``undef`` ##### `passenger_enabled` Data type: `Any` Toggles whether Passenger should be enabled for that particular context. Default value: ``undef`` ##### `passenger_error_override` Data type: `Any` Toggles whether Apache will intercept and handle responses with HTTP status codes of 400 and higher. Default value: ``undef`` ##### `passenger_file_descriptor_log_file` Data type: `Any` Log file descriptor debug tracing messages to the given file. Default value: ``undef`` ##### `passenger_fly_with` Data type: `Any` Enables the Flying Passenger mode, and configures Apache to connect to the Flying Passenger daemon that's listening on the given socket filename. Default value: ``undef`` ##### `passenger_force_max_concurrent_requests_per_process` Data type: `Any` Use this option to tell Passenger how many concurrent requests the application can handle per process. Default value: ``undef`` ##### `passenger_friendly_error_pages` Data type: `Any` Toggles whether Passenger should display friendly error pages whenever an application fails to start. Default value: ``undef`` ##### `passenger_group` Data type: `Any` Allows you to override that behavior and explicitly set a group to run the web application as, regardless of the ownership of the startup file. Default value: ``undef`` ##### `passenger_high_performance` Data type: `Any` Toggles whether to enable PassengerHighPerformance which will make Passenger will be a little faster, in return for reduced compatibility with other Apache modules. Default value: ``undef`` ##### `passenger_installed_version` Data type: `Any` Default value: ``undef`` ##### `passenger_instance_registry_dir` Data type: `Any` Specifies the directory that Passenger should use for registering its current instance. Default value: ``undef`` ##### `passenger_load_shell_envvars` Data type: `Any` Enables or disables the loading of shell environment variables before spawning the application. Default value: ``undef`` ##### `passenger_log_file` Data type: `Optional[Stdlib::Absolutepath]` File path to log file. By default Passenger log messages are written to the Apache global error log. Default value: ``undef`` ##### `passenger_log_level` Data type: `Any` Specifies how much information Passenger should log to its log file. A higher log level value means that more information will be logged. Default value: ``undef`` ##### `passenger_lve_min_uid` Data type: `Any` When using Passenger on a LVE-enabled kernel, a security check (enter) is run for spawning application processes. This options tells the check to only allow processes with UIDs equal to, or higher than, the specified value. Default value: ``undef`` ##### `passenger_max_instances` Data type: `Any` The maximum number of application processes that may simultaneously exist for an application. Default value: ``undef`` ##### `passenger_max_instances_per_app` Data type: `Any` The maximum number of application processes that may simultaneously exist for a single application. Default value: ``undef`` ##### `passenger_max_pool_size` Data type: `Any` The maximum number of application processes that may simultaneously exist. Default value: ``undef`` ##### `passenger_max_preloader_idle_time` Data type: `Any` Set the preloader's idle timeout, in seconds. A value of 0 means that it should never idle timeout. Default value: ``undef`` ##### `passenger_max_request_queue_size` Data type: `Any` Specifies the maximum size for the queue of all incoming requests. Default value: ``undef`` ##### `passenger_max_request_time` Data type: `Any` The maximum amount of time, in seconds, that an application process may take to process a request. Default value: ``undef`` ##### `passenger_max_requests` Data type: `Any` The maximum number of requests an application process will process. Default value: ``undef`` ##### `passenger_memory_limit` Data type: `Any` The maximum amount of memory that an application process may use, in megabytes. Default value: ``undef`` ##### `passenger_meteor_app_settings` Data type: `Any` When using a Meteor application in non-bundled mode, use this option to specify a JSON file with settings for the application. Default value: ``undef`` ##### `passenger_min_instances` Data type: `Any` Specifies the minimum number of application processes that should exist for a given application. Default value: ``undef`` ##### `passenger_nodejs` Data type: `Any` Specifies the Node.js command to use for serving Node.js web applications. Default value: ``undef`` ##### `passenger_pool_idle_time` Data type: `Any` The maximum number of seconds that an application process may be idle. Default value: ``undef`` ##### `passenger_pre_start` Data type: `Optional[Variant[String,Array[String]]]` URL of the web application you want to pre-start. Default value: ``undef`` ##### `passenger_python` Data type: `Any` Specifies the Python interpreter to use for serving Python web applications. Default value: ``undef`` ##### `passenger_resist_deployment_errors` Data type: `Any` Enables or disables resistance against deployment errors. Default value: ``undef`` ##### `passenger_resolve_symlinks_in_document_root` Data type: `Any` This option is no longer available in version 5.2.0. Switch to PassengerAppRoot if you are setting the application root via a document root containing symlinks. Default value: ``undef`` ##### `passenger_response_buffer_high_watermark` Data type: `Any` Configures the maximum size of the real-time disk-backed response buffering system. Default value: ``undef`` ##### `passenger_restart_dir` Data type: `Any` Path to directory containing restart.txt file. Can be either absolute or relative. Default value: ``undef`` ##### `passenger_rolling_restarts` Data type: `Any` Enables or disables support for zero-downtime application restarts through restart.txt. Default value: ``undef`` ##### `passenger_root` Data type: `Any` Refers to the location to the Passenger root directory, or to a location configuration file. Default value: `$apache::params::passenger_root` ##### `passenger_ruby` Data type: `Any` Specifies the Ruby interpreter to use for serving Ruby web applications. Default value: `$apache::params::passenger_ruby` ##### `passenger_security_update_check_proxy` Data type: `Any` Allows use of an intermediate proxy for the Passenger security update check. Default value: ``undef`` ##### `passenger_show_version_in_header` Data type: `Any` Toggle whether Passenger will output its version number in the X-Powered-By header in all Passenger-served requests: Default value: ``undef`` ##### `passenger_socket_backlog` Data type: `Any` This option can be raised if Apache manages to overflow the backlog queue. Default value: ``undef`` ##### `passenger_spawn_method` Data type: `Optional[Enum['smart', 'direct', 'smart-lv2', 'conservative']]` Controls whether Passenger spawns applications directly, or using a prefork copy-on-write mechanism. Default value: ``undef`` ##### `passenger_start_timeout` Data type: `Any` Specifies a timeout for the startup of application processes. Default value: ``undef`` ##### `passenger_startup_file` Data type: `Any` Specifies the startup file that Passenger should use when loading the application. Default value: ``undef`` ##### `passenger_stat_throttle_rate` Data type: `Any` Setting this option to a value of x means that certain filesystem checks will be performed at most once every x seconds. Default value: ``undef`` ##### `passenger_sticky_sessions` Data type: `Any` Toggles whether all requests that a client sends will be routed to the same originating application process, whenever possible. Default value: ``undef`` ##### `passenger_sticky_sessions_cookie_name` Data type: `Any` Sets the name of the sticky sessions cookie. Default value: ``undef`` ##### `passenger_thread_count` Data type: `Any` Specifies the number of threads that Passenger should spawn per Ruby application process. Default value: ``undef`` ##### `passenger_use_global_queue` Data type: `Any` N/A. Default value: ``undef`` ##### `passenger_user` Data type: `Any` Allows you to override that behavior and explicitly set a user to run the web application as, regardless of the ownership of the startup file. Default value: ``undef`` ##### `passenger_user_switching` Data type: `Any` Toggles whether to attempt to enable user account sandboxing, also known as user switching. Default value: ``undef`` ##### `rack_auto_detect` Data type: `Any` This option has been removed in version 4.0.0 as part of an optimization. You should use PassengerEnabled instead. Default value: ``undef`` ##### `rack_autodetect` Data type: `Any` This option has been removed in version 4.0.0 as part of an optimization. You should use PassengerEnabled instead. Default value: ``undef`` ##### `rack_base_uri` Data type: `Any` Deprecated in 3.0.0 in favor of PassengerBaseURI. Default value: ``undef`` ##### `rack_env` Data type: `Any` Alias for PassengerAppEnv. Default value: ``undef`` ##### `rails_allow_mod_rewrite` Data type: `Any` This option doesn't do anything anymore since version 4.0.0. Default value: ``undef`` ##### `rails_app_spawner_idle_time` Data type: `Any` This option has been removed in version 4.0.0, and replaced with PassengerMaxPreloaderIdleTime. Default value: ``undef`` ##### `rails_auto_detect` Data type: `Any` This option has been removed in version 4.0.0 as part of an optimization. You should use PassengerEnabled instead. Default value: ``undef`` ##### `rails_autodetect` Data type: `Any` This option has been removed in version 4.0.0 as part of an optimization. You should use PassengerEnabled instead. Default value: ``undef`` ##### `rails_base_uri` Data type: `Any` Deprecated in 3.0.0 in favor of PassengerBaseURI. Default value: ``undef`` ##### `rails_default_user` Data type: `Any` Deprecated in 3.0.0 in favor of PassengerDefaultUser Default value: ``undef`` ##### `rails_env` Data type: `Any` Alias for PassengerAppEnv. Default value: ``undef`` ##### `rails_framework_spawner_idle_time` Data type: `Any` This option is no longer available in version 4.0.0. There is no alternative because framework spawning has been removed altogether. You should use smart spawning instead. Default value: ``undef`` ##### `rails_ruby` Data type: `Any` Deprecated in 3.0.0 in favor of PassengerRuby. Default value: ``undef`` ##### `rails_spawn_method` Data type: `Any` Deprecated in 3.0.0 in favor of PassengerSpawnMethod. Default value: ``undef`` ##### `rails_user_switching` Data type: `Any` Deprecated in 3.0.0 in favor of PassengerUserSwitching. Default value: ``undef`` ##### `wsgi_auto_detect` Data type: `Any` This option has been removed in version 4.0.0 as part of an optimization. You should use PassengerEnabled instead. Default value: ``undef`` ##### `passenger_anonymous_telemetry_proxy` Data type: `Optional[String]` Default value: ``undef`` ##### `passenger_disable_anonymous_telemetry` Data type: `Optional[Boolean]` Default value: ``undef`` ##### `passenger_disable_log_prefix` Data type: `Optional[Boolean]` Default value: ``undef`` ##### `passenger_spawn_dir` Data type: `Optional[String]` Default value: ``undef`` ##### `passenger_sticky_sessions_cookie_attributes` Data type: `Optional[String]` Default value: ``undef`` ### `apache::mod::perl` Installs `mod_perl`. * **See also** * https://perl.apache.org * for additional documentation. ### `apache::mod::peruser` Installs `mod_peruser`. * **TODO** Add docs #### Parameters The following parameters are available in the `apache::mod::peruser` class: * [`minspareprocessors`](#minspareprocessors) * [`minprocessors`](#minprocessors) * [`maxprocessors`](#maxprocessors) * [`maxclients`](#maxclients) * [`maxrequestsperchild`](#maxrequestsperchild) * [`idletimeout`](#idletimeout) * [`expiretimeout`](#expiretimeout) * [`keepalive`](#keepalive) ##### `minspareprocessors` Data type: `Any` Default value: `'2'` ##### `minprocessors` Data type: `Any` Default value: `'2'` ##### `maxprocessors` Data type: `Any` Default value: `'10'` ##### `maxclients` Data type: `Any` Default value: `'150'` ##### `maxrequestsperchild` Data type: `Any` Default value: `'1000'` ##### `idletimeout` Data type: `Any` Default value: `'120'` ##### `expiretimeout` Data type: `Any` Default value: `'120'` ##### `keepalive` Data type: `Any` Default value: `'Off'` ### `apache::mod::php` Installs `mod_php`. * **TODO** Add docs #### Parameters The following parameters are available in the `apache::mod::php` class: * [`package_name`](#package_name) * [`package_ensure`](#package_ensure) * [`path`](#path) * [`extensions`](#extensions) * [`content`](#content) * [`template`](#template) * [`source`](#source) * [`root_group`](#root_group) * [`php_version`](#php_version) * [`libphp_prefix`](#libphp_prefix) ##### `package_name` Data type: `Any` Default value: ``undef`` ##### `package_ensure` Data type: `Any` Default value: `'present'` ##### `path` Data type: `Any` Default value: ``undef`` ##### `extensions` Data type: `Array` Default value: `['.php']` ##### `content` Data type: `Any` Default value: ``undef`` ##### `template` Data type: `Any` Default value: `'apache/mod/php.conf.erb'` ##### `source` Data type: `Any` Default value: ``undef`` ##### `root_group` Data type: `Any` Default value: `$apache::params::root_group` ##### `php_version` Data type: `Any` Default value: `$apache::params::php_version` ##### `libphp_prefix` Data type: `Any` Default value: `'libphp'` ### `apache::mod::prefork` Installs and configures MPM `prefork`. * **See also** * https://httpd.apache.org/docs/current/mod/prefork.html * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::prefork` class: * [`startservers`](#startservers) * [`minspareservers`](#minspareservers) * [`maxspareservers`](#maxspareservers) * [`serverlimit`](#serverlimit) * [`maxclients`](#maxclients) * [`maxrequestworkers`](#maxrequestworkers) * [`maxrequestsperchild`](#maxrequestsperchild) * [`maxconnectionsperchild`](#maxconnectionsperchild) * [`apache_version`](#apache_version) * [`listenbacklog`](#listenbacklog) ##### `startservers` Data type: `Any` Number of child server processes created at startup. Default value: `'8'` ##### `minspareservers` Data type: `Any` Minimum number of idle child server processes. Default value: `'5'` ##### `maxspareservers` Data type: `Any` Maximum number of idle child server processes. Default value: `'20'` ##### `serverlimit` Data type: `Any` Upper limit on configurable number of processes. Default value: `'256'` ##### `maxclients` Data type: `Any` Old alias for MaxRequestWorkers. Default value: `'256'` ##### `maxrequestworkers` Data type: `Any` Maximum number of connections that will be processed simultaneously. Default value: ``undef`` ##### `maxrequestsperchild` Data type: `Any` Old alias for MaxConnectionsPerChild. Default value: `'4000'` ##### `maxconnectionsperchild` Data type: `Any` Limit on the number of connections that an individual child server will handle during its life. Default value: ``undef`` ##### `apache_version` Data type: `Any` Used to verify that the Apache version you have requested is compatible with the module. Default value: ``undef`` ##### `listenbacklog` Data type: `Any` Maximum length of the queue of pending connections. Default value: `'511'` ### `apache::mod::proxy` Installs and configures `mod_proxy`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_proxy.html * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::proxy` class: * [`proxy_requests`](#proxy_requests) * [`allow_from`](#allow_from) * [`apache_version`](#apache_version) * [`package_name`](#package_name) * [`proxy_via`](#proxy_via) * [`proxy_timeout`](#proxy_timeout) * [`proxy_iobuffersize`](#proxy_iobuffersize) ##### `proxy_requests` Data type: `Any` Enables forward (standard) proxy requests. Default value: `'Off'` ##### `allow_from` Data type: `Any` List of IPs allowed to access proxy. Default value: ``undef`` ##### `apache_version` Data type: `Any` Used to verify that the Apache version you have requested is compatible with the module. Default value: ``undef`` ##### `package_name` Data type: `Any` Name of the proxy package to install. Default value: ``undef`` ##### `proxy_via` Data type: `Any` Set local IP address for outgoing proxy connections. Default value: `'On'` ##### `proxy_timeout` Data type: `Any` Network timeout for proxied requests. Default value: ``undef`` ##### `proxy_iobuffersize` Data type: `Any` Set the size of internal data throughput buffer Default value: ``undef`` ### `apache::mod::proxy_ajp` Installs `mod_proxy_ajp`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_proxy_ajp.html * for additional documentation. ### `apache::mod::proxy_balancer` Installs and configures `mod_proxy_balancer`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_proxy_balancer.html * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::proxy_balancer` class: * [`manager`](#manager) * [`maanger_path`](#maanger_path) * [`allow_from`](#allow_from) * [`apache_version`](#apache_version) * [`manager_path`](#manager_path) ##### `manager` Data type: `Boolean` Toggle whether to enable balancer manager support. Default value: ``false`` ##### `maanger_path` Server relative path to balancer manager. ##### `allow_from` Data type: `Array` List of IPs from which the balancer manager can be accessed. Default value: `['127.0.0.1','::1']` ##### `apache_version` Data type: `Any` Version of Apache to install module on. Default value: `$apache::apache_version` ##### `manager_path` Data type: `Stdlib::Absolutepath` Default value: `'/balancer-manager'` ### `apache::mod::proxy_connect` Installs `mod_proxy_connect`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_proxy_connect.html * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::proxy_connect` class: * [`apache_version`](#apache_version) ##### `apache_version` Data type: `Any` Used to verify that the Apache version you have requested is compatible with the module. Default value: ``undef`` ### `apache::mod::proxy_fcgi` Installs `mod_proxy_fcgi`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_proxy_fcgi.html * for additional documentation. ### `apache::mod::proxy_html` Installs `mod_proxy_html`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_proxy_html.html * for additional documentation. ### `apache::mod::proxy_http` Installs `mod_proxy_http`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_proxy_http.html * for additional documentation. ### `apache::mod::proxy_wstunnel` Installs `mod_proxy_wstunnel`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_proxy_wstunnel.html * for additional documentation. ### `apache::mod::python` Installs and configures `mod_python`. * **See also** * https://github.com/grisha/mod_python * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::python` class: * [`loadfile_name`](#loadfile_name) ##### `loadfile_name` Data type: `Optional[String]` Sets the name of the configuration file that is used to load the python module. Default value: ``undef`` ### `apache::mod::remoteip` Installs and configures `mod_remoteip`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_remoteip.html * https://httpd.apache.org/docs/current/mod/mod_remoteip.html * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::remoteip` class: * [`header`](#header) * [`internal_proxy`](#internal_proxy) * [`proxy_ips`](#proxy_ips) * [`internal_proxy_list`](#internal_proxy_list) * [`proxies_header`](#proxies_header) * [`proxy_protocol`](#proxy_protocol) * [`proxy_protocol_exceptions`](#proxy_protocol_exceptions) * [`trusted_proxy`](#trusted_proxy) * [`trusted_proxy_ips`](#trusted_proxy_ips) * [`trusted_proxy_list`](#trusted_proxy_list) * [`apache_version`](#apache_version) ##### `header` Data type: `String` The header field in which `mod_remoteip` will look for the useragent IP. Default value: `'X-Forwarded-For'` ##### `internal_proxy` Data type: `Optional[Array[Variant[Stdlib::Host,Stdlib::IP::Address]]]` A list of IP addresses, IP blocks or hostname that are trusted to set a valid value inside specified header. Unlike the `$trusted_proxy_ips` parameter, any IP address (including private addresses) presented by these proxies will trusted by `mod_remoteip`. Default value: ``undef`` ##### `proxy_ips` Data type: `Optional[Array[Variant[Stdlib::Host,Stdlib::IP::Address]]]` *Deprecated*: use `$internal_proxy` instead. Default value: ``undef`` ##### `internal_proxy_list` Data type: `Optional[Stdlib::Absolutepath]` The path to a file containing a list of IP addresses, IP blocks or hostname that are trusted to set a valid value inside the specified header. See `$internal_proxy` for details. Default value: ``undef`` ##### `proxies_header` Data type: `Optional[String]` A header into which `mod_remoteip` will collect a list of all of the intermediate client IP addresses trusted to resolve the useragent IP of the request (e.g. `X-Forwarded-By`). Default value: ``undef`` ##### `proxy_protocol` Data type: `Boolean` Wether or not to enable the PROXY protocol header handling. If enabled upstream clients must set the header every time they open a connection. Default value: ``false`` ##### `proxy_protocol_exceptions` Data type: `Optional[Array[Variant[Stdlib::Host,Stdlib::IP::Address]]]` A list of IP address or IP blocks that are not required to use the PROXY protocol. Default value: ``undef`` ##### `trusted_proxy` Data type: `Optional[Array[Stdlib::Host]]` A list of IP addresses, IP blocks or hostname that are trusted to set a valid value inside the specified header. Unlike the `$proxy_ips` parameter, any private IP presented by these proxies will be disgarded by `mod_remoteip`. Default value: ``undef`` ##### `trusted_proxy_ips` Data type: `Optional[Array[Stdlib::Host]]` *Deprecated*: use `$trusted_proxy` instead. Default value: ``undef`` ##### `trusted_proxy_list` Data type: `Optional[Stdlib::Absolutepath]` The path to a file containing a list of IP addresses, IP blocks or hostname that are trusted to set a valid value inside the specified header. See `$trusted_proxy` for details. Default value: ``undef`` ##### `apache_version` Data type: `Optional[String]` A version string used to validate that your apache version supports `mod_remoteip`. If not specified, `$::apache::apache_version` is used. Default value: ``undef`` ### `apache::mod::reqtimeout` Installs and configures `mod_reqtimeout`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_reqtimeout.html * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::reqtimeout` class: * [`timeouts`](#timeouts) ##### `timeouts` Data type: `Any` List of timeouts and data rates for receiving requests. Default value: `['header=20-40,minrate=500', 'body=10,minrate=500']` ### `apache::mod::rewrite` Installs `mod_rewrite`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_rewrite.html * for additional documentation. ### `apache::mod::rpaf` Installs and configures `mod_rpaf`. * **See also** * https://github.com/gnif/mod_rpaf * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::rpaf` class: * [`sethostname`](#sethostname) * [`proxy_ips`](#proxy_ips) * [`header`](#header) * [`template`](#template) ##### `sethostname` Data type: `Any` Toggles whether to update vhost name so ServerName and ServerAlias work. Default value: ``true`` ##### `proxy_ips` Data type: `Any` List of IPs & bitmasked subnets to adjust requests for Default value: `['127.0.0.1']` ##### `header` Data type: `Any` Header to use for the real IP address. Default value: `'X-Forwarded-For'` ##### `template` Data type: `Any` Path to template to use for configuring mod_rpaf. Default value: `'apache/mod/rpaf.conf.erb'` ### `apache::mod::security` Installs and configures `mod_security`. * **See also** * https://github.com/SpiderLabs/ModSecurity/wiki * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::security` class: * [`version`](#version) * [`logroot`](#logroot) * [`crs_package`](#crs_package) * [`activated_rules`](#activated_rules) * [`modsec_dir`](#modsec_dir) * [`modsec_secruleengine`](#modsec_secruleengine) * [`audit_log_relevant_status`](#audit_log_relevant_status) * [`audit_log_parts`](#audit_log_parts) * [`audit_log_type`](#audit_log_type) * [`audit_log_storage_dir`](#audit_log_storage_dir) * [`secpcrematchlimit`](#secpcrematchlimit) * [`secpcrematchlimitrecursion`](#secpcrematchlimitrecursion) * [`allowed_methods`](#allowed_methods) * [`content_types`](#content_types) * [`restricted_extensions`](#restricted_extensions) * [`restricted_headers`](#restricted_headers) * [`secdefaultaction`](#secdefaultaction) * [`anomaly_score_blocking`](#anomaly_score_blocking) * [`inbound_anomaly_threshold`](#inbound_anomaly_threshold) * [`outbound_anomaly_threshold`](#outbound_anomaly_threshold) * [`critical_anomaly_score`](#critical_anomaly_score) * [`error_anomaly_score`](#error_anomaly_score) * [`warning_anomaly_score`](#warning_anomaly_score) * [`notice_anomaly_score`](#notice_anomaly_score) * [`secrequestmaxnumargs`](#secrequestmaxnumargs) * [`secrequestbodylimit`](#secrequestbodylimit) * [`secrequestbodynofileslimit`](#secrequestbodynofileslimit) * [`secrequestbodyinmemorylimit`](#secrequestbodyinmemorylimit) * [`manage_security_crs`](#manage_security_crs) ##### `version` Data type: `Any` Manage mod_security or mod_security2 Default value: `$apache::params::modsec_version` ##### `logroot` Data type: `Any` Configures the location of audit and debug logs. Default value: `$apache::params::logroot` ##### `crs_package` Data type: `Any` Name of package that installs CRS rules. Default value: `$apache::params::modsec_crs_package` ##### `activated_rules` Data type: `Any` An array of rules from the modsec_crs_path or absolute to activate via symlinks. Default value: `$apache::params::modsec_default_rules` ##### `modsec_dir` Data type: `Any` Defines the path where Puppet installs the modsec configuration and activated rules links. Default value: `$apache::params::modsec_dir` ##### `modsec_secruleengine` Data type: `Any` Configures the rules engine. Default value: `$apache::params::modsec_secruleengine` ##### `audit_log_relevant_status` Data type: `Any` Configures which response status code is to be considered relevant for the purpose of audit logging. Default value: `'^(?:5|4(?!04))'` ##### `audit_log_parts` Data type: `Any` Defines which parts of each transaction are going to be recorded in the audit log. Each part is assigned a single letter; when a letter appears in the list then the equivalent part will be recorded. Default value: `$apache::params::modsec_audit_log_parts` ##### `audit_log_type` Data type: `Any` Defines the type of audit logging mechanism to be used. Default value: `$apache::params::modsec_audit_log_type` ##### `audit_log_storage_dir` Data type: `Any` Defines the directory where concurrent audit log entries are to be stored. This directive is only needed when concurrent audit logging is used. Default value: ``undef`` ##### `secpcrematchlimit` Data type: `Any` Sets the match limit in the PCRE library. Default value: `$apache::params::secpcrematchlimit` ##### `secpcrematchlimitrecursion` Data type: `Any` Sets the match limit recursion in the PCRE library. Default value: `$apache::params::secpcrematchlimitrecursion` ##### `allowed_methods` Data type: `Any` A space-separated list of allowed HTTP methods. Default value: `'GET HEAD POST OPTIONS'` ##### `content_types` Data type: `Any` A list of one or more allowed MIME types. Default value: `'application/x-www-form-urlencoded|multipart/form-data|text/xml|application/xml|application/x-amf'` ##### `restricted_extensions` Data type: `Any` A space-sparated list of prohibited file extensions. Default value: `'.asa/ .asax/ .ascx/ .axd/ .backup/ .bak/ .bat/ .cdx/ .cer/ .cfg/ .cmd/ .com/ .config/ .conf/ .cs/ .csproj/ .csr/ .dat/ .db/ .dbf/ .dll/ .dos/ .htr/ .htw/ .ida/ .idc/ .idq/ .inc/ .ini/ .key/ .licx/ .lnk/ .log/ .mdb/ .old/ .pass/ .pdb/ .pol/ .printer/ .pwd/ .resources/ .resx/ .sql/ .sys/ .vb/ .vbs/ .vbproj/ .vsdisco/ .webinfo/ .xsd/ .xsx/'` ##### `restricted_headers` Data type: `Any` A list of restricted headers separated by slashes and spaces. Default value: `'/Proxy-Connection/ /Lock-Token/ /Content-Range/ /Translate/ /via/ /if/'` ##### `secdefaultaction` Data type: `Any` Defines the default list of actions, which will be inherited by the rules in the same configuration context. Default value: `'deny'` ##### `anomaly_score_blocking` Data type: `Any` Activates or deactivates the Collaborative Detection Blocking of the OWASP ModSecurity Core Rule Set. Default value: `'off'` ##### `inbound_anomaly_threshold` Data type: `Any` Sets the scoring threshold level of the inbound blocking rules for the Collaborative Detection Mode in the OWASP ModSecurity Core Rule Set. Default value: `'5'` ##### `outbound_anomaly_threshold` Data type: `Any` Sets the scoring threshold level of the outbound blocking rules for the Collaborative Detection Mode in the OWASP ModSecurity Core Rule Set. Default value: `'4'` ##### `critical_anomaly_score` Data type: `Any` Sets the Anomaly Score for rules assigned with a critical severity. Default value: `'5'` ##### `error_anomaly_score` Data type: `Any` Sets the Anomaly Score for rules assigned with a error severity. Default value: `'4'` ##### `warning_anomaly_score` Data type: `Any` Sets the Anomaly Score for rules assigned with a warning severity. Default value: `'3'` ##### `notice_anomaly_score` Data type: `Any` Sets the Anomaly Score for rules assigned with a notice severity. Default value: `'2'` ##### `secrequestmaxnumargs` Data type: `Any` Sets the maximum number of arguments in the request. Default value: `'255'` ##### `secrequestbodylimit` Data type: `Any` Sets the maximum request body size ModSecurity will accept for buffering. Default value: `'13107200'` ##### `secrequestbodynofileslimit` Data type: `Any` Configures the maximum request body size ModSecurity will accept for buffering, excluding the size of any files being transported in the request. Default value: `'131072'` ##### `secrequestbodyinmemorylimit` Data type: `Any` Configures the maximum request body size that ModSecurity will store in memory. Default value: `'131072'` ##### `manage_security_crs` Data type: `Any` Toggles whether to manage ModSecurity Core Rule Set Default value: ``true`` ### `apache::mod::setenvif` Installs `mod_setenvif`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_setenvif.html * for additional documentation. ### `apache::mod::shib` This class installs and configures only the Apache components of a web application that consumes Shibboleth SSO identities. You can manage the Shibboleth configuration manually, with Puppet, or using a [Shibboleth Puppet Module](https://github.com/aethylred/puppet-shibboleth). * **Note** The Shibboleth module isn't available on RH/CentOS without providing dependency packages provided by Shibboleth's repositories. See the [Shibboleth Service Provider Installation Guide](http://wiki.aaf.edu.au/tech-info/sp-install-guide). * **See also** * https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPApacheConfig * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::shib` class: * [`suppress_warning`](#suppress_warning) * [`mod_full_path`](#mod_full_path) * [`package_name`](#package_name) * [`mod_lib`](#mod_lib) ##### `suppress_warning` Data type: `Any` Toggles whether to trigger warning on RedHat nodes. Default value: ``false`` ##### `mod_full_path` Data type: `Any` Specifies a path to the module. Do not manually set this parameter without a special reason. Default value: ``undef`` ##### `package_name` Data type: `Any` Name of the Shibboleth package to be installed. Default value: ``undef`` ##### `mod_lib` Data type: `Any` Specifies a path to the module's libraries. Do not manually set this parameter without special reason. The `path` parameter overrides this value. Default value: ``undef`` ### `apache::mod::socache_shmcb` Installs `mod_socache_shmcb`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_socache_shmcb.html * for additional documentation. ### `apache::mod::speling` Installs `mod_spelling`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_speling.html * for additional documentation. ### `apache::mod::ssl` On most operating systems, the ssl.conf is placed in the module configuration directory. On Red Hat based operating systems, this file is placed in /etc/httpd/conf.d, the same location in which the RPM stores the configuration. To use SSL with a virtual host, you must either set the default_ssl_vhost parameter in ::apache to true or the ssl parameter in apache::vhost to true. * **See also** * https://httpd.apache.org/docs/current/mod/mod_ssl.html * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::ssl` class: * [`ssl_compression`](#ssl_compression) * [`ssl_cryptodevice`](#ssl_cryptodevice) * [`ssl_options`](#ssl_options) * [`ssl_openssl_conf_cmd`](#ssl_openssl_conf_cmd) * [`ssl_cert`](#ssl_cert) * [`ssl_key`](#ssl_key) * [`ssl_ca`](#ssl_ca) * [`ssl_cipher`](#ssl_cipher) * [`ssl_honorcipherorder`](#ssl_honorcipherorder) * [`ssl_protocol`](#ssl_protocol) * [`ssl_proxy_protocol`](#ssl_proxy_protocol) * [`ssl_pass_phrase_dialog`](#ssl_pass_phrase_dialog) * [`ssl_random_seed_bytes`](#ssl_random_seed_bytes) * [`ssl_sessioncache`](#ssl_sessioncache) * [`ssl_sessioncachetimeout`](#ssl_sessioncachetimeout) * [`ssl_stapling`](#ssl_stapling) * [`ssl_stapling_return_errors`](#ssl_stapling_return_errors) * [`ssl_mutex`](#ssl_mutex) * [`apache_version`](#apache_version) * [`package_name`](#package_name) * [`ssl_sessiontickets`](#ssl_sessiontickets) * [`stapling_cache`](#stapling_cache) ##### `ssl_compression` Data type: `Boolean` Enable compression on the SSL level. Default value: ``false`` ##### `ssl_cryptodevice` Data type: `Any` Enable use of a cryptographic hardware accelerator. Default value: `'builtin'` ##### `ssl_options` Data type: `Any` Configure various SSL engine run-time options. Default value: `['StdEnvVars']` ##### `ssl_openssl_conf_cmd` Data type: `Any` Configure OpenSSL parameters through its SSL_CONF API. Default value: ``undef`` ##### `ssl_cert` Data type: `Optional[String]` Path to server PEM-encoded X.509 certificate data file. Default value: ``undef`` ##### `ssl_key` Data type: `Optional[String]` Path to server PEM-encoded private key file Default value: ``undef`` ##### `ssl_ca` Data type: `Any` File of concatenated PEM-encoded CA Certificates for Client Auth. Default value: ``undef`` ##### `ssl_cipher` Data type: `Any` Cipher Suite available for negotiation in SSL handshake. Default value: `'HIGH:MEDIUM:!aNULL:!MD5:!RC4:!3DES'` ##### `ssl_honorcipherorder` Data type: `Variant[Boolean, Enum['on', 'off']]` Option to prefer the server's cipher preference order. Default value: ``true`` ##### `ssl_protocol` Data type: `Any` Configure usable SSL/TLS protocol versions. Default based on the OS: - RedHat 8: [ 'all' ]. - Other Platforms: [ 'all', '-SSLv2', '-SSLv3' ]. Default value: `$apache::params::ssl_protocol` ##### `ssl_proxy_protocol` Data type: `Array` Configure usable SSL protocol flavors for proxy usage. Default value: `[]` ##### `ssl_pass_phrase_dialog` Data type: `Any` Type of pass phrase dialog for encrypted private keys. Default value: `'builtin'` ##### `ssl_random_seed_bytes` Data type: `Any` Pseudo Random Number Generator (PRNG) seeding source. Default value: `'512'` ##### `ssl_sessioncache` Data type: `String` Configures the storage type of the global/inter-process SSL Session Cache Default value: `$apache::params::ssl_sessioncache` ##### `ssl_sessioncachetimeout` Data type: `Any` Number of seconds before an SSL session expires in the Session Cache. Default value: `'300'` ##### `ssl_stapling` Data type: `Boolean` Enable stapling of OCSP responses in the TLS handshake. Default value: ``false`` ##### `ssl_stapling_return_errors` Data type: `Optional[Boolean]` Pass stapling related OCSP errors on to client. Default value: ``undef`` ##### `ssl_mutex` Data type: `Any` Configures mutex mechanism and lock file directory for all or specified mutexes. Default based on the OS and/or Apache version: - RedHat/FreeBSD/Suse/Gentoo: 'default'. - Debian/Ubuntu + Apache >= 2.4: 'default'. - Debian/Ubuntu + Apache < 2.4: 'file:${APACHE_RUN_DIR}/ssl_mutex'. -- Ubuntu 10.04: 'file:/var/run/apache2/ssl_mutex'. Default value: ``undef`` ##### `apache_version` Data type: `Any` Used to verify that the Apache version you have requested is compatible with the module. Default value: ``undef`` ##### `package_name` Data type: `Any` Name of ssl package to install. Default value: ``undef`` ##### `ssl_sessiontickets` Data type: `Optional[Boolean]` Default value: ``undef`` ##### `stapling_cache` Data type: `Optional[String]` Default value: ``undef`` ### `apache::mod::status` Installs and configures `mod_status`. * **See also** * http://httpd.apache.org/docs/current/mod/mod_status.html * for additional documentation. #### Examples ##### ```puppet # Simple usage allowing access from localhost and a private subnet class { 'apache::mod::status': $allow_from => ['127.0.0.1', '10.10.10.10/24'], } ``` #### Parameters The following parameters are available in the `apache::mod::status` class: * [`allow_from`](#allow_from) * [`requires`](#requires) * [`extended_status`](#extended_status) * [`status_path`](#status_path) * [`apache_version`](#apache_version) ##### `allow_from` Data type: `Optional[Array]` Array of hosts, ip addresses, partial network numbers or networks, in CIDR notation specifying what hosts can view the special /server-status URL. Defaults to ['127.0.0.1', '::1']. > Creates Apache < 2.4 directive "Allow from". Default value: ``undef`` ##### `requires` Data type: `Optional[Variant[String, Array, Hash]]` A Variant type that can be: - String with: - '' or 'unmanaged' - Host auth control done elsewhere - 'ip ' - Allowed IPs/ranges - 'host ' - Allowed names/domains - 'all [granted|denied]' - Array of strings with ip or host as above - Hash with following keys: - 'requires' - Value => Array as above - 'enforce' - Value => String 'Any', 'All' or 'None' This encloses "Require" directives in "" block Optional - If unspecified, "Require" directives follow current flow > Creates Apache >= 2.4 directives "Require" Default value: ``undef`` ##### `extended_status` Data type: `Enum['On', 'Off', 'on', 'off']` Determines whether to track extended status information for each request, via the ExtendedStatus directive. Default value: `'On'` ##### `status_path` Data type: `Any` Path assigned to the Location directive which defines the URL to access the server status. Default value: `'/server-status'` ##### `apache_version` Data type: `Any` Used to verify that the Apache version you have requested is compatible with the module. Default value: ``undef`` ### `apache::mod::suexec` Installs `mod_suexec`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_suexec.html * for additional documentation. ### `apache::mod::suphp` Installs `mod_suphp`. * **See also** * https://www.suphp.org/DocumentationView.html?file=apache/INSTALL * for additional documentation. ### `apache::mod::userdir` Installs and configures `mod_userdir`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_userdir.html * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::userdir` class: * [`home`](#home) * [`dir`](#dir) * [`disable_root`](#disable_root) * [`apache_version`](#apache_version) * [`path`](#path) * [`overrides`](#overrides) * [`options`](#options) * [`unmanaged_path`](#unmanaged_path) * [`custom_fragment`](#custom_fragment) ##### `home` Data type: `Any` *Deprecated* Path to system home directory. Default value: ``undef`` ##### `dir` Data type: `Any` *Deprecated* Path from user's home directory to public directory. Default value: ``undef`` ##### `disable_root` Data type: `Any` Toggles whether to allow use of root directory. Default value: ``true`` ##### `apache_version` Data type: `Any` Used to verify that the Apache version you have requested is compatible with the module. Default value: ``undef`` ##### `path` Data type: `Any` Path to directory or pattern from which to find user-specific directories. Default value: `'/home/*/public_html'` ##### `overrides` Data type: `Any` Array of directives that are allowed in .htaccess files. Default value: `['FileInfo', 'AuthConfig', 'Limit', 'Indexes']` ##### `options` Data type: `Any` Configures what features are available in a particular directory. Default value: `['MultiViews', 'Indexes', 'SymLinksIfOwnerMatch', 'IncludesNoExec']` ##### `unmanaged_path` Data type: `Any` Toggles whether to manage path in userdir.conf Default value: ``false`` ##### `custom_fragment` Data type: `Any` Custom configuration to be added to userdir.conf Default value: ``undef`` ### `apache::mod::version` Installs `mod_version`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_version.html * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::version` class: * [`apache_version`](#apache_version) ##### `apache_version` Data type: `Any` Used to verify that the Apache version you have requested is compatible with the module. Default value: `$apache::apache_version` ### `apache::mod::vhost_alias` Installs Apache `mod_vhost_alias`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_vhost_alias.html * for additional documentation. ### `apache::mod::watchdog` Installs and configures `mod_watchdog`. * **See also** * https://httpd.apache.org/docs/current/mod/mod_watchdog.html * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::watchdog` class: * [`watchdog_interval`](#watchdog_interval) ##### `watchdog_interval` Data type: `Optional[Integer]` Sets the interval at which the watchdog_step hook runs. Default value: ``undef`` ### `apache::mod::worker` Installs and manages the MPM `worker`. * **See also** * https://httpd.apache.org/docs/current/mod/worker.html * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::worker` class: * [`startservers`](#startservers) * [`maxclients`](#maxclients) * [`minsparethreads`](#minsparethreads) * [`maxsparethreads`](#maxsparethreads) * [`threadsperchild`](#threadsperchild) * [`maxrequestsperchild`](#maxrequestsperchild) * [`serverlimit`](#serverlimit) * [`threadlimit`](#threadlimit) * [`listenbacklog`](#listenbacklog) * [`apache_version`](#apache_version) ##### `startservers` Data type: `Any` The number of child server processes created on startup Default value: `'2'` ##### `maxclients` Data type: `Any` The max number of simultaneous requests that will be served. This is the old name and is still supported. The new name is MaxRequestWorkers as of 2.3.13. Default value: `'150'` ##### `minsparethreads` Data type: `Any` Minimum number of idle threads to handle request spikes. Default value: `'25'` ##### `maxsparethreads` Data type: `Any` Maximum number of idle threads. Default value: `'75'` ##### `threadsperchild` Data type: `Any` The number of threads created by each child process. Default value: `'25'` ##### `maxrequestsperchild` Data type: `Any` Limit on the number of connectiojns an individual child server process will handle. This is the old name and is still supported. The new name is MaxConnectionsPerChild as of 2.3.9+. Default value: `'0'` ##### `serverlimit` Data type: `Any` With worker, use this directive only if your MaxRequestWorkers and ThreadsPerChild settings require more than 16 server processes (default). Do not set the value of this directive any higher than the number of server processes required by what you may want for MaxRequestWorkers and ThreadsPerChild. Default value: `'25'` ##### `threadlimit` Data type: `Any` This directive sets the maximum configured value for ThreadsPerChild for the lifetime of the Apache httpd process. Default value: `'64'` ##### `listenbacklog` Data type: `Any` Maximum length of the queue of pending connections. Default value: `'511'` ##### `apache_version` Data type: `Any` Used to verify that the Apache version you have requested is compatible with the module. Default value: ``undef`` ### `apache::mod::wsgi` Installs and configures `mod_wsgi`. * **Note** Unsupported platforms: SLES: all; RedHat: all; CentOS: all; OracleLinux: all; Scientific: all * **See also** * https://github.com/GrahamDumpleton/mod_wsgi * for additional documentation. #### Parameters The following parameters are available in the `apache::mod::wsgi` class: * [`wsgi_restrict_embedded`](#wsgi_restrict_embedded) * [`wsgi_socket_prefix`](#wsgi_socket_prefix) * [`wsgi_python_path`](#wsgi_python_path) * [`wsgi_python_home`](#wsgi_python_home) * [`wsgi_python_optimize`](#wsgi_python_optimize) * [`wsgi_application_group`](#wsgi_application_group) * [`package_name`](#package_name) * [`mod_path`](#mod_path) ##### `wsgi_restrict_embedded` Data type: `Any` Enable restrictions on use of embedded mode. Default value: ``undef`` ##### `wsgi_socket_prefix` Data type: `Any` Configure directory to use for daemon sockets. Default value: `$apache::params::wsgi_socket_prefix` ##### `wsgi_python_path` Data type: `Any` Additional directories to search for Python modules. Default value: ``undef`` ##### `wsgi_python_home` Data type: `Any` Absolute path to Python prefix/exec_prefix directories. Default value: ``undef`` ##### `wsgi_python_optimize` Data type: `Any` Enables basic Python optimisation features. Default value: ``undef`` ##### `wsgi_application_group` Data type: `Any` Sets which application group WSGI application belongs to. Default value: ``undef`` ##### `package_name` Data type: `Any` Names of package that installs mod_wsgi. Default value: ``undef`` ##### `mod_path` Data type: `Any` Defines the path to the mod_wsgi shared object (.so) file. Default value: ``undef`` ### `apache::mod::xsendfile` Installs `mod_xsendfile`. * **See also** * https://tn123.org/mod_xsendfile/ * for additional documentation. ### `apache::mpm::disable_mpm_event` The apache::mpm::disable_mpm_event class. ### `apache::mpm::disable_mpm_prefork` The apache::mpm::disable_mpm_prefork class. ### `apache::mpm::disable_mpm_worker` The apache::mpm::disable_mpm_worker class. ### `apache::vhosts` host parameters or Configuring virtual hosts in the README section. * **Note** See the `apache::vhost` defined type's reference for a list of all virtual #### Examples ##### To create a [name-based virtual host](https://httpd.apache.org/docs/current/vhosts/name-based.html) `custom_vhost_1` ```puppet class { 'apache::vhosts': vhosts => { 'custom_vhost_1' => { 'docroot' => '/var/www/custom_vhost_1', 'port' => '81', }, }, } ``` #### Parameters The following parameters are available in the `apache::vhosts` class: * [`vhosts`](#vhosts) ##### `vhosts` Data type: `Any` A hash, where the key represents the name and the value represents a hash of `apache::vhost` defined type's parameters. Default value: `{}` ## Defined types ### `apache::balancer` Each balancer cluster needs one or more balancer members (that can be declared with the apache::balancermember defined resource type). Using storeconfigs, you can export the apache::balancermember resources on all balancer members, and then collect them on a single apache load balancer server. * **Note** Currently requires the puppetlabs/concat module on the Puppet Forge and uses storeconfigs on the Puppet Server to export/collect resources from all balancer members. #### Examples ##### ```puppet apache::balancer { 'puppet00': } ``` #### Parameters The following parameters are available in the `apache::balancer` defined type: * [`name`](#name) * [`proxy_set`](#proxy_set) * [`target`](#target) * [`collect_exported`](#collect_exported) * [`options`](#options) ##### `name` The namevar of the defined resource type is the balancer clusters name.
This name is also used in the name of the conf.d file ##### `proxy_set` Data type: `Any` Configures key-value pairs to be used as a ProxySet lines in the configuration. Default value: `{}` ##### `target` Data type: `Any` The path to the file the balancer definition will be written in. Default value: ``undef`` ##### `collect_exported` Data type: `Any` Determines whether to use exported resources.
If you statically declare all of your backend servers, set this parameter to false to rely on existing, declared balancer member resources. Also, use apache::balancermember with array arguments.
To dynamically declare backend servers via exported resources collected on a central node, set this parameter to true to collect the balancer member resources exported by the balancer member nodes.
If you don't use exported resources, a single Puppet run configures all balancer members. If you use exported resources, Puppet has to run on the balanced nodes first, then run on the balancer. Default value: ``true`` ##### `options` Data type: `Any` Specifies an array of [options](https://httpd.apache.org/docs/current/mod/mod_proxy.html#balancermember) after the balancer URL, and accepts any key-value pairs available to `ProxyPass`. Default value: `[]` ### `apache::balancermember` Sets up a balancer member inside a listening service configuration block in the load balancer's `apache.cfg`. This type will setup a balancer member inside a listening service configuration block in /etc/apache/apache.cfg on the load balancer. Currently it only has the ability to specify the instance name, url and an array of options. More features can be added as needed. The best way to implement this is to export this resource for all apache balancer member servers, and then collect them on the main apache load balancer. * **Note** Currently requires the puppetlabs/concat module on the Puppet Forge and uses storeconfigs on the Puppet Server to export/collect resources from all balancer members. #### Examples ##### ```puppet @@apache::balancermember { 'apache': balancer_cluster => 'puppet00', url => "ajp://${::fqdn}:8009" options => ['ping=5', 'disablereuse=on', 'retry=5', 'ttl=120'], } ``` #### Parameters The following parameters are available in the `apache::balancermember` defined type: * [`name`](#name) * [`balancer_cluster`](#balancer_cluster) * [`url`](#url) * [`options`](#options) ##### `name` The title of the resource is arbitrary and only utilized in the concat fragment name. ##### `balancer_cluster` Data type: `Any` The apache service's instance name (or, the title of the apache::balancer resource). This must match up with a declared apache::balancer resource. ##### `url` Data type: `Any` The url used to contact the balancer member server. Default value: `"http://${::fqdn}/"` ##### `options` Data type: `Any` Specifies an array of [options](https://httpd.apache.org/docs/current/mod/mod_proxy.html#balancermember) after the URL, and accepts any key-value pairs available to `ProxyPass`. Default value: `[]` ### `apache::custom_config` If the file is invalid and this defined type's `verify_config` parameter's value is `true`, Puppet throws an error during a Puppet run. #### Parameters The following parameters are available in the `apache::custom_config` defined type: * [`ensure`](#ensure) * [`confdir`](#confdir) * [`content`](#content) * [`filename`](#filename) * [`priority`](#priority) * [`source`](#source) * [`verify_command`](#verify_command) * [`verify_config`](#verify_config) * [`owner`](#owner) * [`group`](#group) * [`file_mode`](#file_mode) * [`show_diff`](#show_diff) ##### `ensure` Data type: `Enum['absent', 'present']` Specifies whether the configuration file should be present. Default value: `'present'` ##### `confdir` Data type: `Any` Sets the directory in which Puppet places configuration files. Default value: `$apache::confd_dir` ##### `content` Data type: `Any` Sets the configuration file's content. The `content` and `source` parameters are exclusive of each other. Default value: ``undef`` ##### `filename` Data type: `Any` Sets the name of the file under `confdir` in which Puppet stores the configuration. Default value: ``undef`` ##### `priority` Data type: `Any` Sets the configuration file's priority by prefixing its filename with this parameter's numeric value, as Apache processes configuration files in alphanumeric order.
To omit the priority prefix in the configuration file's name, set this parameter to `false`. Default value: `'25'` ##### `source` Data type: `Any` Points to the configuration file's source. The `content` and `source` parameters are exclusive of each other. Default value: ``undef`` ##### `verify_command` Data type: `Any` Specifies the command Puppet uses to verify the configuration file. Use a fully qualified command.
This parameter is used only if the `verify_config` parameter's value is `true`. If the `verify_command` fails, the Puppet run deletes the configuration file and raises an error, but does not notify the Apache service. Default value: `$apache::params::verify_command` ##### `verify_config` Data type: `Boolean` Specifies whether to validate the configuration file before notifying the Apache service. Default value: ``true`` ##### `owner` Data type: `Any` File owner of configuration file Default value: ``undef`` ##### `group` Data type: `Any` File group of configuration file Default value: ``undef`` ##### `file_mode` Data type: `Any` File mode of configuration file Default value: ``undef`` ##### `show_diff` Data type: `Boolean` show_diff property for configuration file resource Default value: ``true`` ### `apache::fastcgi::server` Defines one or more external FastCGI servers to handle specific file types. Use this defined type with `mod_fastcgi`. #### Parameters The following parameters are available in the `apache::fastcgi::server` defined type: * [`host`](#host) * [`timeout`](#timeout) * [`flush`](#flush) * [`faux_path`](#faux_path) * [`fcgi_alias`](#fcgi_alias) * [`file_type`](#file_type) * [`pass_header`](#pass_header) ##### `host` Data type: `Any` Determines the FastCGI's hostname or IP address and TCP port number (1-65535). Default value: `'127.0.0.1:9000'` ##### `timeout` Data type: `Any` Sets the number of seconds a [FastCGI](http://www.fastcgi.com/) application can be inactive before aborting the request and logging the event at the error LogLevel. The inactivity timer applies only as long as a connection is pending with the FastCGI application. If a request is queued to an application, but the application doesn't respond by writing and flushing within this period, the request is aborted. If communication is complete with the application but incomplete with the client (the response is buffered), the timeout does not apply. Default value: `15` ##### `flush` Data type: `Any` Forces `mod_fastcgi` to write to the client as data is received from the application. By default, `mod_fastcgi` buffers data in order to free the application as quickly as possible. Default value: ``false`` ##### `faux_path` Data type: `Any` Apache has FastCGI handle URIs that resolve to this filename. The path set in this parameter does not have to exist in the local filesystem. Default value: `"/var/www/${name}.fcgi"` ##### `fcgi_alias` Data type: `Any` Internally links actions with the FastCGI server. This alias must be unique. Default value: `"/${name}.fcgi"` ##### `file_type` Data type: `Any` Sets the MIME `content-type` of the file to be processed by the FastCGI server. Default value: `'application/x-httpd-php'` ##### `pass_header` Data type: `Any` Default value: ``undef`` ### `apache::listen` The `apache::vhost` class uses this defined type, and titles take the form ``, `:`, or `:`. ### `apache::mod` Checks for or places the module's default configuration files in the Apache server's `module` and `enable` directories. The default locations depend on your operating system. #### Parameters The following parameters are available in the `apache::mod` defined type: * [`package`](#package) * [`package_ensure`](#package_ensure) * [`lib`](#lib) * [`lib_path`](#lib_path) * [`loadfile_name`](#loadfile_name) * [`id`](#id) * [`loadfiles`](#loadfiles) * [`path`](#path) ##### `package` Data type: `Any` **Required**.
Names the package Puppet uses to install the Apache module. Default value: ``undef`` ##### `package_ensure` Data type: `Any` Determines whether Puppet ensures the Apache module should be installed. Default value: `'present'` ##### `lib` Data type: `Any` Defines the module's shared object name. Do not configure manually without special reason. Default value: ``undef`` ##### `lib_path` Data type: `Any` Specifies a path to the module's libraries. Do not manually set this parameter without special reason. The `path` parameter overrides this value. Default value: `$apache::lib_path` ##### `loadfile_name` Data type: `Any` Sets the filename for the module's `LoadFile` directive, which can also set the module load order as Apache processes them in alphanumeric order. Default value: ``undef`` ##### `id` Data type: `Any` Specifies the package id Default value: ``undef`` ##### `loadfiles` Data type: `Any` Specifies an array of `LoadFile` directives. Default value: ``undef`` ##### `path` Data type: `Any` Specifies a path to the module. Do not manually set this parameter without a special reason. Default value: ``undef`` ### `apache::namevirtualhost` Adds all related directives to the `ports.conf` file in the Apache HTTPD configuration directory. Titles can take the forms `\*`, `\*:\`, `\_default\_:\`, `\`, or `\:\`. ### `apache::vhost` The apache::vhost class. #### Parameters The following parameters are available in the `apache::vhost` defined type: * [`docroot`](#docroot) * [`manage_docroot`](#manage_docroot) * [`virtual_docroot`](#virtual_docroot) * [`port`](#port) * [`ip`](#ip) * [`ip_based`](#ip_based) * [`add_listen`](#add_listen) * [`docroot_owner`](#docroot_owner) * [`docroot_group`](#docroot_group) * [`docroot_mode`](#docroot_mode) * [`protocols`](#protocols) * [`protocols_honor_order`](#protocols_honor_order) * [`serveradmin`](#serveradmin) * [`ssl`](#ssl) * [`ssl_cert`](#ssl_cert) * [`ssl_key`](#ssl_key) * [`ssl_chain`](#ssl_chain) * [`ssl_ca`](#ssl_ca) * [`ssl_crl_path`](#ssl_crl_path) * [`ssl_crl`](#ssl_crl) * [`ssl_crl_check`](#ssl_crl_check) * [`ssl_certs_dir`](#ssl_certs_dir) * [`ssl_protocol`](#ssl_protocol) * [`ssl_cipher`](#ssl_cipher) * [`ssl_honorcipherorder`](#ssl_honorcipherorder) * [`ssl_verify_client`](#ssl_verify_client) * [`ssl_verify_depth`](#ssl_verify_depth) * [`ssl_proxy_verify`](#ssl_proxy_verify) * [`ssl_proxy_verify_depth`](#ssl_proxy_verify_depth) * [`ssl_proxy_ca_cert`](#ssl_proxy_ca_cert) * [`ssl_proxy_check_peer_cn`](#ssl_proxy_check_peer_cn) * [`ssl_proxy_check_peer_name`](#ssl_proxy_check_peer_name) * [`ssl_proxy_check_peer_expire`](#ssl_proxy_check_peer_expire) * [`ssl_proxy_machine_cert`](#ssl_proxy_machine_cert) * [`ssl_proxy_machine_cert_chain`](#ssl_proxy_machine_cert_chain) * [`ssl_proxy_cipher_suite`](#ssl_proxy_cipher_suite) * [`ssl_proxy_protocol`](#ssl_proxy_protocol) * [`ssl_options`](#ssl_options) * [`ssl_openssl_conf_cmd`](#ssl_openssl_conf_cmd) * [`ssl_proxyengine`](#ssl_proxyengine) * [`ssl_stapling`](#ssl_stapling) * [`ssl_stapling_timeout`](#ssl_stapling_timeout) * [`ssl_stapling_return_errors`](#ssl_stapling_return_errors) * [`ssl_user_name`](#ssl_user_name) * [`priority`](#priority) * [`default_vhost`](#default_vhost) * [`servername`](#servername) * [`serveraliases`](#serveraliases) * [`options`](#options) * [`override`](#override) * [`directoryindex`](#directoryindex) * [`vhost_name`](#vhost_name) * [`logroot`](#logroot) * [`logroot_ensure`](#logroot_ensure) * [`logroot_mode`](#logroot_mode) * [`logroot_owner`](#logroot_owner) * [`logroot_group`](#logroot_group) * [`log_level`](#log_level) * [`access_log`](#access_log) * [`access_log_file`](#access_log_file) * [`access_log_pipe`](#access_log_pipe) * [`access_log_syslog`](#access_log_syslog) * [`access_log_format`](#access_log_format) * [`access_log_env_var`](#access_log_env_var) * [`access_logs`](#access_logs) * [`use_servername_for_filenames`](#use_servername_for_filenames) * [`use_port_for_filenames`](#use_port_for_filenames) * [`aliases`](#aliases) * [`directories`](#directories) * [`error_log`](#error_log) * [`error_log_file`](#error_log_file) * [`error_log_pipe`](#error_log_pipe) * [`error_log_syslog`](#error_log_syslog) * [`error_log_format`](#error_log_format) * [`http_protocol_options`](#http_protocol_options) * [`modsec_audit_log`](#modsec_audit_log) * [`modsec_audit_log_file`](#modsec_audit_log_file) * [`modsec_audit_log_pipe`](#modsec_audit_log_pipe) * [`error_documents`](#error_documents) * [`fallbackresource`](#fallbackresource) * [`scriptalias`](#scriptalias) * [`scriptaliases`](#scriptaliases) * [`limitreqfieldsize`](#limitreqfieldsize) * [`limitreqfields`](#limitreqfields) * [`limitreqline`](#limitreqline) * [`limitreqbody`](#limitreqbody) * [`proxy_dest`](#proxy_dest) * [`proxy_dest_match`](#proxy_dest_match) * [`proxy_dest_reverse_match`](#proxy_dest_reverse_match) * [`proxy_pass`](#proxy_pass) * [`proxy_pass_match`](#proxy_pass_match) * [`proxy_requests`](#proxy_requests) * [`suphp_addhandler`](#suphp_addhandler) * [`suphp_engine`](#suphp_engine) * [`suphp_configpath`](#suphp_configpath) * [`php_flags`](#php_flags) * [`php_values`](#php_values) * [`php_admin_flags`](#php_admin_flags) * [`php_admin_values`](#php_admin_values) * [`no_proxy_uris`](#no_proxy_uris) * [`no_proxy_uris_match`](#no_proxy_uris_match) * [`proxy_preserve_host`](#proxy_preserve_host) * [`proxy_add_headers`](#proxy_add_headers) * [`proxy_error_override`](#proxy_error_override) * [`redirect_source`](#redirect_source) * [`redirect_dest`](#redirect_dest) * [`redirect_status`](#redirect_status) * [`redirectmatch_status`](#redirectmatch_status) * [`redirectmatch_regexp`](#redirectmatch_regexp) * [`redirectmatch_dest`](#redirectmatch_dest) * [`headers`](#headers) * [`request_headers`](#request_headers) * [`filters`](#filters) * [`rewrites`](#rewrites) * [`rewrite_base`](#rewrite_base) * [`rewrite_rule`](#rewrite_rule) * [`rewrite_cond`](#rewrite_cond) * [`rewrite_inherit`](#rewrite_inherit) * [`setenv`](#setenv) * [`setenvif`](#setenvif) * [`setenvifnocase`](#setenvifnocase) * [`block`](#block) * [`ensure`](#ensure) * [`wsgi_application_group`](#wsgi_application_group) * [`wsgi_daemon_process`](#wsgi_daemon_process) * [`wsgi_daemon_process_options`](#wsgi_daemon_process_options) * [`wsgi_import_script`](#wsgi_import_script) * [`wsgi_import_script_options`](#wsgi_import_script_options) * [`wsgi_process_group`](#wsgi_process_group) * [`wsgi_script_aliases_match`](#wsgi_script_aliases_match) * [`wsgi_script_aliases`](#wsgi_script_aliases) * [`wsgi_pass_authorization`](#wsgi_pass_authorization) * [`wsgi_chunked_request`](#wsgi_chunked_request) * [`custom_fragment`](#custom_fragment) * [`itk`](#itk) * [`action`](#action) * [`fastcgi_server`](#fastcgi_server) * [`fastcgi_socket`](#fastcgi_socket) * [`fastcgi_dir`](#fastcgi_dir) * [`fastcgi_idle_timeout`](#fastcgi_idle_timeout) * [`additional_includes`](#additional_includes) * [`use_optional_includes`](#use_optional_includes) * [`apache_version`](#apache_version) * [`allow_encoded_slashes`](#allow_encoded_slashes) * [`suexec_user_group`](#suexec_user_group) * [`h2_copy_files`](#h2_copy_files) * [`h2_direct`](#h2_direct) * [`h2_early_hints`](#h2_early_hints) * [`h2_max_session_streams`](#h2_max_session_streams) * [`h2_modern_tls_only`](#h2_modern_tls_only) * [`h2_push`](#h2_push) * [`h2_push_diary_size`](#h2_push_diary_size) * [`h2_push_priority`](#h2_push_priority) * [`h2_push_resource`](#h2_push_resource) * [`h2_serialize_headers`](#h2_serialize_headers) * [`h2_stream_max_mem_size`](#h2_stream_max_mem_size) * [`h2_tls_cool_down_secs`](#h2_tls_cool_down_secs) * [`h2_tls_warm_up_size`](#h2_tls_warm_up_size) * [`h2_upgrade`](#h2_upgrade) * [`h2_window_size`](#h2_window_size) * [`passenger_enabled`](#passenger_enabled) * [`passenger_base_uri`](#passenger_base_uri) * [`passenger_ruby`](#passenger_ruby) * [`passenger_python`](#passenger_python) * [`passenger_nodejs`](#passenger_nodejs) * [`passenger_meteor_app_settings`](#passenger_meteor_app_settings) * [`passenger_app_env`](#passenger_app_env) * [`passenger_app_root`](#passenger_app_root) * [`passenger_app_group_name`](#passenger_app_group_name) * [`passenger_app_start_command`](#passenger_app_start_command) * [`passenger_app_type`](#passenger_app_type) * [`passenger_startup_file`](#passenger_startup_file) * [`passenger_restart_dir`](#passenger_restart_dir) * [`passenger_spawn_method`](#passenger_spawn_method) * [`passenger_load_shell_envvars`](#passenger_load_shell_envvars) * [`passenger_rolling_restarts`](#passenger_rolling_restarts) * [`passenger_resist_deployment_errors`](#passenger_resist_deployment_errors) * [`passenger_user`](#passenger_user) * [`passenger_group`](#passenger_group) * [`passenger_friendly_error_pages`](#passenger_friendly_error_pages) * [`passenger_min_instances`](#passenger_min_instances) * [`passenger_max_instances`](#passenger_max_instances) * [`passenger_max_preloader_idle_time`](#passenger_max_preloader_idle_time) * [`passenger_force_max_concurrent_requests_per_process`](#passenger_force_max_concurrent_requests_per_process) * [`passenger_start_timeout`](#passenger_start_timeout) * [`passenger_concurrency_model`](#passenger_concurrency_model) * [`passenger_thread_count`](#passenger_thread_count) * [`passenger_max_requests`](#passenger_max_requests) * [`passenger_max_request_time`](#passenger_max_request_time) * [`passenger_memory_limit`](#passenger_memory_limit) * [`passenger_stat_throttle_rate`](#passenger_stat_throttle_rate) * [`passenger_pre_start`](#passenger_pre_start) * [`passenger_high_performance`](#passenger_high_performance) * [`passenger_buffer_upload`](#passenger_buffer_upload) * [`passenger_buffer_response`](#passenger_buffer_response) * [`passenger_error_override`](#passenger_error_override) * [`passenger_max_request_queue_size`](#passenger_max_request_queue_size) * [`passenger_max_request_queue_time`](#passenger_max_request_queue_time) * [`passenger_sticky_sessions`](#passenger_sticky_sessions) * [`passenger_sticky_sessions_cookie_name`](#passenger_sticky_sessions_cookie_name) * [`passenger_sticky_sessions_cookie_attributes`](#passenger_sticky_sessions_cookie_attributes) * [`passenger_allow_encoded_slashes`](#passenger_allow_encoded_slashes) * [`passenger_app_log_file`](#passenger_app_log_file) * [`passenger_debugger`](#passenger_debugger) * [`passenger_lve_min_uid`](#passenger_lve_min_uid) * [`add_default_charset`](#add_default_charset) * [`modsec_disable_vhost`](#modsec_disable_vhost) * [`modsec_disable_ids`](#modsec_disable_ids) * [`modsec_disable_ips`](#modsec_disable_ips) * [`modsec_disable_msgs`](#modsec_disable_msgs) * [`modsec_disable_tags`](#modsec_disable_tags) * [`modsec_body_limit`](#modsec_body_limit) * [`jk_mounts`](#jk_mounts) * [`auth_kerb`](#auth_kerb) * [`krb_method_negotiate`](#krb_method_negotiate) * [`krb_method_k5passwd`](#krb_method_k5passwd) * [`krb_authoritative`](#krb_authoritative) * [`krb_auth_realms`](#krb_auth_realms) * [`krb_5keytab`](#krb_5keytab) * [`krb_local_user_mapping`](#krb_local_user_mapping) * [`krb_verify_kdc`](#krb_verify_kdc) * [`krb_servicename`](#krb_servicename) * [`krb_save_credentials`](#krb_save_credentials) * [`keepalive`](#keepalive) * [`keepalive_timeout`](#keepalive_timeout) * [`max_keepalive_requests`](#max_keepalive_requests) * [`cas_attribute_prefix`](#cas_attribute_prefix) * [`cas_attribute_delimiter`](#cas_attribute_delimiter) * [`cas_root_proxied_as`](#cas_root_proxied_as) * [`cas_scrub_request_headers`](#cas_scrub_request_headers) * [`cas_sso_enabled`](#cas_sso_enabled) * [`cas_login_url`](#cas_login_url) * [`cas_validate_url`](#cas_validate_url) * [`cas_validate_saml`](#cas_validate_saml) * [`cas_cookie_path`](#cas_cookie_path) * [`shib_compat_valid_user`](#shib_compat_valid_user) * [`use_canonical_name`](#use_canonical_name) * [`comment`](#comment) * [`define`](#define) * [`auth_oidc`](#auth_oidc) * [`oidc_settings`](#oidc_settings) * [`mdomain`](#mdomain) ##### `docroot` Data type: `Variant[Boolean,String]` ##### `manage_docroot` Data type: `Any` Default value: ``true`` ##### `virtual_docroot` Data type: `Any` Default value: ``false`` ##### `port` Data type: `Any` Default value: ``undef`` ##### `ip` Data type: `Any` Default value: ``undef`` ##### `ip_based` Data type: `Boolean` Default value: ``false`` ##### `add_listen` Data type: `Any` Default value: ``true`` ##### `docroot_owner` Data type: `Any` Default value: `'root'` ##### `docroot_group` Data type: `Any` Default value: `$apache::params::root_group` ##### `docroot_mode` Data type: `Any` Default value: ``undef`` ##### `protocols` Data type: `Array[Enum['h2', 'h2c', 'http/1.1']]` Default value: `[]` ##### `protocols_honor_order` Data type: `Optional[Boolean]` Default value: ``undef`` ##### `serveradmin` Data type: `Any` Default value: ``undef`` ##### `ssl` Data type: `Boolean` Default value: ``false`` ##### `ssl_cert` Data type: `Any` Default value: `$apache::default_ssl_cert` ##### `ssl_key` Data type: `Any` Default value: `$apache::default_ssl_key` ##### `ssl_chain` Data type: `Any` Default value: `$apache::default_ssl_chain` ##### `ssl_ca` Data type: `Any` Default value: `$apache::default_ssl_ca` ##### `ssl_crl_path` Data type: `Any` Default value: `$apache::default_ssl_crl_path` ##### `ssl_crl` Data type: `Any` Default value: `$apache::default_ssl_crl` ##### `ssl_crl_check` Data type: `Any` Default value: `$apache::default_ssl_crl_check` ##### `ssl_certs_dir` Data type: `Any` Default value: `$apache::params::ssl_certs_dir` ##### `ssl_protocol` Data type: `Any` Default value: ``undef`` ##### `ssl_cipher` Data type: `Any` Default value: ``undef`` ##### `ssl_honorcipherorder` Data type: `Any` Default value: ``undef`` ##### `ssl_verify_client` Data type: `Optional[Enum['none', 'optional', 'require', 'optional_no_ca']]` Default value: ``undef`` ##### `ssl_verify_depth` Data type: `Any` Default value: ``undef`` ##### `ssl_proxy_verify` Data type: `Optional[Enum['none', 'optional', 'require', 'optional_no_ca']]` Default value: ``undef`` ##### `ssl_proxy_verify_depth` Data type: `Optional[Integer[0]]` Default value: ``undef`` ##### `ssl_proxy_ca_cert` Data type: `Any` Default value: ``undef`` ##### `ssl_proxy_check_peer_cn` Data type: `Optional[Enum['on', 'off']]` Default value: ``undef`` ##### `ssl_proxy_check_peer_name` Data type: `Optional[Enum['on', 'off']]` Default value: ``undef`` ##### `ssl_proxy_check_peer_expire` Data type: `Optional[Enum['on', 'off']]` Default value: ``undef`` ##### `ssl_proxy_machine_cert` Data type: `Any` Default value: ``undef`` ##### `ssl_proxy_machine_cert_chain` Data type: `Any` Default value: ``undef`` ##### `ssl_proxy_cipher_suite` Data type: `Any` Default value: ``undef`` ##### `ssl_proxy_protocol` Data type: `Any` Default value: ``undef`` ##### `ssl_options` Data type: `Any` Default value: ``undef`` ##### `ssl_openssl_conf_cmd` Data type: `Any` Default value: ``undef`` ##### `ssl_proxyengine` Data type: `Boolean` Default value: ``false`` ##### `ssl_stapling` Data type: `Optional[Boolean]` Default value: ``undef`` ##### `ssl_stapling_timeout` Data type: `Any` Default value: ``undef`` ##### `ssl_stapling_return_errors` Data type: `Any` Default value: ``undef`` ##### `ssl_user_name` Data type: `Optional[String]` Default value: ``undef`` ##### `priority` Data type: `Any` Default value: ``undef`` ##### `default_vhost` Data type: `Boolean` Default value: ``false`` ##### `servername` Data type: `Any` Default value: `$name` ##### `serveraliases` Data type: `Any` Default value: `[]` ##### `options` Data type: `Any` Default value: `['Indexes','FollowSymLinks','MultiViews']` ##### `override` Data type: `Any` Default value: `['None']` ##### `directoryindex` Data type: `Any` Default value: `''` ##### `vhost_name` Data type: `Any` Default value: `'*'` ##### `logroot` Data type: `Any` Default value: `$apache::logroot` ##### `logroot_ensure` Data type: `Enum['directory', 'absent']` Default value: `'directory'` ##### `logroot_mode` Data type: `Any` Default value: ``undef`` ##### `logroot_owner` Data type: `Any` Default value: ``undef`` ##### `logroot_group` Data type: `Any` Default value: ``undef`` ##### `log_level` Data type: `Optional[Apache::LogLevel]` Default value: ``undef`` ##### `access_log` Data type: `Boolean` Default value: ``true`` ##### `access_log_file` Data type: `Any` Default value: ``false`` ##### `access_log_pipe` Data type: `Any` Default value: ``false`` ##### `access_log_syslog` Data type: `Any` Default value: ``false`` ##### `access_log_format` Data type: `Any` Default value: ``false`` ##### `access_log_env_var` Data type: `Any` Default value: ``false`` ##### `access_logs` Data type: `Optional[Array]` Default value: ``undef`` ##### `use_servername_for_filenames` Data type: `Optional[Boolean]` Default value: ``false`` ##### `use_port_for_filenames` Data type: `Optional[Boolean]` Default value: ``false`` ##### `aliases` Data type: `Any` Default value: ``undef`` ##### `directories` Data type: `Optional[Variant[Hash, Array[Variant[Array,Hash]]]]` Default value: ``undef`` ##### `error_log` Data type: `Boolean` Default value: ``true`` ##### `error_log_file` Data type: `Any` Default value: ``undef`` ##### `error_log_pipe` Data type: `Any` Default value: ``undef`` ##### `error_log_syslog` Data type: `Any` Default value: ``undef`` ##### `error_log_format` Data type: `Optional[ Array[ Variant[ String, Hash[String, Enum['connection', 'request']] ] ] ]` Default value: ``undef`` ##### `http_protocol_options` Data type: `Optional[Pattern[/^((Strict|Unsafe)?\s*(\b(Registered|Lenient)Methods)?\s*(\b(Allow0\.9|Require1\.0))?)$/]]` Default value: ``undef`` ##### `modsec_audit_log` Data type: `Any` Default value: ``undef`` ##### `modsec_audit_log_file` Data type: `Any` Default value: ``undef`` ##### `modsec_audit_log_pipe` Data type: `Any` Default value: ``undef`` ##### `error_documents` Data type: `Any` Default value: `[]` ##### `fallbackresource` Data type: `Optional[Variant[Stdlib::Absolutepath, Enum['disabled']]]` Default value: ``undef`` ##### `scriptalias` Data type: `Any` Default value: ``undef`` ##### `scriptaliases` Data type: `Any` Default value: `[]` ##### `limitreqfieldsize` Data type: `Optional[Integer]` Default value: ``undef`` ##### `limitreqfields` Data type: `Optional[Integer]` Default value: ``undef`` ##### `limitreqline` Data type: `Optional[Integer]` Default value: ``undef`` ##### `limitreqbody` Data type: `Optional[Integer]` Default value: ``undef`` ##### `proxy_dest` Data type: `Any` Default value: ``undef`` ##### `proxy_dest_match` Data type: `Any` Default value: ``undef`` ##### `proxy_dest_reverse_match` Data type: `Any` Default value: ``undef`` ##### `proxy_pass` Data type: `Any` Default value: ``undef`` ##### `proxy_pass_match` Data type: `Any` Default value: ``undef`` ##### `proxy_requests` Data type: `Boolean` Default value: ``false`` ##### `suphp_addhandler` Data type: `Any` Default value: `$apache::params::suphp_addhandler` ##### `suphp_engine` Data type: `Enum['on', 'off']` Default value: `$apache::params::suphp_engine` ##### `suphp_configpath` Data type: `Any` Default value: `$apache::params::suphp_configpath` ##### `php_flags` Data type: `Any` Default value: `{}` ##### `php_values` Data type: `Any` Default value: `{}` ##### `php_admin_flags` Data type: `Any` Default value: `{}` ##### `php_admin_values` Data type: `Any` Default value: `{}` ##### `no_proxy_uris` Data type: `Any` Default value: `[]` ##### `no_proxy_uris_match` Data type: `Any` Default value: `[]` ##### `proxy_preserve_host` Data type: `Any` Default value: ``false`` ##### `proxy_add_headers` Data type: `Any` Default value: ``undef`` ##### `proxy_error_override` Data type: `Any` Default value: ``false`` ##### `redirect_source` Data type: `Any` Default value: `'/'` ##### `redirect_dest` Data type: `Any` Default value: ``undef`` ##### `redirect_status` Data type: `Any` Default value: ``undef`` ##### `redirectmatch_status` Data type: `Any` Default value: ``undef`` ##### `redirectmatch_regexp` Data type: `Any` Default value: ``undef`` ##### `redirectmatch_dest` Data type: `Any` Default value: ``undef`` ##### `headers` Data type: `Any` Default value: ``undef`` ##### `request_headers` Data type: `Any` Default value: ``undef`` ##### `filters` Data type: `Any` Default value: ``undef`` ##### `rewrites` Data type: `Optional[Array]` Default value: ``undef`` ##### `rewrite_base` Data type: `Any` Default value: ``undef`` ##### `rewrite_rule` Data type: `Any` Default value: ``undef`` ##### `rewrite_cond` Data type: `Any` Default value: ``undef`` ##### `rewrite_inherit` Data type: `Any` Default value: ``false`` ##### `setenv` Data type: `Any` Default value: `[]` ##### `setenvif` Data type: `Any` Default value: `[]` ##### `setenvifnocase` Data type: `Any` Default value: `[]` ##### `block` Data type: `Any` Default value: `[]` ##### `ensure` Data type: `Enum['absent', 'present']` Default value: `'present'` ##### `wsgi_application_group` Data type: `Any` Default value: ``undef`` ##### `wsgi_daemon_process` Data type: `Optional[Variant[String,Hash]]` Default value: ``undef`` ##### `wsgi_daemon_process_options` Data type: `Optional[Hash]` Default value: ``undef`` ##### `wsgi_import_script` Data type: `Any` Default value: ``undef`` ##### `wsgi_import_script_options` Data type: `Optional[Hash]` Default value: ``undef`` ##### `wsgi_process_group` Data type: `Any` Default value: ``undef`` ##### `wsgi_script_aliases_match` Data type: `Optional[Hash]` Default value: ``undef`` ##### `wsgi_script_aliases` Data type: `Optional[Hash]` Default value: ``undef`` ##### `wsgi_pass_authorization` Data type: `Optional[Enum['on', 'off', 'On', 'Off']]` Default value: ``undef`` ##### `wsgi_chunked_request` Data type: `Any` Default value: ``undef`` ##### `custom_fragment` Data type: `Optional[String]` Default value: ``undef`` ##### `itk` Data type: `Optional[Hash]` Default value: ``undef`` ##### `action` Data type: `Any` Default value: ``undef`` ##### `fastcgi_server` Data type: `Any` Default value: ``undef`` ##### `fastcgi_socket` Data type: `Any` Default value: ``undef`` ##### `fastcgi_dir` Data type: `Any` Default value: ``undef`` ##### `fastcgi_idle_timeout` Data type: `Any` Default value: ``undef`` ##### `additional_includes` Data type: `Any` Default value: `[]` ##### `use_optional_includes` Data type: `Any` Default value: `$apache::use_optional_includes` ##### `apache_version` Data type: `Any` Default value: `$apache::apache_version` ##### `allow_encoded_slashes` Data type: `Optional[Enum['on', 'off', 'nodecode']]` Default value: ``undef`` ##### `suexec_user_group` Data type: `Optional[Pattern[/^[\w-]+ [\w-]+$/]]` Default value: ``undef`` ##### `h2_copy_files` Data type: `Optional[Boolean]` Default value: ``undef`` ##### `h2_direct` Data type: `Optional[Boolean]` Default value: ``undef`` ##### `h2_early_hints` Data type: `Optional[Boolean]` Default value: ``undef`` ##### `h2_max_session_streams` Data type: `Optional[Integer]` Default value: ``undef`` ##### `h2_modern_tls_only` Data type: `Optional[Boolean]` Default value: ``undef`` ##### `h2_push` Data type: `Optional[Boolean]` Default value: ``undef`` ##### `h2_push_diary_size` Data type: `Optional[Integer]` Default value: ``undef`` ##### `h2_push_priority` Data type: `Array[String]` Default value: `[]` ##### `h2_push_resource` Data type: `Array[String]` Default value: `[]` ##### `h2_serialize_headers` Data type: `Optional[Boolean]` Default value: ``undef`` ##### `h2_stream_max_mem_size` Data type: `Optional[Integer]` Default value: ``undef`` ##### `h2_tls_cool_down_secs` Data type: `Optional[Integer]` Default value: ``undef`` ##### `h2_tls_warm_up_size` Data type: `Optional[Integer]` Default value: ``undef`` ##### `h2_upgrade` Data type: `Optional[Boolean]` Default value: ``undef`` ##### `h2_window_size` Data type: `Optional[Integer]` Default value: ``undef`` ##### `passenger_enabled` Data type: `Optional[Boolean]` Default value: ``undef`` ##### `passenger_base_uri` Data type: `Optional[String]` Default value: ``undef`` ##### `passenger_ruby` Data type: `Optional[Stdlib::Absolutepath]` Default value: ``undef`` ##### `passenger_python` Data type: `Optional[Stdlib::Absolutepath]` Default value: ``undef`` ##### `passenger_nodejs` Data type: `Optional[Stdlib::Absolutepath]` Default value: ``undef`` ##### `passenger_meteor_app_settings` Data type: `Optional[String]` Default value: ``undef`` ##### `passenger_app_env` Data type: `Optional[String]` Default value: ``undef`` ##### `passenger_app_root` Data type: `Optional[Stdlib::Absolutepath]` Default value: ``undef`` ##### `passenger_app_group_name` Data type: `Optional[String]` Default value: ``undef`` ##### `passenger_app_start_command` Data type: `Optional[String]` Default value: ``undef`` ##### `passenger_app_type` Data type: `Optional[Enum['meteor', 'node', 'rack', 'wsgi']]` Default value: ``undef`` ##### `passenger_startup_file` Data type: `Optional[String]` Default value: ``undef`` ##### `passenger_restart_dir` Data type: `Optional[String]` Default value: ``undef`` ##### `passenger_spawn_method` Data type: `Optional[Enum['direct', 'smart']]` Default value: ``undef`` ##### `passenger_load_shell_envvars` Data type: `Optional[Boolean]` Default value: ``undef`` ##### `passenger_rolling_restarts` Data type: `Optional[Boolean]` Default value: ``undef`` ##### `passenger_resist_deployment_errors` Data type: `Optional[Boolean]` Default value: ``undef`` ##### `passenger_user` Data type: `Optional[String]` Default value: ``undef`` ##### `passenger_group` Data type: `Optional[String]` Default value: ``undef`` ##### `passenger_friendly_error_pages` Data type: `Optional[Boolean]` Default value: ``undef`` ##### `passenger_min_instances` Data type: `Optional[Integer]` Default value: ``undef`` ##### `passenger_max_instances` Data type: `Optional[Integer]` Default value: ``undef`` ##### `passenger_max_preloader_idle_time` Data type: `Optional[Integer]` Default value: ``undef`` ##### `passenger_force_max_concurrent_requests_per_process` Data type: `Optional[Integer]` Default value: ``undef`` ##### `passenger_start_timeout` Data type: `Optional[Integer]` Default value: ``undef`` ##### `passenger_concurrency_model` Data type: `Optional[Enum['process', 'thread']]` Default value: ``undef`` ##### `passenger_thread_count` Data type: `Optional[Integer]` Default value: ``undef`` ##### `passenger_max_requests` Data type: `Optional[Integer]` Default value: ``undef`` ##### `passenger_max_request_time` Data type: `Optional[Integer]` Default value: ``undef`` ##### `passenger_memory_limit` Data type: `Optional[Integer]` Default value: ``undef`` ##### `passenger_stat_throttle_rate` Data type: `Optional[Integer]` Default value: ``undef`` ##### `passenger_pre_start` Data type: `Optional[Variant[String,Array[String]]]` Default value: ``undef`` ##### `passenger_high_performance` Data type: `Optional[Boolean]` Default value: ``undef`` ##### `passenger_buffer_upload` Data type: `Optional[Boolean]` Default value: ``undef`` ##### `passenger_buffer_response` Data type: `Optional[Boolean]` Default value: ``undef`` ##### `passenger_error_override` Data type: `Optional[Boolean]` Default value: ``undef`` ##### `passenger_max_request_queue_size` Data type: `Optional[Integer]` Default value: ``undef`` ##### `passenger_max_request_queue_time` Data type: `Optional[Integer]` Default value: ``undef`` ##### `passenger_sticky_sessions` Data type: `Optional[Boolean]` Default value: ``undef`` ##### `passenger_sticky_sessions_cookie_name` Data type: `Optional[String]` Default value: ``undef`` ##### `passenger_sticky_sessions_cookie_attributes` Data type: `Optional[String]` Default value: ``undef`` ##### `passenger_allow_encoded_slashes` Data type: `Optional[Boolean]` Default value: ``undef`` ##### `passenger_app_log_file` Data type: `Optional[String]` Default value: ``undef`` ##### `passenger_debugger` Data type: `Optional[Boolean]` Default value: ``undef`` ##### `passenger_lve_min_uid` Data type: `Optional[Integer]` Default value: ``undef`` ##### `add_default_charset` Data type: `Any` Default value: ``undef`` ##### `modsec_disable_vhost` Data type: `Any` Default value: ``undef`` ##### `modsec_disable_ids` Data type: `Optional[Variant[Hash, Array]]` Default value: ``undef`` ##### `modsec_disable_ips` Data type: `Any` Default value: ``undef`` ##### `modsec_disable_msgs` Data type: `Optional[Variant[Hash, Array]]` Default value: ``undef`` ##### `modsec_disable_tags` Data type: `Optional[Variant[Hash, Array]]` Default value: ``undef`` ##### `modsec_body_limit` Data type: `Any` Default value: ``undef`` ##### `jk_mounts` Data type: `Any` Default value: ``undef`` ##### `auth_kerb` Data type: `Boolean` Default value: ``false`` ##### `krb_method_negotiate` Data type: `Any` Default value: `'on'` ##### `krb_method_k5passwd` Data type: `Any` Default value: `'on'` ##### `krb_authoritative` Data type: `Any` Default value: `'on'` ##### `krb_auth_realms` Data type: `Any` Default value: `[]` ##### `krb_5keytab` Data type: `Any` Default value: ``undef`` ##### `krb_local_user_mapping` Data type: `Any` Default value: ``undef`` ##### `krb_verify_kdc` Data type: `Any` Default value: `'on'` ##### `krb_servicename` Data type: `Any` Default value: `'HTTP'` ##### `krb_save_credentials` Data type: `Any` Default value: `'off'` ##### `keepalive` Data type: `Optional[Enum['on', 'off']]` Default value: ``undef`` ##### `keepalive_timeout` Data type: `Any` Default value: ``undef`` ##### `max_keepalive_requests` Data type: `Any` Default value: ``undef`` ##### `cas_attribute_prefix` Data type: `Any` Default value: ``undef`` ##### `cas_attribute_delimiter` Data type: `Any` Default value: ``undef`` ##### `cas_root_proxied_as` Data type: `Any` Default value: ``undef`` ##### `cas_scrub_request_headers` Data type: `Any` Default value: ``undef`` ##### `cas_sso_enabled` Data type: `Any` Default value: ``undef`` ##### `cas_login_url` Data type: `Any` Default value: ``undef`` ##### `cas_validate_url` Data type: `Any` Default value: ``undef`` ##### `cas_validate_saml` Data type: `Any` Default value: ``undef`` ##### `cas_cookie_path` Data type: `Any` Default value: ``undef`` ##### `shib_compat_valid_user` Data type: `Optional[String]` Default value: ``undef`` ##### `use_canonical_name` Data type: `Optional[Enum['On', 'on', 'Off', 'off', 'DNS', 'dns']]` Default value: ``undef`` ##### `comment` Data type: `Optional[Variant[String,Array[String]]]` Default value: ``undef`` ##### `define` Data type: `Hash` Default value: `{}` ##### `auth_oidc` Data type: `Boolean` Default value: ``false`` ##### `oidc_settings` Data type: `Optional[Apache::OIDCSettings]` Default value: ``undef`` ##### `mdomain` Data type: `Optional[Variant[Boolean,String]]` Default value: ``undef`` ### `apache::vhost::custom` The `apache::vhost::custom` defined type is a thin wrapper around the `apache::custom_config` defined type, and simply overrides some of its default settings specific to the virtual host directory in Apache. #### Parameters The following parameters are available in the `apache::vhost::custom` defined type: * [`content`](#content) * [`ensure`](#ensure) * [`priority`](#priority) * [`verify_config`](#verify_config) ##### `content` Data type: `Any` Sets the configuration file's content. ##### `ensure` Data type: `Any` Specifies if the virtual host file is present or absent. Default value: `'present'` ##### `priority` Data type: `Any` Sets the relative load order for Apache HTTPD VirtualHost configuration files. Default value: `'25'` ##### `verify_config` Data type: `Any` Specifies whether to validate the configuration file before notifying the Apache service. Default value: ``true`` ### `apache::vhost::fragment` Define a fragment within a vhost #### Examples ##### With a vhost without priority ```puppet include apache apache::vhost { 'myvhost': } apache::vhost::fragment { 'myfragment': vhost => 'myvhost', content => '# Foo', } ``` ##### With a vhost with priority ```puppet include apache apache::vhost { 'myvhost': priority => '42', } apache::vhost::fragment { 'myfragment': vhost => 'myvhost', priority => '42', content => '# Foo', } ``` ##### With a vhost with default vhost ```puppet include apache apache::vhost { 'myvhost': default_vhost => true, } apache::vhost::fragment { 'myfragment': vhost => 'myvhost', priority => '10', # default_vhost implies priority 10 content => '# Foo', } ``` ##### Adding a fragment to the built in default vhost ```puppet include apache apache::vhost::fragment { 'myfragment': vhost => 'default', priority => '15', content => '# Foo', } ``` #### Parameters The following parameters are available in the `apache::vhost::fragment` defined type: * [`vhost`](#vhost) * [`priority`](#priority) * [`content`](#content) * [`order`](#order) * [`port`](#port) ##### `vhost` Data type: `String[1]` The title of the vhost resource to append to ##### `priority` Data type: `Any` Set the priority to match the one `apache::vhost` sets. This must match the one `apache::vhost` sets or else the concat fragment won't be found. Default value: ``undef`` ##### `content` Data type: `Optional[String]` The content to put in the fragment. Only when it's non-empty the actual fragment will be created. Default value: ``undef`` ##### `order` Data type: `Integer[0]` The order to insert the fragment at Default value: `900` ##### `port` Data type: `Optional[Integer[0]]` Default value: ``undef`` ## Resource types ### `a2mod` Manage Apache 2 modules #### Properties The following properties are available in the `a2mod` type. ##### `ensure` Valid values: `present`, `absent` The basic property that the resource should be in. Default value: `present` #### Parameters The following parameters are available in the `a2mod` type. * [`identifier`](#identifier) * [`lib`](#lib) * [`name`](#name) * [`provider`](#provider) ##### `identifier` Module identifier string used by LoadModule. Default: module-name_module ##### `lib` The name of the .so library to be loaded ##### `name` namevar The name of the module to be managed ##### `provider` The specific backend to use for this `a2mod` resource. You will seldom need to specify this --- Puppet will usually discover the appropriate provider for your platform. ## Functions ### `apache::apache_pw_hash` Type: Ruby 4.x API DEPRECATED. Use the function [`apache::pw_hash`](#apachepw_hash) instead. #### `apache::apache_pw_hash(Any *$args)` The apache::apache_pw_hash function. Returns: `Any` ##### `*args` Data type: `Any` ### `apache::bool2httpd` Type: Ruby 4.x API Transform a supposed boolean to On or Off. Passes all other values through. #### Examples ##### ```puppet $trace_enable = false $server_signature = 'mail' apache::bool2httpd($trace_enable) # returns 'Off' apache::bool2httpd($server_signature) # returns 'mail' apache::bool2httpd(undef) # returns 'Off' ``` #### `apache::bool2httpd(Any $arg)` The apache::bool2httpd function. Returns: `Any` Will return either `On` or `Off` if given a boolean value. Returns a string of any other given value. ##### Examples ###### ```puppet $trace_enable = false $server_signature = 'mail' apache::bool2httpd($trace_enable) # returns 'Off' apache::bool2httpd($server_signature) # returns 'mail' apache::bool2httpd(undef) # returns 'Off' ``` ##### `arg` Data type: `Any` The value to be converted into a string. ### `apache::pw_hash` Type: Ruby 4.x API Currently uses SHA-hashes, because although this format is considered insecure, it's the most secure format supported by the most platforms. #### `apache::pw_hash(String[1] $password)` Currently uses SHA-hashes, because although this format is considered insecure, it's the most secure format supported by the most platforms. Returns: `String` Returns the hash of the input that was given. ##### `password` Data type: `String[1]` The input that is to be hashed. ### `apache_pw_hash` Type: Ruby 4.x API DEPRECATED. Use the namespaced function [`apache::pw_hash`](#apachepw_hash) instead. #### `apache_pw_hash(Any *$args)` The apache_pw_hash function. Returns: `Any` ##### `*args` Data type: `Any` ### `bool2httpd` Type: Ruby 4.x API DEPRECATED. Use the namespaced function [`apache::bool2httpd`](#apachebool2httpd) instead. #### `bool2httpd(Any *$args)` The bool2httpd function. Returns: `Any` ##### `*args` Data type: `Any` ## Data types ### `Apache::LogLevel` A string that conforms to the Apache `LogLevel` syntax. Different levels can be specified for individual apache modules. ie. `[module:]level [module:level] ...` The levels are (in order of decreasing significance): * `emerg` * `alert` * `crit` * `error` * `warn` * `notice` * `info` * `debug` * `trace1` * `trace2` * `trace3` * `trace4` * `trace5` * `trace6` * `trace7` * `trace8` * **See also** * https://httpd.apache.org/docs/current/mod/core.html#loglevel Alias of ```puppet Pattern[/(emerg|alert|crit|error|warn|notice|info|debug|trace[1-8])/] ``` ### `Apache::OIDCSettings` https://github.com/zmartzone/mod_auth_openidc/blob/master/auth_openidc.conf Alias of ```puppet Struct[{ Optional['RedirectURI'] => Variant[Stdlib::HTTPSUrl,Stdlib::HttpUrl,Pattern[/^\/[A-Za-z0-9\-\._%\/]*$/]], Optional['CryptoPassphrase'] => String, Optional['MetadataDir'] => String, Optional['ProviderMetadataURL'] => Stdlib::HTTPSUrl, Optional['ProviderIssuer'] => String, Optional['ProviderAuthorizationEndpoint'] => Stdlib::HTTPSUrl, Optional['ProviderJwksUri'] => Stdlib::HTTPSUrl, Optional['ProviderTokenEndpoint'] => Stdlib::HTTPSUrl, Optional['ProviderTokenEndpointAuth'] => Enum['client_secret_basic','client_secret_post','client_secret_jwt','private_key_jwt','none'], Optional['ProviderTokenEndpointParams'] => Pattern[/^[A-Za-z0-9\-\._%]+=[A-Za-z0-9\-\._%]+(&[A-Za-z0-9\-\._%]+=[A-Za-z0-9\-\._%]+)*$/], Optional['ProviderUserInfoEndpoint'] => Stdlib::HTTPSUrl, Optional['ProviderCheckSessionIFrame'] => Stdlib::HTTPSUrl, Optional['ProviderEndSessionEndpoint'] => Stdlib::HTTPSUrl, Optional['ProviderRevocationEndpoint'] => Stdlib::HTTPSUrl, Optional['ProviderBackChannelLogoutSupported'] => Enum['On','Off'], Optional['ProviderRegistrationEndpointJson'] => String, Optional['Scope'] => Pattern[/^[A-Za-z0-9\-\._\s]+$/], Optional['AuthRequestParams'] => Pattern[/^[A-Za-z0-9\-\._%]+=[A-Za-z0-9\-\._%]+(&[A-Za-z0-9\-\._%]+=[A-Za-z0-9\-\._%]+)*$/], Optional['SSLValidateServer'] => Enum['On','Off'], Optional['UserInfoRefreshInterval'] => Integer, Optional['JWKSRefreshInterval'] => Integer, Optional['UserInfoTokenMethod'] => Enum['authz_header','post_param'], Optional['ProviderAuthRequestMethod'] => Enum['GET','POST'], Optional['PublicKeyFiles'] => String, Optional['ResponseType'] => Enum['code','id_token','id_token token','code id_token','code token','code id_token token'], Optional['ResponseMode'] => Enum['fragment','query','form_post'], Optional['ClientID'] => String, Optional['ClientSecret'] => String, Optional['ClientTokenEndpointCert'] => String, Optional['ClientTokenEndpointKey'] => String, Optional['ClientName'] => String, Optional['ClientContact'] => String, Optional['PKCDMethod'] => Enum['plain','S256','referred_tb'], Optional['TokenBindingPolicy'] => Enum['disabled','optional','required','enforced'], Optional['ClientJwksUri'] => Stdlib::HTTPSUrl, Optional['IDTokenSignedResponseAlg'] => Enum['RS256','RS384','RS512','PS256','PS384','PS512','HS256','HS384','HS512','ES256','ES384','ES512'], Optional['IDTokenEncryptedResponseAlg'] => Enum['RSA1_5','A128KW','A256KW','RSA-OAEP'], Optional['IDTokenEncryptedResponseAlg'] => Enum['A128CBC-HS256','A256CBC-HS512','A256GCM'], Optional['UserInfoSignedResposeAlg'] => Enum['RS256','RS384','RS512','PS256','PS384','PS512','HS256','HS384','HS512','ES256','ES384','ES512'], Optional['UserInfoEncryptedResponseAlg'] => Enum['RSA1_5','A128KW','A256KW','RSA-OAEP'], Optional['UserInfoEncryptedResponseEnc'] => Enum['A128CBC-HS256','A256CBC-HS512','A256GCM'], Optional['OAuthServerMetadataURL'] => Stdlib::HTTPSUrl, Optional['AuthIntrospectionEndpoint'] => Stdlib::HTTPSUrl, Optional['OAuthClientID'] => String, Optional['OAuthClientSecret'] => String, Optional['OAuthIntrospectionEndpointAuth'] => Enum['client_secret_basic','client_secret_post','client_secret_jwt','private_key_jwt','bearer_access_token','none'], Optional['OAuthIntrospectionClientAuthBearerToken'] => String, Optional['OAuthIntrospectionEndpointCert'] => String, Optional['OAuthIntrospectionEndpointKey'] => String, Optional['OAuthIntrospectionEndpointMethod'] => Enum['POST','GET'], Optional['OAuthIntrospectionEndpointParams'] => Pattern[/^[A-Za-z0-9\-\._%]+=[A-Za-z0-9\-\._%]+(&[A-Za-z0-9\-\._%]+=[A-Za-z0-9\-\._%]+)*$/], Optional['OAuthIntrospectionTokenParamName'] => String, Optional['OAuthTokenExpiryClaim'] => Pattern[/^[A-Za-z0-9\-\._]+\s(absolute|relative)\s(mandatory|optional)$/], Optional['OAuthSSLValidateServer'] => Enum['On','Off'], Optional['OAuthVerifySharedKeys'] => String, Optional['OAuthVerifyCertFiles'] => String, Optional['OAuthVerifyJwksUri'] => Stdlib::HTTPSUrl, Optional['OAuthRemoteUserClaim'] => String, Optional['OAuthAcceptTokenAs'] => Pattern[/^((header|post|query|cookie\:[A-Za-z0-9\-\._]+|basic)\s?)+$/], Optional['OAuthAccessTokenBindingPolicy'] => Enum['disabled','optional','required','enforced'], Optional['Cookie'] => String, Optional['SessionCookieChunkSize'] => Integer, Optional['CookieHTTPOnly'] => Enum['On','Off'], Optional['CookieSameSite'] => Enum['On','Off'], Optional['PassCookies'] => String, Optional['StripCookies'] => String, Optional['StateMaxNumberOfCookies'] => Pattern[/^[0-9]+\s(false|true)$/], Optional['SessionInactivityTimeout'] => Integer, Optional['SessionMaxDuration'] => Integer, Optional['SessionType'] => Pattern[/^(server-cache(:persistent)?|client-cookie(:persistent)?)$/], Optional['SessionCacheFallbackToCookie'] => Enum['On','Off'], Optional['CacheType'] => Enum['shm','memcache','file','redis'], Optional['CacheEncrypt'] => Enum['On','Off'], Optional['CacheShmMax'] => Integer, Optional['CacheShmEntrySizeMax'] => Integer, Optional['CacheFileCleanInterval'] => Integer, Optional['MemCacheServers'] => String, Optional['RedisCacheServer'] => String, Optional['RedisCachePassword'] => String, Optional['DiscoverURL'] => Variant[Stdlib::HTTPSUrl,Stdlib::HttpUrl], Optional['HTMLErrorTemplate'] => String, Optional['DefaultURL'] => Variant[Stdlib::HTTPSUrl,Stdlib::HttpUrl], Optional['PathScope'] => Pattern[/^[A-Za-z0-9\-\._\s]+$/], Optional['PathAuthRequestParams'] => Pattern[/^[A-Za-z0-9\-\._%]+=[A-Za-z0-9\-\._%]+(&[A-Za-z0-9\-\._%]+=[A-Za-z0-9\-\._%]+)*$/], Optional['IDTokenIatSlack'] => Integer, Optional['ClaimPrefix'] => String, Optional['ClaimDelimiter'] => Pattern[/^.$/], Optional['RemoteUserClaim'] => String, Optional['PassIDTokenAs'] => Pattern[/^((claims|payload|serialized)\s?)+$/], Optional['PassUserInfoAs'] => Pattern[/^((claims|json|jwt)\s?)+$/], Optional['PassClaimsAs'] => Enum['none','headers','environment','both'], Optional['AuthNHeader'] => String, Optional['HTTPTimeoutLong'] => Integer, Optional['HTTPTimeoutShort'] => Integer, Optional['StateTimeout'] => Integer, Optional['ScrubRequestHeaders'] => Enum['On','Off'], Optional['OutgoingProxy'] => String, Optional['UnAuthAction'] => Enum['auth','pass','401','410'], Optional['UnAuthzAction'] => Enum['401','403','auth'], Optional['PreservePost'] => Enum['On','Off'], Optional['PassRefreshToken'] => Enum['On','Off'], Optional['RequestObject'] => String, Optional['ProviderMetadataRefreshInterval'] => Integer, Optional['InfoHook'] => Pattern[/^((iat|access_token|access_token_expires|id_token|userinfo|refresh_token|session)\s?)+$/], Optional['BlackListedClaims'] => String, Optional['WhiteListedClaims'] => String, Optional['RefreshAccessTokenBeforeExpiry'] => Pattern[/^[0-9]+(\slogout_on_error)?$/], }] ``` ## Tasks ### `init` Allows you to perform apache service functions **Supports noop?** false #### Parameters ##### `action` Data type: `Enum[reload]` Action to perform ##### `service_name` Data type: `Optional[String[1]]` The name of the apache service diff --git a/manifests/mod/ssl.pp b/manifests/mod/ssl.pp index 1d4026a5..28ac3d04 100644 --- a/manifests/mod/ssl.pp +++ b/manifests/mod/ssl.pp @@ -1,205 +1,202 @@ # @summary # Installs `mod_ssl`. # # @param ssl_compression # Enable compression on the SSL level. # # @param ssl_cryptodevice # Enable use of a cryptographic hardware accelerator. # # @param ssl_options # Configure various SSL engine run-time options. # # @param ssl_openssl_conf_cmd # Configure OpenSSL parameters through its SSL_CONF API. # # @param ssl_cert # Path to server PEM-encoded X.509 certificate data file. # # @param ssl_key # Path to server PEM-encoded private key file # # @param ssl_ca # File of concatenated PEM-encoded CA Certificates for Client Auth. # # @param ssl_cipher # Cipher Suite available for negotiation in SSL handshake. # # @param ssl_honorcipherorder # Option to prefer the server's cipher preference order. # # @param ssl_protocol # Configure usable SSL/TLS protocol versions. # Default based on the OS: # - RedHat 8: [ 'all' ]. # - Other Platforms: [ 'all', '-SSLv2', '-SSLv3' ]. # # @param ssl_proxy_protocol # Configure usable SSL protocol flavors for proxy usage. # # @param ssl_pass_phrase_dialog # Type of pass phrase dialog for encrypted private keys. # # @param ssl_random_seed_bytes # Pseudo Random Number Generator (PRNG) seeding source. # # @param ssl_sessioncache # Configures the storage type of the global/inter-process SSL Session Cache # # @param ssl_sessioncachetimeout # Number of seconds before an SSL session expires in the Session Cache. # # @param ssl_stapling # Enable stapling of OCSP responses in the TLS handshake. # # @param ssl_stapling_return_errors # Pass stapling related OCSP errors on to client. # # @param ssl_mutex # Configures mutex mechanism and lock file directory for all or specified mutexes. # Default based on the OS and/or Apache version: # - RedHat/FreeBSD/Suse/Gentoo: 'default'. # - Debian/Ubuntu + Apache >= 2.4: 'default'. # - Debian/Ubuntu + Apache < 2.4: 'file:${APACHE_RUN_DIR}/ssl_mutex'. -# - Ubuntu 10.04: 'file:/var/run/apache2/ssl_mutex'. # # @param apache_version # Used to verify that the Apache version you have requested is compatible with the module. # # @param package_name # Name of ssl package to install. # # On most operating systems, the ssl.conf is placed in the module configuration directory. On Red Hat based operating systems, this # file is placed in /etc/httpd/conf.d, the same location in which the RPM stores the configuration. # # To use SSL with a virtual host, you must either set the default_ssl_vhost parameter in ::apache to true or the ssl parameter in # apache::vhost to true. # # @see https://httpd.apache.org/docs/current/mod/mod_ssl.html for additional documentation. # class apache::mod::ssl ( Boolean $ssl_compression = false, Optional[Boolean] $ssl_sessiontickets = undef, $ssl_cryptodevice = 'builtin', $ssl_options = ['StdEnvVars'], $ssl_openssl_conf_cmd = undef, Optional[String] $ssl_cert = undef, Optional[String] $ssl_key = undef, $ssl_ca = undef, $ssl_cipher = 'HIGH:MEDIUM:!aNULL:!MD5:!RC4:!3DES', Variant[Boolean, Enum['on', 'off']] $ssl_honorcipherorder = true, $ssl_protocol = $apache::params::ssl_protocol, Array $ssl_proxy_protocol = [], $ssl_pass_phrase_dialog = 'builtin', $ssl_random_seed_bytes = '512', String $ssl_sessioncache = $apache::params::ssl_sessioncache, $ssl_sessioncachetimeout = '300', Boolean $ssl_stapling = false, Optional[String] $stapling_cache = undef, Optional[Boolean] $ssl_stapling_return_errors = undef, $ssl_mutex = undef, $apache_version = undef, $package_name = undef, ) inherits ::apache::params { include apache include apache::mod::mime $_apache_version = pick($apache_version, $apache::apache_version) if $ssl_mutex { $_ssl_mutex = $ssl_mutex } else { case $::osfamily { 'debian': { if versioncmp($_apache_version, '2.4') >= 0 { $_ssl_mutex = 'default' - } elsif $::operatingsystem == 'Ubuntu' and $::operatingsystemrelease == '10.04' { - $_ssl_mutex = 'file:/var/run/apache2/ssl_mutex' } else { $_ssl_mutex = "file:\${APACHE_RUN_DIR}/ssl_mutex" } } 'redhat': { $_ssl_mutex = 'default' } 'freebsd': { $_ssl_mutex = 'default' } 'gentoo': { $_ssl_mutex = 'default' } 'Suse': { $_ssl_mutex = 'default' } default: { fail("Unsupported osfamily ${::osfamily}, please explicitly pass in \$ssl_mutex") } } } if $ssl_honorcipherorder =~ Boolean { $_ssl_honorcipherorder = $ssl_honorcipherorder } else { $_ssl_honorcipherorder = $ssl_honorcipherorder ? { 'on' => true, 'off' => false, default => true, } } if $stapling_cache =~ Undef { $_stapling_cache = $::osfamily ? { 'debian' => "\${APACHE_RUN_DIR}/ocsp(32768)", 'redhat' => '/run/httpd/ssl_stapling(32768)', 'freebsd' => '/var/run/ssl_stapling(32768)', 'gentoo' => '/var/run/ssl_stapling(32768)', 'Suse' => '/var/lib/apache2/ssl_stapling(32768)', } } else { $_stapling_cache = $stapling_cache } if $::osfamily == 'Suse' { if defined(Class['::apache::mod::worker']) { $suse_path = '/usr/lib64/apache2-worker' } else { $suse_path = '/usr/lib64/apache2-prefork' } ::apache::mod { 'ssl': package => $package_name, lib_path => $suse_path, } } else { ::apache::mod { 'ssl': package => $package_name, } } if versioncmp($_apache_version, '2.4') >= 0 { include apache::mod::socache_shmcb } # Template uses # # $ssl_compression # $ssl_sessiontickets # $ssl_cryptodevice # $ssl_ca # $ssl_cipher # $ssl_honorcipherorder # $ssl_options # $ssl_openssl_conf_cmd # $ssl_sessioncache # $_stapling_cache # $ssl_mutex # $ssl_random_seed_bytes # $ssl_sessioncachetimeout # $_apache_version file { 'ssl.conf': ensure => file, path => $apache::_ssl_file, mode => $apache::file_mode, content => template('apache/mod/ssl.conf.erb'), require => Exec["mkdir ${apache::mod_dir}"], before => File[$apache::mod_dir], notify => Class['apache::service'], } } diff --git a/manifests/params.pp b/manifests/params.pp index 0576ec0d..da6fd9f2 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -1,799 +1,799 @@ # @summary # This class manages Apache parameters # # @api private class apache::params inherits ::apache::version { if($::fqdn) { $servername = $::fqdn } else { $servername = $::hostname } # The default error log level $log_level = 'warn' $use_optional_includes = false # Default mime types settings $mime_types_additional = { 'AddHandler' => { 'type-map' => 'var', }, 'AddType' => { 'text/html' => '.shtml', }, 'AddOutputFilter' => { 'INCLUDES' => '.shtml', }, } # should we use systemd module? $use_systemd = true # Default mode for files $file_mode = '0644' # The default value for host hame lookup $hostname_lookups = 'Off' # Default options for / directory $root_directory_options = ['FollowSymLinks'] $vhost_include_pattern = '*' $modsec_audit_log_parts = 'ABIJDEFHZ' $modsec_audit_log_type = 'Serial' # no client certs should be trusted for auth by default. $ssl_certs_dir = undef # Allow overriding the autoindex alias location $icons_prefix = 'icons' if ($apache::version::scl_httpd_version) { if $apache::version::scl_php_version == undef { fail('If you define apache::version::scl_httpd_version, you also need to specify apache::version::scl_php_version') } $_scl_httpd_version_nodot = regsubst($apache::version::scl_httpd_version, '\.', '') $_scl_httpd_name = "httpd${_scl_httpd_version_nodot}" $_scl_php_version_no_dot = regsubst($apache::version::scl_php_version, '\.', '') $user = 'apache' $group = 'apache' $root_group = 'root' $apache_name = "${_scl_httpd_name}-httpd" $service_name = "${_scl_httpd_name}-httpd" $httpd_root = "/opt/rh/${_scl_httpd_name}/root" $httpd_dir = "${httpd_root}/etc/httpd" $server_root = "${httpd_root}/etc/httpd" $conf_dir = "${httpd_dir}/conf" $confd_dir = "${httpd_dir}/conf.d" $mod_dir = $apache::version::distrelease ? { '7' => "${httpd_dir}/conf.modules.d", default => "${httpd_dir}/conf.d", } $mod_enable_dir = undef $vhost_dir = "${httpd_dir}/conf.d" $vhost_enable_dir = undef $conf_file = 'httpd.conf' $conf_enabled = undef $ports_file = "${conf_dir}/ports.conf" $pidfile = 'run/httpd.pid' $logroot = "/var/log/${_scl_httpd_name}" $logroot_mode = undef $lib_path = 'modules' $mpm_module = 'prefork' $dev_packages = "${_scl_httpd_name}-httpd-devel" $default_ssl_cert = '/etc/pki/tls/certs/localhost.crt' $default_ssl_key = '/etc/pki/tls/private/localhost.key' $ssl_sessioncache = '/var/cache/mod_ssl/scache(512000)' $passenger_conf_file = 'passenger_extra.conf' $passenger_conf_package_file = 'passenger.conf' $passenger_root = undef $passenger_ruby = undef $passenger_default_ruby = undef $suphp_addhandler = 'php5-script' $suphp_engine = 'off' $suphp_configpath = undef $php_version = $apache::version::scl_php_version $mod_packages = { 'authnz_ldap' => "${_scl_httpd_name}-mod_ldap", 'ldap' => "${_scl_httpd_name}-mod_ldap", "php${apache::version::scl_php_version}" => "rh-php${_scl_php_version_no_dot}-php", 'ssl' => "${_scl_httpd_name}-mod_ssl", } $mod_libs = { 'nss' => 'libmodnss.so', } $conf_template = 'apache/httpd.conf.erb' $http_protocol_options = undef $keepalive = 'On' $keepalive_timeout = 15 $max_keepalive_requests = 100 $fastcgi_lib_path = undef $mime_support_package = 'mailcap' $mime_types_config = '/etc/mime.types' $docroot = "${httpd_root}/var/www/html" $alias_icons_path = $apache::version::distrelease ? { '7' => "${httpd_root}/usr/share/httpd/icons", default => '/var/www/icons', } $error_documents_path = $apache::version::distrelease ? { '7' => "${httpd_root}/usr/share/httpd/error", default => '/var/www/error' } if $::osfamily == 'RedHat' { $wsgi_socket_prefix = '/var/run/wsgi' } else { $wsgi_socket_prefix = undef } $cas_cookie_path = '/var/cache/mod_auth_cas/' $mellon_lock_file = '/run/mod_auth_mellon/lock' $mellon_cache_size = 100 $mellon_post_directory = undef $modsec_version = 1 $modsec_crs_package = 'mod_security_crs' $modsec_crs_path = '/usr/lib/modsecurity.d' $modsec_dir = '/etc/httpd/modsecurity.d' $secpcrematchlimit = 1500 $secpcrematchlimitrecursion = 1500 $modsec_secruleengine = 'On' $modsec_default_rules = [ 'base_rules/modsecurity_35_bad_robots.data', 'base_rules/modsecurity_35_scanners.data', 'base_rules/modsecurity_40_generic_attacks.data', 'base_rules/modsecurity_50_outbound.data', 'base_rules/modsecurity_50_outbound_malware.data', 'base_rules/modsecurity_crs_20_protocol_violations.conf', 'base_rules/modsecurity_crs_21_protocol_anomalies.conf', 'base_rules/modsecurity_crs_23_request_limits.conf', 'base_rules/modsecurity_crs_30_http_policy.conf', 'base_rules/modsecurity_crs_35_bad_robots.conf', 'base_rules/modsecurity_crs_40_generic_attacks.conf', 'base_rules/modsecurity_crs_41_sql_injection_attacks.conf', 'base_rules/modsecurity_crs_41_xss_attacks.conf', 'base_rules/modsecurity_crs_42_tight_security.conf', 'base_rules/modsecurity_crs_45_trojans.conf', 'base_rules/modsecurity_crs_47_common_exceptions.conf', 'base_rules/modsecurity_crs_49_inbound_blocking.conf', 'base_rules/modsecurity_crs_50_outbound.conf', 'base_rules/modsecurity_crs_59_outbound_blocking.conf', 'base_rules/modsecurity_crs_60_correlation.conf', ] $error_log = 'error_log' $scriptalias = "${httpd_root}/var/www/cgi-bin" $access_log_file = 'access_log' } elsif $::osfamily == 'RedHat' or $::operatingsystem =~ /^[Aa]mazon$/ { $user = 'apache' $group = 'apache' $root_group = 'root' $apache_name = 'httpd' $service_name = 'httpd' $httpd_dir = '/etc/httpd' $server_root = '/etc/httpd' $conf_dir = "${httpd_dir}/conf" $confd_dir = "${httpd_dir}/conf.d" $conf_enabled = undef if $::operatingsystem =~ /^[Aa]mazon$/ and $::operatingsystemmajrelease == '2' { # Amazon Linux 2 uses the /conf.modules.d/ dir $mod_dir = "${httpd_dir}/conf.modules.d" } else { $mod_dir = $apache::version::distrelease ? { '7' => "${httpd_dir}/conf.modules.d", '8' => "${httpd_dir}/conf.modules.d", default => "${httpd_dir}/conf.d", } } $mod_enable_dir = undef $vhost_dir = "${httpd_dir}/conf.d" $vhost_enable_dir = undef $conf_file = 'httpd.conf' $ports_file = "${conf_dir}/ports.conf" $pidfile = 'run/httpd.pid' $logroot = '/var/log/httpd' $logroot_mode = undef $lib_path = 'modules' $mpm_module = 'prefork' $dev_packages = 'httpd-devel' $default_ssl_cert = '/etc/pki/tls/certs/localhost.crt' $default_ssl_key = '/etc/pki/tls/private/localhost.key' $ssl_sessioncache = '/var/cache/mod_ssl/scache(512000)' $passenger_conf_file = 'passenger_extra.conf' $passenger_conf_package_file = 'passenger.conf' $passenger_root = undef $passenger_ruby = undef $passenger_default_ruby = undef $suphp_addhandler = 'php5-script' $suphp_engine = 'off' $suphp_configpath = undef $php_version = $apache::version::distrelease ? { '8' => '7', # RedHat8 default => '5', # RedHat5, RedHat6, RedHat7 } $mod_packages = { # NOTE: The auth_cas module isn't available on RH/CentOS without providing dependency packages provided by EPEL. 'auth_cas' => 'mod_auth_cas', 'auth_kerb' => 'mod_auth_kerb', 'auth_gssapi' => 'mod_auth_gssapi', 'auth_mellon' => 'mod_auth_mellon', 'auth_openidc' => 'mod_auth_openidc', 'authnz_ldap' => $apache::version::distrelease ? { '7' => 'mod_ldap', '8' => 'mod_ldap', default => 'mod_authz_ldap', }, 'authnz_pam' => 'mod_authnz_pam', 'fastcgi' => $apache::version::distrelease ? { '5' => 'mod_fastcgi', '6' => 'mod_fastcgi', default => undef, }, 'fcgid' => 'mod_fcgid', 'geoip' => 'mod_geoip', 'intercept_form_submit' => 'mod_intercept_form_submit', 'ldap' => $apache::version::distrelease ? { '5' => undef, '6' => undef, default => 'mod_ldap', }, 'lookup_identity' => 'mod_lookup_identity', 'md' => 'mod_md', 'pagespeed' => 'mod-pagespeed-stable', # NOTE: The passenger module isn't available on RH/CentOS without # providing dependency packages provided by EPEL and passenger # repositories. See # https://www.phusionpassenger.com/library/install/apache/install/oss/el7/ 'passenger' => 'mod_passenger', 'perl' => 'mod_perl', 'php5' => $apache::version::distrelease ? { '5' => 'php53', default => 'php', }, 'phpXXX' => 'php', 'proxy_html' => 'mod_proxy_html', 'python' => 'mod_python', 'security' => 'mod_security', # NOTE: The module for Shibboleth is not available on RH/CentOS without # providing dependency packages provided by Shibboleth's repositories. # See http://wiki.aaf.edu.au/tech-info/sp-install-guide 'shibboleth' => 'shibboleth', 'ssl' => 'mod_ssl', 'wsgi' => $apache::version::distrelease ? { '8' => 'python3-mod_wsgi', # RedHat8 default => 'mod_wsgi', # RedHat5, RedHat6, RedHat7 }, 'dav_svn' => 'mod_dav_svn', 'suphp' => 'mod_suphp', 'xsendfile' => 'mod_xsendfile', 'nss' => 'mod_nss', 'shib2' => 'shibboleth', } $mod_libs = { 'nss' => 'libmodnss.so', 'wsgi' => $apache::version::distrelease ? { '8' => 'mod_wsgi_python3.so', default => 'mod_wsgi.so', }, } $conf_template = 'apache/httpd.conf.erb' $http_protocol_options = undef $keepalive = 'On' $keepalive_timeout = 15 $max_keepalive_requests = 100 $fastcgi_lib_path = undef $mime_support_package = 'mailcap' $mime_types_config = '/etc/mime.types' $docroot = '/var/www/html' $alias_icons_path = $apache::version::distrelease ? { '7' => '/usr/share/httpd/icons', '8' => '/usr/share/httpd/icons', default => '/var/www/icons', } $error_documents_path = $apache::version::distrelease ? { '7' => '/usr/share/httpd/error', '8' => '/usr/share/httpd/error', default => '/var/www/error' } if $::osfamily == 'RedHat' { $wsgi_socket_prefix = '/var/run/wsgi' } else { $wsgi_socket_prefix = undef } $cas_cookie_path = '/var/cache/mod_auth_cas/' $mellon_lock_file = '/run/mod_auth_mellon/lock' $mellon_cache_size = 100 $mellon_post_directory = undef $modsec_version = 1 $modsec_crs_package = 'mod_security_crs' $modsec_crs_path = '/usr/lib/modsecurity.d' $modsec_dir = '/etc/httpd/modsecurity.d' $secpcrematchlimit = 1500 $secpcrematchlimitrecursion = 1500 $modsec_secruleengine = 'On' $modsec_default_rules = [ 'base_rules/modsecurity_35_bad_robots.data', 'base_rules/modsecurity_35_scanners.data', 'base_rules/modsecurity_40_generic_attacks.data', 'base_rules/modsecurity_50_outbound.data', 'base_rules/modsecurity_50_outbound_malware.data', 'base_rules/modsecurity_crs_20_protocol_violations.conf', 'base_rules/modsecurity_crs_21_protocol_anomalies.conf', 'base_rules/modsecurity_crs_23_request_limits.conf', 'base_rules/modsecurity_crs_30_http_policy.conf', 'base_rules/modsecurity_crs_35_bad_robots.conf', 'base_rules/modsecurity_crs_40_generic_attacks.conf', 'base_rules/modsecurity_crs_41_sql_injection_attacks.conf', 'base_rules/modsecurity_crs_41_xss_attacks.conf', 'base_rules/modsecurity_crs_42_tight_security.conf', 'base_rules/modsecurity_crs_45_trojans.conf', 'base_rules/modsecurity_crs_47_common_exceptions.conf', 'base_rules/modsecurity_crs_49_inbound_blocking.conf', 'base_rules/modsecurity_crs_50_outbound.conf', 'base_rules/modsecurity_crs_59_outbound_blocking.conf', 'base_rules/modsecurity_crs_60_correlation.conf', ] $error_log = 'error_log' $scriptalias = '/var/www/cgi-bin' $access_log_file = 'access_log' } elsif $::osfamily == 'Debian' { $user = 'www-data' $group = 'www-data' $root_group = 'root' $apache_name = 'apache2' $service_name = 'apache2' $httpd_dir = '/etc/apache2' $server_root = '/etc/apache2' $conf_dir = $httpd_dir $confd_dir = "${httpd_dir}/conf.d" # Overwrite conf_enabled causes errors with Shibboleth when enabled on Ubuntu 18.04 $conf_enabled = undef #"${httpd_dir}/conf-enabled.d" $mod_dir = "${httpd_dir}/mods-available" $mod_enable_dir = "${httpd_dir}/mods-enabled" $vhost_dir = "${httpd_dir}/sites-available" $vhost_enable_dir = "${httpd_dir}/sites-enabled" $conf_file = 'apache2.conf' $ports_file = "${conf_dir}/ports.conf" $pidfile = "\${APACHE_PID_FILE}" $logroot = '/var/log/apache2' $logroot_mode = undef $lib_path = '/usr/lib/apache2/modules' $mpm_module = 'worker' $default_ssl_cert = '/etc/ssl/certs/ssl-cert-snakeoil.pem' $default_ssl_key = '/etc/ssl/private/ssl-cert-snakeoil.key' $ssl_sessioncache = "\${APACHE_RUN_DIR}/ssl_scache(512000)" $suphp_addhandler = 'x-httpd-php' $suphp_engine = 'off' $suphp_configpath = '/etc/php5/apache2' if ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '16.04') < 0) or ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '9') < 0) { # Only the major version is used here $php_version = '5' $mod_packages = { 'auth_cas' => 'libapache2-mod-auth-cas', 'auth_kerb' => 'libapache2-mod-auth-kerb', 'auth_openidc' => 'libapache2-mod-auth-openidc', 'auth_gssapi' => 'libapache2-mod-auth-gssapi', 'auth_mellon' => 'libapache2-mod-auth-mellon', 'authnz_pam' => 'libapache2-mod-authnz-pam', 'dav_svn' => 'libapache2-svn', 'fastcgi' => 'libapache2-mod-fastcgi', 'fcgid' => 'libapache2-mod-fcgid', 'geoip' => 'libapache2-mod-geoip', 'intercept_form_submit' => 'libapache2-mod-intercept-form-submit', 'jk' => 'libapache2-mod-jk', 'lookup_identity' => 'libapache2-mod-lookup-identity', 'nss' => 'libapache2-mod-nss', 'pagespeed' => 'mod-pagespeed-stable', 'passenger' => 'libapache2-mod-passenger', 'perl' => 'libapache2-mod-perl2', 'phpXXX' => 'libapache2-mod-phpXXX', 'proxy_html' => 'libapache2-mod-proxy-html', 'python' => 'libapache2-mod-python', 'rpaf' => 'libapache2-mod-rpaf', 'security' => 'libapache2-modsecurity', 'shib2' => 'libapache2-mod-shib2', 'suphp' => 'libapache2-mod-suphp', 'wsgi' => 'libapache2-mod-wsgi', 'xsendfile' => 'libapache2-mod-xsendfile', } } else { $php_version = $facts['operatingsystemmajrelease'] ? { '9' => '7.0', # Debian Stretch '16.04' => '7.0', # Ubuntu Xenial '10' => '7.3', # Debian Buster '20.04' => '7.4', # Ubuntu Foccal Fossal default => '7.2', # Ubuntu Bionic, Cosmic and Disco } $mod_packages = { 'apreq2' => 'libapache2-mod-apreq2', 'auth_cas' => 'libapache2-mod-auth-cas', 'auth_kerb' => 'libapache2-mod-auth-kerb', 'auth_openidc' => 'libapache2-mod-auth-openidc', 'auth_gssapi' => 'libapache2-mod-auth-gssapi', 'auth_mellon' => 'libapache2-mod-auth-mellon', 'authnz_pam' => 'libapache2-mod-authnz-pam', 'dav_svn' => 'libapache2-mod-svn', 'fastcgi' => 'libapache2-mod-fastcgi', 'fcgid' => 'libapache2-mod-fcgid', 'geoip' => 'libapache2-mod-geoip', 'intercept_form_submit' => 'libapache2-mod-intercept-form-submit', 'jk' => 'libapache2-mod-jk', 'lookup_identity' => 'libapache2-mod-lookup-identity', 'nss' => 'libapache2-mod-nss', 'pagespeed' => 'mod-pagespeed-stable', 'passenger' => 'libapache2-mod-passenger', 'perl' => 'libapache2-mod-perl2', 'phpXXX' => 'libapache2-mod-phpXXX', 'python' => 'libapache2-mod-python', 'rpaf' => 'libapache2-mod-rpaf', 'security' => 'libapache2-mod-security2', 'shib2' => 'libapache2-mod-shib2', 'wsgi' => 'libapache2-mod-wsgi', 'xsendfile' => 'libapache2-mod-xsendfile', } } $error_log = 'error.log' $scriptalias = '/usr/lib/cgi-bin' $access_log_file = 'access.log' if $::osfamily == 'Debian' and versioncmp($::operatingsystemrelease, '8') < 0 { $shib2_lib = 'mod_shib_22.so' } elsif ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '19.04') < 0) or ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '10') < 0) { $shib2_lib = 'mod_shib2.so' } else { $shib2_lib = 'mod_shib.so' } $mod_libs = { 'shib2' => $shib2_lib, } $conf_template = 'apache/httpd.conf.erb' $http_protocol_options = undef $keepalive = 'On' $keepalive_timeout = 15 $max_keepalive_requests = 100 $fastcgi_lib_path = '/var/lib/apache2/fastcgi' $mime_support_package = 'mime-support' $mime_types_config = '/etc/mime.types' if ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '13.10') >= 0) or ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '8') >= 0) { $docroot = '/var/www/html' } else { $docroot = '/var/www' } $cas_cookie_path = '/var/cache/apache2/mod_auth_cas/' $mellon_lock_file = undef $mellon_cache_size = undef $mellon_post_directory = '/var/cache/apache2/mod_auth_mellon/' $modsec_version = 1 $modsec_crs_package = 'modsecurity-crs' $modsec_crs_path = '/usr/share/modsecurity-crs' $modsec_dir = '/etc/modsecurity' $secpcrematchlimit = 1500 $secpcrematchlimitrecursion = 1500 $modsec_secruleengine = 'On' if ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '9') >= 0) or ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '18.04') >= 0) { $modsec_default_rules = [ 'crawlers-user-agents.data', 'iis-errors.data', 'java-code-leakages.data', 'java-errors.data', 'lfi-os-files.data', 'php-config-directives.data', 'php-errors.data', 'php-function-names-933150.data', 'php-function-names-933151.data', 'php-variables.data', 'restricted-files.data', 'scanners-headers.data', 'scanners-urls.data', 'scanners-user-agents.data', 'scripting-user-agents.data', 'sql-errors.data', 'sql-function-names.data', 'unix-shell.data', 'windows-powershell-commands.data', ] } else { $modsec_default_rules = [ 'base_rules/modsecurity_35_bad_robots.data', 'base_rules/modsecurity_35_scanners.data', 'base_rules/modsecurity_40_generic_attacks.data', 'base_rules/modsecurity_50_outbound.data', 'base_rules/modsecurity_50_outbound_malware.data', 'base_rules/modsecurity_crs_20_protocol_violations.conf', 'base_rules/modsecurity_crs_21_protocol_anomalies.conf', 'base_rules/modsecurity_crs_23_request_limits.conf', 'base_rules/modsecurity_crs_30_http_policy.conf', 'base_rules/modsecurity_crs_35_bad_robots.conf', 'base_rules/modsecurity_crs_40_generic_attacks.conf', 'base_rules/modsecurity_crs_41_sql_injection_attacks.conf', 'base_rules/modsecurity_crs_41_xss_attacks.conf', 'base_rules/modsecurity_crs_42_tight_security.conf', 'base_rules/modsecurity_crs_45_trojans.conf', 'base_rules/modsecurity_crs_47_common_exceptions.conf', 'base_rules/modsecurity_crs_49_inbound_blocking.conf', 'base_rules/modsecurity_crs_50_outbound.conf', 'base_rules/modsecurity_crs_59_outbound_blocking.conf', 'base_rules/modsecurity_crs_60_correlation.conf', ] } $alias_icons_path = '/usr/share/apache2/icons' $error_documents_path = '/usr/share/apache2/error' if ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '13.10') >= 0) or ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '8') >= 0) { $dev_packages = ['libaprutil1-dev', 'libapr1-dev', 'apache2-dev'] } else { $dev_packages = ['libaprutil1-dev', 'libapr1-dev', 'apache2-prefork-dev'] } # # Passenger-specific settings # $passenger_conf_file = 'passenger.conf' $passenger_conf_package_file = undef if ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '14.04') < 0) or ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '8') < 0) { $passenger_root = '/usr' $passenger_ruby = '/usr/bin/ruby' $passenger_default_ruby = undef } else { $passenger_root = '/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini' $passenger_ruby = undef $passenger_default_ruby = '/usr/bin/ruby' } $wsgi_socket_prefix = undef } elsif $::osfamily == 'FreeBSD' { $user = 'www' $group = 'www' $root_group = 'wheel' $apache_name = 'apache24' $service_name = 'apache24' $httpd_dir = '/usr/local/etc/apache24' $server_root = '/usr/local' $conf_dir = $httpd_dir $confd_dir = "${httpd_dir}/Includes" $conf_enabled = undef $mod_dir = "${httpd_dir}/Modules" $mod_enable_dir = undef $vhost_dir = "${httpd_dir}/Vhosts" $vhost_enable_dir = undef $conf_file = 'httpd.conf' $ports_file = "${conf_dir}/ports.conf" $pidfile = '/var/run/httpd.pid' $logroot = '/var/log/apache24' $logroot_mode = undef $lib_path = '/usr/local/libexec/apache24' $mpm_module = 'prefork' $dev_packages = undef $default_ssl_cert = '/usr/local/etc/apache24/server.crt' $default_ssl_key = '/usr/local/etc/apache24/server.key' $ssl_sessioncache = '/var/run/ssl_scache(512000)' $passenger_conf_file = 'passenger.conf' $passenger_conf_package_file = undef $passenger_root = '/usr/local/lib/ruby/gems/2.0/gems/passenger-4.0.58' $passenger_ruby = '/usr/local/bin/ruby' $passenger_default_ruby = undef $suphp_addhandler = 'php5-script' $suphp_engine = 'off' $suphp_configpath = undef $php_version = '5' $mod_packages = { # NOTE: I list here only modules that are not included in www/apache24 # NOTE: 'passenger' needs to enable APACHE_SUPPORT in make config # NOTE: 'php' needs to enable APACHE option in make config # NOTE: 'dav_svn' needs to enable MOD_DAV_SVN make config # NOTE: not sure where the shibboleth should come from 'auth_kerb' => 'www/mod_auth_kerb2', 'auth_gssapi' => 'www/mod_auth_gssapi', 'auth_openidc'=> 'www/mod_auth_openidc', 'fcgid' => 'www/mod_fcgid', 'passenger' => 'www/rubygem-passenger', 'perl' => 'www/mod_perl2', 'phpXXX' => 'www/mod_phpXXX', 'proxy_html' => 'www/mod_proxy_html', 'python' => 'www/mod_python3', 'wsgi' => 'www/mod_wsgi', 'dav_svn' => 'devel/subversion', 'xsendfile' => 'www/mod_xsendfile', 'rpaf' => 'www/mod_rpaf2', 'shib2' => 'security/shibboleth2-sp', } $mod_libs = { } $conf_template = 'apache/httpd.conf.erb' $http_protocol_options = undef $keepalive = 'On' $keepalive_timeout = 15 $max_keepalive_requests = 100 $fastcgi_lib_path = undef # TODO: revisit $mime_support_package = 'misc/mime-support' $mime_types_config = '/usr/local/etc/mime.types' $wsgi_socket_prefix = undef $docroot = '/usr/local/www/apache24/data' $alias_icons_path = '/usr/local/www/apache24/icons' $error_documents_path = '/usr/local/www/apache24/error' $error_log = 'httpd-error.log' $scriptalias = '/usr/local/www/apache24/cgi-bin' $access_log_file = 'httpd-access.log' } elsif $::osfamily == 'Gentoo' { $user = 'apache' $group = 'apache' $root_group = 'wheel' $apache_name = 'www-servers/apache' $service_name = 'apache2' $httpd_dir = '/etc/apache2' $server_root = '/var/www' $conf_dir = $httpd_dir $confd_dir = "${httpd_dir}/conf.d" $conf_enabled = undef $mod_dir = "${httpd_dir}/modules.d" $mod_enable_dir = undef $vhost_dir = "${httpd_dir}/vhosts.d" $vhost_enable_dir = undef $conf_file = 'httpd.conf' $ports_file = "${conf_dir}/ports.conf" $logroot = '/var/log/apache2' $logroot_mode = undef $lib_path = '/usr/lib/apache2/modules' $mpm_module = 'prefork' $dev_packages = undef $default_ssl_cert = '/etc/ssl/apache2/server.crt' $default_ssl_key = '/etc/ssl/apache2/server.key' $ssl_sessioncache = '/var/run/ssl_scache(512000)' $passenger_root = '/usr' $passenger_ruby = '/usr/bin/ruby' $passenger_conf_file = 'passenger.conf' $passenger_conf_package_file = undef $passenger_default_ruby = undef $suphp_addhandler = 'x-httpd-php' $suphp_engine = 'off' $suphp_configpath = '/etc/php5/apache2' $php_version = '5' $mod_packages = { # NOTE: I list here only modules that are not included in www-servers/apache 'auth_kerb' => 'www-apache/mod_auth_kerb', 'auth_gssapi' => 'www-apache/mod_auth_gssapi', 'authnz_external' => 'www-apache/mod_authnz_external', 'fcgid' => 'www-apache/mod_fcgid', 'passenger' => 'www-apache/passenger', 'perl' => 'www-apache/mod_perl', 'phpXXX' => 'dev-lang/php', 'proxy_html' => 'www-apache/mod_proxy_html', 'proxy_fcgi' => 'www-apache/mod_proxy_fcgi', 'python' => 'www-apache/mod_python', 'wsgi' => 'www-apache/mod_wsgi', 'dav_svn' => 'dev-vcs/subversion', 'xsendfile' => 'www-apache/mod_xsendfile', 'rpaf' => 'www-apache/mod_rpaf', 'xml2enc' => 'www-apache/mod_xml2enc', } $mod_libs = { } $conf_template = 'apache/httpd.conf.erb' $http_protocol_options = undef $keepalive = 'On' $keepalive_timeout = 15 $max_keepalive_requests = 100 $fastcgi_lib_path = undef # TODO: revisit $mime_support_package = 'app-misc/mime-types' $mime_types_config = '/etc/mime.types' $wsgi_socket_prefix = undef $docroot = '/var/www/localhost/htdocs' $alias_icons_path = '/usr/share/apache2/icons' $error_documents_path = '/usr/share/apache2/error' $pidfile = '/var/run/apache2.pid' $error_log = 'error.log' $scriptalias = '/var/www/localhost/cgi-bin' $access_log_file = 'access.log' } elsif $::osfamily == 'Suse' { $user = 'wwwrun' $group = 'www' $root_group = 'root' $apache_name = 'apache2' $service_name = 'apache2' $httpd_dir = '/etc/apache2' $server_root = '/etc/apache2' $conf_dir = $httpd_dir $confd_dir = "${httpd_dir}/conf.d" $conf_enabled = undef $mod_dir = "${httpd_dir}/mods-available" $mod_enable_dir = "${httpd_dir}/mods-enabled" $vhost_dir = "${httpd_dir}/sites-available" $vhost_enable_dir = "${httpd_dir}/sites-enabled" $conf_file = 'httpd.conf' $ports_file = "${conf_dir}/ports.conf" $pidfile = '/var/run/httpd2.pid' $logroot = '/var/log/apache2' $logroot_mode = undef $lib_path = '/usr/lib64/apache2' #changes for some modules based on mpm $mpm_module = 'prefork' if versioncmp($::operatingsystemrelease, '15') < 0 { $default_ssl_cert = '/etc/apache2/ssl.crt/server.crt' $default_ssl_key = '/etc/apache2/ssl.key/server.key' $php_version = '5' } else { $default_ssl_cert = '/etc/apache2/ssl.crt/default-server.crt' $default_ssl_key = '/etc/apache2/ssl.key/default-server.key' $php_version = '7' } $suphp_configpath = "/etc/php${php_version}/apache2" $ssl_sessioncache = '/var/lib/apache2/ssl_scache(512000)' $suphp_addhandler = 'x-httpd-php' $suphp_engine = 'off' if versioncmp($::operatingsystemrelease, '11') < 0 or versioncmp($::operatingsystemrelease, '12') >= 0 { $mod_packages = { 'auth_kerb' => 'apache2-mod_auth_kerb', 'auth_gssapi' => 'apache2-mod_auth_gssapi', 'dav_svn' => 'subversion-server', 'perl' => 'apache2-mod_perl', 'php5' => 'apache2-mod_php5', 'php7' => 'apache2-mod_php7', 'python' => 'apache2-mod_python', 'security' => 'apache2-mod_security2', 'worker' => 'apache2-worker', } } else { $mod_packages = { 'auth_kerb' => 'apache2-mod_auth_kerb', 'auth_gssapi' => 'apache2-mod_auth_gssapi', 'dav_svn' => 'subversion-server', 'perl' => 'apache2-mod_perl', 'php5' => 'apache2-mod_php53', 'python' => 'apache2-mod_python', 'security' => 'apache2-mod_security2', } } $mod_libs = { 'security' => '/usr/lib64/apache2/mod_security2.so', 'php53' => '/usr/lib64/apache2/mod_php5.so', } $conf_template = 'apache/httpd.conf.erb' $http_protocol_options = undef $keepalive = 'On' $keepalive_timeout = 15 $max_keepalive_requests = 100 $fastcgi_lib_path = '/var/lib/apache2/fastcgi' $mime_support_package = 'aaa_base' $mime_types_config = '/etc/mime.types' $docroot = '/srv/www' $cas_cookie_path = '/var/cache/apache2/mod_auth_cas/' $mellon_lock_file = undef $mellon_cache_size = undef $mellon_post_directory = undef $alias_icons_path = '/usr/share/apache2/icons' $error_documents_path = '/usr/share/apache2/error' $dev_packages = ['libapr-util1-devel', 'libapr1-devel', 'libcurl-devel'] $modsec_version = 1 $modsec_crs_package = undef $modsec_crs_path = undef $modsec_default_rules = undef $modsec_dir = '/etc/apache2/modsecurity' $secpcrematchlimit = 1500 $secpcrematchlimitrecursion = 1500 $modsec_secruleengine = 'On' $error_log = 'error.log' $scriptalias = '/usr/lib/cgi-bin' $access_log_file = 'access.log' # # Passenger-specific settings # $passenger_conf_file = 'passenger.conf' $passenger_conf_package_file = undef $passenger_root = '/usr/lib64/ruby/gems/1.8/gems/passenger-5.0.30' $passenger_ruby = '/usr/bin/ruby' $passenger_default_ruby = '/usr/bin/ruby' $wsgi_socket_prefix = undef } else { fail("Class['apache::params']: Unsupported osfamily: ${::osfamily}") } - if ($::operatingsystem == 'Ubuntu' and $::lsbdistrelease == '10.04') or ($::operatingsystem == 'SLES') { + if $::operatingsystem == 'SLES' { $verify_command = '/usr/sbin/apache2ctl -t' } elsif $::operatingsystem == 'FreeBSD' { $verify_command = '/usr/local/sbin/apachectl -t' } elsif ($apache::version::scl_httpd_version) { $verify_command = "/opt/rh/${_scl_httpd_name}/root/usr/sbin/apachectl -t" } else { $verify_command = '/usr/sbin/apachectl -t' } if $::osfamily == 'RedHat' and versioncmp($::operatingsystemrelease, '8.0') >= 0 { $ssl_protocol = ['all'] # Implementations of the SSLv2 and SSLv3 protocol versions have been removed from OpenSSL (and hence mod_ssl) because these are no longer considered secure. For additional documentation https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/deploying_different_types_of_servers/setting-apache-web-server_deploying-different-types-of-servers } else { $ssl_protocol = ['all', '-SSLv2', '-SSLv3'] } } diff --git a/readmes/README_ja_JP.md b/readmes/README_ja_JP.md index 2e9a5648..22fbebcc 100644 --- a/readmes/README_ja_JP.md +++ b/readmes/README_ja_JP.md @@ -1,5753 +1,5748 @@ # apache [モゞュヌルの抂芁]: #module-description [セットアップ]: #setup [Apacheの䜿甚を始める]: #beginning-with-apache [䜿甚方法]: #usage [バヌチャルホストの蚭定]: #configuring-virtual-hosts [SSLを䜿ったバヌチャルホストの蚭定]: #configuring-virtual-hosts-with-ssl [バヌチャルホストのポヌトおよびアドレスのバむンディング蚭定]: #configuring-virtual-host-port-and-address-bindings [アプリおよびプロセッサのバヌチャルホストの蚭定]: #configuring-virtual-hosts-for-apps-and-processors [IPベヌスのバヌチャルホストの蚭定]: #configuring-ip-based-virtual-hosts [Apacheモゞュヌルのむンストヌル]: #installing-apache-modules [任意モゞュヌルのむンストヌル]: #installing-arbitrary-modules [固有モゞュヌルのむンストヌル]: #installing-specific-modules [FastCGIサヌバの蚭定]: #configuring-fastcgi-servers-to-handle-php-files [ロヌドバランシングの䟋]: #load-balancing-examples [apacheの圱響]: #what-the-apache-module-affects [リファレンス]: #reference [パブリッククラス]: #public-classes [プラむベヌトクラス]: #private-classes [パブリック定矩タむプ]: #public-defined-types [プラむベヌト定矩タむプ]: #private-defined-types [テンプレヌト]: #templates [タスク]: #tasks [制玄事項]: #limitations [開発]: #development [貢献]: #contributing [`AddDefaultCharset`]: https://httpd.apache.org/docs/current/mod/core.html#adddefaultcharset [`add_listen`]: #add_listen [`Alias`]: https://httpd.apache.org/docs/current/mod/mod_alias.html#alias [`AliasMatch`]: https://httpd.apache.org/docs/current/mod/mod_alias.html#aliasmatch [゚むリアスサヌバ]: https://httpd.apache.org/docs/current/urlmapping.html [`AllowEncodedSlashes`]: https://httpd.apache.org/docs/current/mod/core.html#allowencodedslashes [`apache`]: #class-apache [`apache_version`]: #apache_version [`apache::balancer`]: #defined-type-apachebalancer [`apache::balancermember`]: #defined-type-apachebalancermember [`apache::fastcgi::server`]: #defined-type-apachefastcgiserver [`apache::mod`]: #defined-type-apachemod [`apache::mod::`]: #classes-apachemodmodule-name [`apache::mod::alias`]: #class-apachemodalias [`apache::mod::auth_cas`]: #class-apachemodauth_cas [`apache::mod::auth_mellon`]: #class-apachemodauth_mellon [`apache::mod::authn_dbd`]: #class-apachemodauthn_dbd [`apache::mod::authnz_ldap`]: #class-apachemodauthnz_ldap [`apache::mod::cluster`]: #class-apachemodcluster [`apache::mod::data]: #class-apachemoddata [`apache::mod::disk_cache`]: #class-apachemoddisk_cache [`apache::mod::dumpio`]: #class-apachemoddumpio [`apache::mod::event`]: #class-apachemodevent [`apache::mod::ext_filter`]: #class-apachemodext_filter [`apache::mod::geoip`]: #class-apachemodgeoip [`apache::mod::itk`]: #class-apachemoditk [`apache::mod::jk`]: #class-apachemodjk [`apache::mod::ldap`]: #class-apachemodldap [`apache::mod::passenger`]: #class-apachemodpassenger [`apache::mod::peruser`]: #class-apachemodperuser [`apache::mod::prefork`]: #class-apachemodprefork [`apache::mod::proxy`]: #class-apachemodproxy [`apache::mod::proxy_balancer`]: #class-apachemodproxybalancer [`apache::mod::proxy_fcgi`]: #class-apachemodproxy_fcgi [`apache::mod::proxy_html`]: #class-apachemodproxy_html [`apache::mod::python`]: #class-apachemodpython [`apache::mod::security`]: #class-apachemodsecurity [`apache::mod::shib`]: #class-apachemodshib [`apache::mod::ssl`]: #class-apachemodssl [`apache::mod::status`]: #class-apachemodstatus [`apache::mod::userdir`]: #class-apachemoduserdir [`apache::mod::worker`]: #class-apachemodworker [`apache::mod::wsgi`]: #class-apachemodwsgi [`apache::params`]: #class-apacheparams [`apache::version`]: #class-apacheversion [`apache::vhost`]: #defined-type-apachevhost [`apache::vhost::custom`]: #defined-type-apachevhostcustom [`apache::vhost::WSGIImportScript`]: #wsgiimportscript [Apache HTTPサヌバ]: https://httpd.apache.org [Apacheモゞュヌル]: https://httpd.apache.org/docs/current/mod/ [配列]: https://docs.puppet.com/puppet/latest/reference/lang_data_array.html [オヌディットログ]: https://github.com/SpiderLabs/ModSecurity/wiki/ModSecurity-2-Data-Formats#audit-log [beaker-rspec]: https://github.com/puppetlabs/beaker-rspec [蚌明曞倱効リスト]: https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslcarevocationfile [蚌明曞倱効リストパス]: https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslcarevocationpath [コモンゲヌトりェむむンタヌフェヌス]: https://httpd.apache.org/docs/current/howto/cgi.html [`confd_dir`]: #confd_dir [`content`]: #content [CONTRIBUTING.md]: CONTRIBUTING.md [カスタム゚ラヌドキュメント]: https://httpd.apache.org/docs/current/custom-error.html [`custom_fragment`]: #custom_fragment [`default_mods`]: #default_mods [`default_ssl_crl`]: #default_ssl_crl [`default_ssl_crl_path`]: #default_ssl_crl_path [`default_ssl_vhost`]: #default_ssl_vhost [`dev_packages`]: #dev_packages [`directory`]: #directory [`directories`]: #parameter-directories-for-apachevhost [`DirectoryIndex`]: https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex [`docroot`]: #docroot [`docroot_owner`]: #docroot_owner [`docroot_group`]: #docroot_group [`DocumentRoot`]: https://httpd.apache.org/docs/current/mod/core.html#documentroot [`EnableSendfile`]: https://httpd.apache.org/docs/current/mod/core.html#enablesendfile [適甚モヌド]: http://selinuxproject.org/page/Guide/Mode [`ensure`]: https://docs.puppet.com/latest/type.html#package-attribute-ensure [`error_log_file`]: #error_log_file [`error_log_syslog`]: #error_log_syslog [`error_log_pipe`]: #error_log_pipe [`ExpiresByType`]: https://httpd.apache.org/docs/current/mod/mod_expires.html#expiresbytype [゚クスポヌトリ゜ヌス]: http://docs.puppet.com/latest/reference/lang_exported.md [`ExtendedStatus`]: https://httpd.apache.org/docs/current/mod/core.html#extendedstatus [Facter]: http://docs.puppet.com/facter/ [FastCGI]: http://www.fastcgi.com/ [FallbackResource]: https://httpd.apache.org/docs/current/mod/mod_dir.html#fallbackresource [`fallbackresource`]: #fallbackresource [`FileETag`]: https://httpd.apache.org/docs/current/mod/core.html#fileetag [フィルタルヌル]: https://httpd.apache.org/docs/current/filter.html [`filters`]: #filters [`ForceType`]: https://httpd.apache.org/docs/current/mod/core.html#forcetype [GeoIPScanProxyHeaders]: http://dev.maxmind.com/geoip/legacy/mod_geoip2/#Proxy-Related_Directives [`gentoo/puppet-portage`]: https://github.com/gentoo/puppet-portage [ハッシュ]: https://docs.puppet.com/puppet/latest/reference/lang_data_hash.html [`HttpProtocolOptions`]: http://httpd.apache.org/docs/current/mod/core.html#httpprotocoloptions [`IncludeOptional`]: https://httpd.apache.org/docs/current/mod/core.html#includeoptional [`Include`]: https://httpd.apache.org/docs/current/mod/core.html#include [むンタヌバル構文]: https://httpd.apache.org/docs/current/mod/mod_expires.html#AltSyn [`ip`]: #ip [`ip_based`]: #ip_based [IPベヌスのバヌチャルホスト]: https://httpd.apache.org/docs/current/vhosts/ip-based.html [`KeepAlive`]: https://httpd.apache.org/docs/current/mod/core.html#keepalive [`KeepAliveTimeout`]: https://httpd.apache.org/docs/current/mod/core.html#keepalivetimeout [`keepalive`パラメヌタ]: #keepalive [`keepalive_timeout`]: #keepalive_timeout [`limitreqfieldsize`]: https://httpd.apache.org/docs/current/mod/core.html#limitrequestfieldsize [`limitreqfields`]: http://httpd.apache.org/docs/current/mod/core.html#limitrequestfields [`lib`]: #lib [`lib_path`]: #lib_path [`Listen`]: https://httpd.apache.org/docs/current/bind.html [`ListenBackLog`]: https://httpd.apache.org/docs/current/mod/mpm_common.html#listenbacklog [`LoadFile`]: https://httpd.apache.org/docs/current/mod/mod_so.html#loadfile [`LogFormat`]: https://httpd.apache.org/docs/current/mod/mod_log_config.html#logformat [`logroot`]: #logroot [ログセキュリティ]: https://httpd.apache.org/docs/current/logs.html#security [`manage_docroot`]: #manage_docroot [`manage_user`]: #manage_user [`manage_group`]: #manage_group [`supplementary_groups`]: #supplementary_groups [`MaxConnectionsPerChild`]: https://httpd.apache.org/docs/current/mod/mpm_common.html#maxconnectionsperchild [`max_keepalive_requests`]: #max_keepalive_requests [`MaxRequestWorkers`]: https://httpd.apache.org/docs/current/mod/mpm_common.html#maxrequestworkers [`MaxSpareThreads`]: https://httpd.apache.org/docs/current/mod/mpm_common.html#maxsparethreads [MIME `content-type`]: https://www.iana.org/assignments/media-types/media-types.xhtml [`MinSpareThreads`]: https://httpd.apache.org/docs/current/mod/mpm_common.html#minsparethreads [`mod_alias`]: https://httpd.apache.org/docs/current/mod/mod_alias.html [`mod_auth_cas`]: https://github.com/Jasig/mod_auth_cas [`mod_auth_kerb`]: http://modauthkerb.sourceforge.net/configure.html [`mod_auth_gssapi`]: https://github.com/modauthgssapi/mod_auth_gssapi [`mod_authnz_external`]: https://github.com/phokz/mod-auth-external [`mod_auth_dbd`]: http://httpd.apache.org/docs/current/mod/mod_authn_dbd.html [`mod_auth_mellon`]: https://github.com/UNINETT/mod_auth_mellon [`mod_dbd`]: http://httpd.apache.org/docs/current/mod/mod_dbd.html [`mod_disk_cache`]: https://httpd.apache.org/docs/2.2/mod/mod_disk_cache.html [`mod_dumpio`]: https://httpd.apache.org/docs/2.4/mod/mod_dumpio.html [`mod_env`]: http://httpd.apache.org/docs/current/mod/mod_env.html [`mod_expires`]: https://httpd.apache.org/docs/current/mod/mod_expires.html [`mod_ext_filter`]: https://httpd.apache.org/docs/current/mod/mod_ext_filter.html [`mod_fcgid`]: https://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html [`mod_geoip`]: http://dev.maxmind.com/geoip/legacy/mod_geoip2/ [`mod_info`]: https://httpd.apache.org/docs/current/mod/mod_info.html [`mod_ldap`]: https://httpd.apache.org/docs/2.2/mod/mod_ldap.html [`mod_mpm_event`]: https://httpd.apache.org/docs/current/mod/event.html [`mod_negotiation`]: https://httpd.apache.org/docs/current/mod/mod_negotiation.html [`mod_pagespeed`]: https://developers.google.com/speed/pagespeed/module/?hl=en [`mod_passenger`]: https://www.phusionpassenger.com/library/config/apache/reference/ [`mod_php`]: http://php.net/manual/en/book.apache.php [`mod_proxy`]: https://httpd.apache.org/docs/current/mod/mod_proxy.html [`mod_proxy_balancer`]: https://httpd.apache.org/docs/current/mod/mod_proxy_balancer.html [`mod_reqtimeout`]: https://httpd.apache.org/docs/current/mod/mod_reqtimeout.html [`mod_python`]: http://modpython.org/ [`mod_rewrite`]: https://httpd.apache.org/docs/current/mod/mod_rewrite.html [`mod_security`]: https://www.modsecurity.org/ [`mod_ssl`]: https://httpd.apache.org/docs/current/mod/mod_ssl.html [`mod_status`]: https://httpd.apache.org/docs/current/mod/mod_status.html [`mod_version`]: https://httpd.apache.org/docs/current/mod/mod_version.html [`mod_wsgi`]: https://modwsgi.readthedocs.org/en/latest/ [モゞュヌル貢献ガむド]: https://docs.puppet.com/forge/contributing.html [`mpm_module`]: #mpm_module [マルチプロセッシングモゞュヌル]: https://httpd.apache.org/docs/current/mpm.html [名前ベヌスのバヌチャルホスト]: https://httpd.apache.org/docs/current/vhosts/name-based.html [`no_proxy_uris`]: #no_proxy_uris [オヌプン゜ヌス版Puppet]: https://docs.puppet.com/puppet/ [`Options`]: https://httpd.apache.org/docs/current/mod/core.html#options [`path`]: #path [`Peruser`]: https://www.freebsd.org/cgi/url.cgi?ports/www/apache22-peruser-mpm/pkg-descr [`port`]: #port [`priority`]: #defined-types-apachevhost [`proxy_dest`]: #proxy_dest [`proxy_dest_match`]: #proxy_dest_match [`proxy_pass`]: #proxy_pass [`ProxyPass`]: https://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypass [`ProxySet`]: https://httpd.apache.org/docs/current/mod/mod_proxy.html#proxyset [Puppet Enterprise]: https://docs.puppet.com/pe/ [Puppet Forge]: https://forge.puppet.com [Puppet]: https://puppet.com [Puppetモゞュヌル]: https://docs.puppet.com/puppet/latest/reference/modules_fundamentals.html [Puppetモゞュヌルのコヌド]: https://github.com/puppetlabs/puppetlabs-apache/blob/main/manifests/default_mods.pp [`purge_configs`]: #purge_configs [`purge_vhost_dir`]: #purge_vhost_dir [Python]: https://www.python.org/ [Rack]: http://rack.github.io/ [`rack_base_uris`]: #rack_base_uris [RFC 2616]: https://www.ietf.org/rfc/rfc2616.txt [`RequestReadTimeout`]: https://httpd.apache.org/docs/current/mod/mod_reqtimeout.html#requestreadtimeout [rspec-puppet]: http://rspec-puppet.com/ [`ScriptAlias`]: https://httpd.apache.org/docs/current/mod/mod_alias.html#scriptalias [`ScriptAliasMatch`]: https://httpd.apache.org/docs/current/mod/mod_alias.html#scriptaliasmatch [`scriptalias`]: #scriptalias [SELinux]: http://selinuxproject.org/ [`ServerAdmin`]: https://httpd.apache.org/docs/current/mod/core.html#serveradmin [`serveraliases`]: #serveraliases [`ServerLimit`]: https://httpd.apache.org/docs/current/mod/mpm_common.html#serverlimit [`ServerName`]: https://httpd.apache.org/docs/current/mod/core.html#servername [`ServerRoot`]: https://httpd.apache.org/docs/current/mod/core.html#serverroot [`ServerTokens`]: https://httpd.apache.org/docs/current/mod/core.html#servertokens [`ServerSignature`]: https://httpd.apache.org/docs/current/mod/core.html#serversignature [サヌビス属性リスタヌト]: http://docs.puppet.com/latest/type.html#service-attribute-restart [`source`]: #source [`SSLCARevocationCheck`]: https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslcarevocationcheck [SSL蚌明曞のキヌファむル]: https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslcertificatekeyfile [SSLチェヌン]: https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslcertificatechainfile [SSL暗号化]: https://httpd.apache.org/docs/current/ssl/index.html [`ssl`]: #ssl [`ssl_cert`]: #ssl_cert [`ssl_compression`]: #ssl_compression [`ssl_key`]: #ssl_key [`StartServers`]: https://httpd.apache.org/docs/current/mod/mpm_common.html#startservers [suPHP]: http://www.suphp.org/Home.html [`suphp_addhandler`]: #suphp_addhandler [`suphp_configpath`]: #suphp_configpath [`suphp_engine`]: #suphp_engine [察応するオペレヌティングシステム]: https://forge.puppet.com/supported#puppet-supported-modules-compatibility-matrix [`ThreadLimit`]: https://httpd.apache.org/docs/current/mod/mpm_common.html#threadlimit [`ThreadsPerChild`]: https://httpd.apache.org/docs/current/mod/mpm_common.html#threadsperchild [`TimeOut`]: https://httpd.apache.org/docs/current/mod/core.html#timeout [テンプレヌト]: http://docs.puppet.com/puppet/latest/reference/lang_template.html [`TraceEnable`]: https://httpd.apache.org/docs/current/mod/core.html#traceenable [`UseCanonicalName`]: https://httpd.apache.org/docs/current/mod/core.html#usecanonicalname [`verify_config`]: #verify_config [`vhost`]: #defined-type-apachevhost [`vhost_dir`]: #vhost_dir [`virtual_docroot`]: #virtual_docroot [Webサヌバゲヌトりェむむンタヌフェヌス ]: https://www.python.org/dev/peps/pep-3333/#abstract [`WSGIRestrictEmbedded`]: http://modwsgi.readthedocs.io/en/develop/configuration-directives/WSGIRestrictEmbedded.html [`WSGIPythonPath`]: http://modwsgi.readthedocs.org/en/develop/configuration-directives/WSGIPythonPath.html [`WSGIPythonHome`]: http://modwsgi.readthedocs.org/en/develop/configuration-directives/WSGIPythonHome.html #### 目次 1. [モゞュヌルの抂芁 - apacheモゞュヌルずは 䜕をするためのもの][モゞュヌルの抂芁] 2. [セットアップ - apacheの䜿甚を開始するにあたっおの基瀎][セットアップ] - [apacheモゞュヌルが圱響を䞎えるもの][apacheの圱響] - [Apacheの䜿甚を始める - むンストヌル][Apacheの䜿甚を始める] 3. [䜿甚方法 - 蚭定に䜿甚できるクラスず定矩タむプ][䜿甚方法] - [バヌチャルホストの蚭定 - 䜿甚開始に圹立぀䟋][バヌチャルホストの蚭定] - [PHPファむルを凊理するFastCGIサヌバの蚭定][FastCGIサヌバの蚭定] - [゚クスポヌトおよび非゚クスポヌトリ゜ヌスのロヌドバランシング][ロヌドバランシングの䟋] 4. [リファレンス - モゞュヌルの機胜ず動䜜に぀いお][リファレンス] - [パブリッククラス][] - [プラむベヌトクラス][] - [パブリック定矩タむプ][] - [プラむベヌト定矩タむプ][] - [テンプレヌト][] - [タスク][] 5. [制玄事項 - OSの互換性など][制玄事項] 6. [開発 - モゞュヌルぞの貢献方法][開発] - [apacheモゞュヌルぞの貢献][貢献] - [テストの実斜 - クむックガむド][テストの実斜] ## モゞュヌルの抂芁 [Apache HTTPサヌバ][] (Apache HTTPD、あるいは単にApacheずも呌ばれたす)は、広く䜿甚されおいるWebサヌバです。この[Puppetモゞュヌル][]によっお、むンフラ内でApacheを管理するための蚭定がシンプルなものになりたす。幅広いバヌチャルホストセットアップを蚭定および管理し、[Apacheモゞュヌル][]を効率的にむンストヌルしお蚭定するこずができたす。 ## セットアップ ### apacheモゞュヌルが圱響を䞎えるもの: - (䜜成し、曞き蟌みを行う)蚭定ファむルおよびディレクトリ - **譊告**: Puppetにより管理*されおいない*蚭定はパヌゞされたす。 - Apacheのパッケヌゞ/サヌビス/蚭定ファむル - Apacheモゞュヌル - バヌチャルホスト - リッスンするポヌト - FreeBSDおよびGentooの`/etc/make.conf` Gentooでは、このモゞュヌルは [`gentoo/puppet-portage`][] Puppetモゞュヌルに䟝存したす。Gentooに぀いおは、いく぀かのオプションが適甚され、䞀郚の機胜や蚭定が有効になりたすが、このモゞュヌルに[察応するオペレヌティングシステム][]ではない点に留意しおください。 > **譊告**: このモゞュヌルにより、Apache蚭定ファむルおよびディレクトリが修正され、Puppetで管理されおいない蚭定がパヌゞされたす。Apache蚭定はPuppetで管理する必芁がありたす。これは、管理されおいない蚭定ファむルにより、予期せぬ䞍具合が生じる可胜性があるためです。 > >党面的なPuppet管理を䞀時的に無効にするには、[`apache`][]クラス宣蚀の[`purge_configs`][]パラメヌタをfalseに蚭定したす。この手順は、カスタマむズした蚭定を保存し、リロケヌションするための䞀時的な察策ずしおのみ掚奚されたす。 ### Apacheの䜿甚を始める デフォルトパラメヌタを甚いおPuppetでApacheをむンストヌルするには、[`apache`][]クラスを宣蚀したす。 ``` puppet class { 'apache': } ``` デフォルトオプションを甚いおこのクラスを宣蚀するず、モゞュヌルでは以䞋のこずが実行されたす。 - オペレヌティングシステムに適したApache゜フトりェアパッケヌゞおよび[必芁なApacheモゞュヌル](#default_mods)をむンストヌルしたす。 - オペレヌティングシステムに応じた[デフォルトロケヌション](#conf_dir)を甚いお、ディレクトリ内に必芁な蚭定ファむルを配眮したす。 - デフォルトのバヌチャルホストおよび暙準的なポヌト('80')ずアドレス('\*')のバむンディングを甚いおサヌバを蚭定したす。 - ドキュメントルヌトディレクトリを䜜成したす。オペレヌティングシステムによっお異なりたすが、通垞は`/var/www`です。 - Apacheサヌビスを開始したす。 Apacheのデフォルト蚭定は、オペレヌティングシステムによっお異なりたす。これらのデフォルトは、テスト環境では機胜したすが、本皌働環境には掚奚されたせん。実際のサむトに応じおクラスのパラメヌタをカスタマむズするこずを掚奚したす。 䟋えば、以䞋の宣蚀では、apacheモゞュヌルの[デフォルトのバヌチャルホスト蚭定][バヌチャルホストの蚭定]を䜿わずにApacheがむンストヌルされるので、すべおのApacheバヌチャルホストをカスタマむズするこずができたす。 ``` puppet class { 'apache': default_vhost => false, } ``` > **泚意**: `default_vhost`を`false`に蚭定する堎合、少なくずも1぀の`apache::vhost`リ゜ヌスを远加する必芁がありたす。远加しなければ、Apacheは起動したせん。デフォルトのバヌチャルホストを蚭定するには、`apache`クラスで`default_vhost`を蚭定するか、[`apache::vhost`][]定矩タむプを䜿甚したす。[`apache::vhost`][]定矩タむプを甚いお、远加の固有バヌチャルホストを蚭定するこずもできたす。 ## 䜿甚方法 ### バヌチャルホストの蚭定 デフォルトの[`apache`][]クラスは、ポヌト80にバヌチャルホストを蚭定したす。すべおのむンタヌフェヌスをリッスンし、[`docroot`][]パラメヌタのデフォルトディレクトリ`/var/www`をサヌブしたす。 基本の[名前ベヌスのバヌチャルホスト][]を蚭定するには、[`apache::vhost`][]定矩タむプで[`port`][]および[`docroot`][]パラメヌタを指定したす。 ``` puppet apache::vhost { 'vhost.example.com': port => '80', docroot => '/var/www/vhost', } ``` すべおのバヌチャルホストパラメヌタのリストに぀いおは、[`apache::vhost`][]定矩タむプのリファレンスを参照しおください。 > **泚意**: Apacheはバヌチャルホストをアルファベット順に凊理したす。サヌバ管理者は、バヌチャルホスト蚭定ファむル名の先頭に数字を付けるこずで、 Apacheバヌチャルホスト凊理の優先順䜍を蚭定できたす。[`apache::vhost`][]定矩タむプは、デフォルトの [`priority`][]である25を適甚したす。これはPuppetではバヌチャルホストのファむル名の先頭に`25-`が付いおいるず解釈されたす。そのため、優先順䜍が同じサむトが耇数ある堎合や、`priority`パラメヌタの倀をfalseに蚭定しお優先順䜍番号を無効にした堎合でも、Apacheはバヌチャルホストをアルファベット順に凊理したす。 `docroot`のナヌザおよびグルヌプのオヌナヌシップを蚭定するには、[`docroot_owner`][]および[`docroot_group`][]パラメヌタを䜿甚したす。 ``` puppet apache::vhost { 'user.example.com': port => '80', docroot => '/var/www/user', docroot_owner => 'www-data', docroot_group => 'www-data', } ``` #### SSLを䜿ったバヌチャルホストの蚭定 [SSL encryption][]およびデフォルトのSSL蚌明曞を䜿うようにバヌチャルホストを蚭定するには、[`ssl`][]パラメヌタを蚭定したす。たた、[`port`][]パラメヌタを指定する必芁もありたす。通垞は、'443'ずいう倀がHTTPSリク゚ストに察応したす。 ``` puppet apache::vhost { 'ssl.example.com': port => '443', docroot => '/var/www/ssl', ssl => true, } ``` SSLおよび固有SSL蚌明曞を䜿うようにバヌチャルホストを蚭定するには、[`ssl_cert`][]および[`ssl_key`][]パラメヌタで蚌明曞およびキヌぞのパスを䜿甚したす。 ``` puppet apache::vhost { 'cert.example.com': port => '443', docroot => '/var/www/cert', ssl => true, ssl_cert => '/etc/ssl/fourth.example.com.cert', ssl_key => '/etc/ssl/fourth.example.com.key', } ``` 同じドメむンでSSLず暗号化されおいないバヌチャルホストを混ぜお蚭定するには、それぞれを個別の[`apache::vhost`][]定矩タむプで宣蚀したす。 ``` puppet # The non-ssl virtual host apache::vhost { 'mix.example.com non-ssl': servername => 'mix.example.com', port => '80', docroot => '/var/www/mix', } # The SSL virtual host at the same domain apache::vhost { 'mix.example.com ssl': servername => 'mix.example.com', port => '443', docroot => '/var/www/mix', ssl => true, } ``` 暗号化されおいない接続をSSLにリダむレクトするようにバヌチャルホストを蚭定するには、それぞれを個別の[`apache::vhost`][]定矩タむプで宣蚀し、SSLが有効化されおいるバヌチャルホストに、暗号化されおいないリク゚ストをリダむレクトしたす。 ``` puppet apache::vhost { 'redirect.example.com non-ssl': servername => 'redirect.example.com', port => '80', docroot => '/var/www/redirect', redirect_status => 'permanent', redirect_dest => 'https://redirect.example.com/' } apache::vhost { 'redirect.example.com ssl': servername => 'redirect.example.com', port => '443', docroot => '/var/www/redirect', ssl => true, } ``` #### バヌチャルホストのポヌトおよびアドレスのバむンディング蚭定  バヌチャルホストはデフォルトですべおのIPアドレス('\*')をリッスンしたす。特定のIPアドレスをリッスンするようにバヌチャルホストを蚭定するには、[`ip`][]パラメヌタを䜿甚したす。 ``` puppet apache::vhost { 'ip.example.com': ip => '127.0.0.1', port => '80', docroot => '/var/www/ip', } ``` [`ip`][]パラメヌタにIPアドレスの配列を䜿えば、1぀のバヌチャルホストに耇数のIPアドレスを蚭定するこずもできたす。 ``` puppet apache::vhost { 'ip.example.com': ip => ['127.0.0.1','169.254.1.1'], port => '80', docroot => '/var/www/ip', } ``` [`port`][]パラメヌタにポヌトの配列を䜿えば、1぀のバヌチャルホストに耇数のポヌトを蚭定するこずができたす。 ``` puppet apache::vhost { 'ip.example.com': ip => ['127.0.0.1'], port => ['80','8080'] docroot => '/var/www/ip', } ``` [゚むリアスサヌバ][]を䜿っおバヌチャルホストを蚭定するには、[`serveraliases`][]パラメヌタを䜿っお゚むリアスを指定したす。 ``` puppet apache::vhost { 'aliases.example.com': serveraliases => [ 'aliases.example.org', 'aliases.example.net', ], port => '80', docroot => '/var/www/aliases', } ``` `/var/www/example.com`に'http://example.com.loc'をマッピングするケヌスのように、 同じ名前のディレクトリにマッピングされたサブドメむン甚にワむルドカヌド゚むリアスを䜿っおバヌチャルホストを蚭定するには、[`serveraliases`][]パラメヌタを䜿っおワむルドカヌド゚むリアスを、[`virtual_docroot`][]パラメヌタを䜿っおドキュメントルヌトを定矩したす。 ``` puppet apache::vhost { 'subdomain.loc': vhost_name => '*', port => '80', virtual_docroot => '/var/www/%-2+', docroot => '/var/www', serveraliases => ['*.loc',], } ``` [フィルタルヌル][]を䜿っおバヌチャルホストを蚭定するには、[`filters`][]パラメヌタを䜿っお、フィルタディレクティブを[array][]ずしお枡したす。 ``` puppet apache::vhost { 'subdomain.loc': port => '80', filters => [ 'FilterDeclare COMPRESS', 'FilterProvider COMPRESS DEFLATE resp=Content-Type $text/html', 'FilterChain COMPRESS', 'FilterProtocol COMPRESS DEFLATE change=yes;byteranges=no', ], docroot => '/var/www/html', } ``` #### アプリおよびプロセッサのバヌチャルホストの蚭定  [suPHP][]を䜿っおバヌチャルホストを蚭定するには、以䞋のパラメヌタを䜿甚したす。 * [`suphp_engine`][]、suPHP゚ンゞンを有効にしたす。 * [`suphp_addhandler`][]、MIMEタむプを定矩したす。 * [`suphp_configpath`][]、suPHPがPHPむンタヌプリタに枡すパスを蚭定したす。 * [`directory`][]、ディレクトリ、ファむル、ロケヌションの各ディレクティブブロックを蚭定したす。 䟋:  ``` puppet apache::vhost { 'suphp.example.com': port => '80', docroot => '/home/appuser/myphpapp', suphp_addhandler => 'x-httpd-php', suphp_engine => 'on', suphp_configpath => '/etc/php5/apache2', directories => [ { 'path' => '/home/appuser/myphpapp', 'suphp' => { user => 'myappuser', group => 'myappgroup', }, }, ], } ``` [Python][]アプリケヌション甚の[Webサヌバゲヌトりェむむンタヌフェヌス][] (WSGI)を䜿っおバヌチャルホストを蚭定するには、`wsgi`パラメヌタセットを䜿甚したす。 ``` puppet apache::vhost { 'wsgi.example.com': port => '80', docroot => '/var/www/pythonapp', wsgi_application_group => '%{GLOBAL}', wsgi_daemon_process => 'wsgi', wsgi_daemon_process_options => { processes => '2', threads => '15', display-name => '%{GROUP}', }, wsgi_import_script => '/var/www/demo.wsgi', wsgi_import_script_options => { process-group => 'wsgi', application-group => '%{GLOBAL}', }, wsgi_process_group => 'wsgi', wsgi_script_aliases => { '/' => '/var/www/demo.wsgi' }, } ``` Apache 2.2.16の時点では、Apacheは[FallbackResource][]をサポヌトしおいたす。これは、䞀般的なRewriteRulesに代わるシンプルなディレクティブです。[`fallbackresource`][]パラメヌタを䜿えば、FallbackResourceを蚭定できたす。 ``` puppet apache::vhost { 'wordpress.example.com': port => '80', docroot => '/var/www/wordpress', fallbackresource => '/index.php', } ``` > **泚意**: Apache 2.2.24以降では、`fallbackresource`パラメヌタがサポヌトするのは'disabled'倀のみです。 [コモンゲヌトりェむむンタヌフェヌス][] (CGI)ファむル甚の指定ディレクトリを䜿っおバヌチャルホストを蚭定するには、[`scriptalias`][]パラメヌタを䜿っお`cgi-bin`パスを定矩したす。 ``` puppet apache::vhost { 'cgi.example.com': port => '80', docroot => '/var/www/cgi', scriptalias => '/usr/lib/cgi-bin', } ``` [Rack][]甚のバヌチャルホストを蚭定するには、[`rack_base_uris`][]パラメヌタを䜿甚したす。 ``` puppet apache::vhost { 'rack.example.com': port => '80', docroot => '/var/www/rack', rack_base_uris => ['/rackapp1', '/rackapp2'], } ``` #### IPベヌスのバヌチャルホストの蚭定  任意のポヌトをリッスンし、固有IPアドレスのリク゚ストに応答する[IPベヌスのバヌチャルホスト][]を蚭定するこずができたす。この䟋では、サヌバはポヌト80および81をリッスンしたす。これは、この䟋のバヌチャルホストが[`port`][]パラメヌタにより宣蚀されお_いない_ ためです。 ``` puppet apache::listen { '80': } apache::listen { '81': } ``` [`ip_based`][]パラメヌタを䜿っおIPベヌスのバヌチャルホストを蚭定したす。 ``` puppet apache::vhost { 'first.example.com': ip => '10.0.0.10', docroot => '/var/www/first', ip_based => true, } apache::vhost { 'second.example.com': ip => '10.0.0.11', docroot => '/var/www/second', ip_based => true, } ``` 任意の[SSL][SSL暗号化]構成ず暗号化されおいない構成を組み合わせ、IPベヌスず[名前ベヌスのバヌチャルホスト][]を混ぜお蚭定するこずもできたす。 この䟋では、1぀のIPアドレス(この䟋では、10.0.0.10)に2぀のIPベヌスのバヌチャルホストを远加したす。䞀方はSSLを䜿甚するもの、もう䞀方は暗号化されおいないものです。 ``` puppet apache::vhost { 'The first IP-based virtual host, non-ssl': servername => 'first.example.com', ip => '10.0.0.10', port => '80', ip_based => true, docroot => '/var/www/first', } apache::vhost { 'The first IP-based vhost, ssl': servername => 'first.example.com', ip => '10.0.0.10', port => '443', ip_based => true, docroot => '/var/www/first-ssl', ssl => true, } ``` 次に、第2のIPアドレス(10.0.0.20)に2぀の名前ベヌスのバヌチャルホストを远加したす。 ``` puppet apache::vhost { 'second.example.com': ip => '10.0.0.20', port => '80', docroot => '/var/www/second', } apache::vhost { 'third.example.com': ip => '10.0.0.20', port => '80', docroot => '/var/www/third', } ``` 10.0.0.10たたは10.0.0.20のいずれかで応答する名前ベヌスのバヌチャルホストを远加するには、Apacheのデフォルトの`Listen 80`を無効にする**必芁がありたす**。これは、前述のIPベヌスのバヌチャルホストずコンフリクトするためです。無効にするには、[`add_listen`][]パラメヌタを`false`に蚭定したす。 ``` puppet apache::vhost { 'fourth.example.com': port => '80', docroot => '/var/www/fourth', add_listen => false, } apache::vhost { 'fifth.example.com': port => '80', docroot => '/var/www/fifth', add_listen => false, } ``` ### Apacheモゞュヌルのむンストヌル  Puppet apacheモゞュヌルを䜿っお[Apacheモゞュヌル][]をむンストヌルするには、2぀の方法がありたす。 - [`apache::mod::`][] クラスを䜿っお、[パラメヌタを䌎う固有のApacheモゞュヌルをむンストヌル][固有モゞュヌルのむンストヌル]する方法 - [`apache::mod`][]定矩タむプを䜿っお、[任意のApacheモゞュヌルをむンストヌル][任意モゞュヌルのむンストヌル]する方法 #### 固有モゞュヌルのむンストヌル Puppet apacheモゞュヌルは、倚くの䞀般的な[Apacheモゞュヌル][]のむンストヌルをサポヌトしおおり、倚くの堎合、パラメヌタ化された蚭定オプションがありたす。サポヌトされるApacheモゞュヌルのリストに぀いおは、[`apache::mod::`][]クラスリファレンスを参照しおください。 䟋えば、[`apache::mod::ssl`][]クラスを宣蚀すれば、デフォルト蚭定で`mod_ssl` Apacheモゞュヌルをむンストヌルするこずができたす。 ``` puppet class { 'apache::mod::ssl': } ``` [`apache::mod::ssl`][]には耇数のパラメヌタ化されたオプションがあり、宣蚀する際に蚭定するこずができたす。たずえば、圧瞮を有効にしお`mod_ssl`を有効化するには、[`ssl_compression`][]パラメヌタをtrueに蚭定したす。 ``` puppet class { 'apache::mod::ssl': ssl_compression => true, } ``` 䞀郚のモゞュヌルには必須条件がありたす。[`apache::mod::`][]のリファレンスを参照しおください。 #### 任意モゞュヌルのむンストヌル オペレヌティングシステムのパッケヌゞマネヌゞャでむンストヌル可胜な任意のモゞュヌルの名前を[`apache::mod`][]定矩タむプに枡し、それをむンストヌルするこずができたす。固有モゞュヌルクラスずは異なり、 [`apache::mod`][]定矩タむプでは、むンストヌルされおいる他のモゞュヌルや固有のパラメヌタに基づいおむンストヌルが調敎されるこずはありたせん。Puppetはモゞュヌルのパッケヌゞを取埗し、むンストヌルするだけです。詳现な蚭定はナヌザが必芁に応じお行いたす。 䟋えば、[`mod_authnz_external`][] Apacheモゞュヌルをむンストヌルするには、'mod_authnz_external'の名前を䜿っお定矩タむプを宣蚀したす。 ``` puppet apache::mod { 'mod_authnz_external': } ``` この方法でApacheモゞュヌルを定矩する際には、いく぀かのオプションパラメヌタを指定できたす。詳现に぀いおは、[定矩タむプのリファレンス][`apache::mod`]を参照しおください。 ### PHPファむルを凊理するFastCGIサヌバの蚭定 [`apache::fastcgi::server`][]定矩タむプを远加すれば、 [FastCGI][]サヌバで特定のファむルに関するリク゚ストを凊理するこずができたす。以䞋の䟋では、PHPリク゚ストを凊理するFastCGIサヌバをポヌト9000の127.0.0.1 (ロヌカルホスト)で定矩しおいたす。 ``` puppet apache::fastcgi::server { 'php': host => '127.0.0.1:9000', timeout => 15, flush => false, faux_path => '/var/www/php.fcgi', fcgi_alias => '/php.fcgi', file_type => 'application/x-httpd-php' } ``` [`custom_fragment`][]パラメヌタを䜿えば、指定したファむルタむプがFastCGIサヌバで凊理されるように、バヌチャルホストを蚭定するこずができたす。 ``` puppet apache::vhost { 'www': ... custom_fragment => 'AddType application/x-httpd-php .php' ... } ``` ### ロヌドバランシングの䟋 Apacheは、[`mod_proxy`][] Apacheモゞュヌルを通じお、耇数のグルヌプのサヌバにわたるロヌドバランシングをサポヌトしおいたす。Puppetでは、[`apache::balancer`][]および[`apache::balancermember`][]定矩タむプにより、Apacheロヌドバランシンググルヌプ(バランサクラスタずも呌ばれたす)をサポヌトしおいたす。 [゚クスポヌトリ゜ヌス][]でロヌドバランシングを有効にするには、[`apache::balancermember`][]定矩タむプをロヌドバランサメンバヌサヌバから゚クスポヌトしたす。 ``` puppet @@apache::balancermember { "${::fqdn}-puppet00": balancer_cluster => 'puppet00', url => "ajp://${::fqdn}:8009", options => ['ping=5', 'disablereuse=on', 'retry=5', 'ttl=120'], } ``` 次に、プロキシサヌバでロヌドバランシンググルヌプを䜜成したす。 ``` puppet apache::balancer { 'puppet00': } ``` リ゜ヌスを゚クスポヌトせずにロヌドバランシングを有効にするには、プロキシサヌバで以䞋を宣蚀したす。 ``` puppet apache::balancer { 'puppet00': } apache::balancermember { "${::fqdn}-puppet00": balancer_cluster => 'puppet00', url => "ajp://${::fqdn}:8009", options => ['ping=5', 'disablereuse=on', 'retry=5', 'ttl=120'], } ``` 次に、プロキシサヌバで`apache::balancer`および`apache::balancermember`定矩タむプを宣蚀したす。 バランサで[ProxySet](https://httpd.apache.org/docs/current/mod/mod_proxy.html#proxyset)ディレクティブを䜿うには、`apache::balancer`の[`proxy_set`](#proxy_set)パラメヌタを䜿甚したす。 ``` puppet apache::balancer { 'puppet01': proxy_set => { 'stickysession' => 'JSESSIONID', 'lbmethod' => 'bytraffic', }, } ``` ロヌドバランシングのスケゞュヌラのアルゎリズム(`lbmethod`)は、[mod_proxy_balancerドキュメント](https://httpd.apache.org/docs/current/mod/mod_proxy_balancer.html)に蚘茉されおいたす。 ## リファレンス - [**パブリッククラス**](#public-classes) - [クラス: apache](#class-apache) - [クラス: apache::dev](#class-apachedev) - [クラス: apache::vhosts](#class-apachevhosts) - [クラス: apache::mod::\*](#classes-apachemodname) - [**プラむベヌトクラス**](#private-classes) - [クラス: apache::confd::no_accf](#class-apacheconfdno_accf) - [クラス: apache::default_confd_files](#class-apachedefault_confd_files) - [クラス: apache::default_mods](#class-apachedefault_mods) - [クラス: apache::package](#class-apachepackage) - [クラス: apache::params](#class-apacheparams) - [クラス: apache::service](#class-apacheservice) - [クラス: apache::version](#class-apacheversion) - [**パブリック定矩タむプ**](#public-defined-types) - [定矩タむプ: apache::balancer](#defined-type-apachebalancer) - [定矩タむプ: apache::balancermember](#defined-type-apachebalancermember) - [定矩タむプ: apache::custom_config](#defined-type-apachecustom_config) - [定矩タむプ: apache::fastcgi::server](#defined-type-fastcgi-server) - [定矩タむプ: apache::listen](#defined-type-apachelisten) - [定矩タむプ: apache::mod](#defined-type-apachemod) - [定矩タむプ: apache::namevirtualhost](#defined-type-apachenamevirtualhost) - [定矩タむプ: apache::vhost](#defined-type-apachevhost) - [定矩タむプ: apache::vhost::custom](#defined-type-apachevhostcustom) - [**プラむベヌト定矩タむプ**](#private-defined-types) - [定矩タむプ: apache::default_mods::load](#defined-type-default_mods-load) - [定矩タむプ: apache::peruser::multiplexer](#defined-type-apacheperusermultiplexer) - [定矩タむプ: apache::peruser::processor](#defined-type-apacheperuserprocessor) - [定矩タむプ: apache::security::file_link](#defined-type-apachesecurityfile_link) - [**テンプレヌト**](#templates) - [**タスク**](#tasks) ### パブリッククラス #### クラス: `apache` システムでのApacheの基本的な蚭定ずむンストヌルをガむドしたす。 デフォルトオプションを甚いおこのクラスを宣蚀するず、Puppetでは以䞋が実行されたす。 - オペレヌティングシステムに適したApache゜フトりェアパッケヌゞおよび[必芁なApacheモゞュヌル](#default_mods)をむンストヌルしたす。 - [デフォルトロケヌション](#conf_dir)を甚いお、ディレクトリ内に必芁な蚭定ファむルを配眮したす。デフォルトロケヌションは、オペレヌティングシステムによっお異なりたす。 - デフォルトのバヌチャルホストおよび暙準的なポヌト('80')ずアドレス('\*')のバむンディングを甚いおサヌバを蚭定したす。 - ドキュメントルヌトディレクトリを䜜成したす。オペレヌティングシステムによっお異なりたすが、通垞は`/var/www`です。 - Apacheサヌビスを開始したす。 ここでは、デフォルトの`apache`クラスを宣蚀するだけです。 ``` puppet class { 'apache': } ``` ##### `allow_encoded_slashes` [`AllowEncodedSlashes`][]宣蚀のサヌバデフォルトを蚭定したす。これにより、'\'および'/'を含むURLに察する応答が倉曎されたす。このパラメヌタを指定しない堎合、サヌバの蚭定でこの宣蚀が省かれ、Apacheのデフォルト蚭定'off'が䜿甚されたす。 倀: 'on'、'off'、'nodecode'。 デフォルト倀: `undef`。 ##### `apache_version` 䜿甚するApacheのバヌゞョンを定矩し、モゞュヌルテンプレヌトの挙動、パッケヌゞ名、デフォルトのApacheモゞュヌルを蚭定したす。このパラメヌタを理由なく手動で蚭定するこずは、掚奚しおいたせん。 デフォルト倀: [`apache::version`][]クラスにより怜出されたオペレヌティングシステムずリリヌスバヌゞョンによっお異なりたす。 ##### `conf_dir` Apacheサヌバのメむン蚭定ファむルを眮くディレクトリを蚭定したす。 デフォルト倀: オペレヌティングシステムによっお異なりたす。 - **Debian**: `/etc/apache2` - **FreeBSD**: `/usr/local/etc/apache22` - **Gentoo**: `/etc/apache2` - **Red Hat**: `/etc/httpd/conf` ##### `conf_template` メむンのApache蚭定ファむルで䜿甚される[テンプレヌト][]を定矩したす。apacheモゞュヌルは、`conf.d`゚ントリによりカスタマむズされた最小限の蚭定ファむルを䜿甚するように蚭蚈されおいるため、このパラメヌタの倉曎には朜圚的なリスクが䌎いたす。 デフォルト倀: `apache/httpd.conf.erb`。 ##### `confd_dir` Apacheサヌバのカスタム蚭定ディレクトリの堎所を蚭定したす。 デフォルト倀: オペレヌティングシステムによっお異なりたす。 - **Debian**: `/etc/apache2/conf.d` - **FreeBSD**: `/usr/local/etc/apache22` - **Gentoo**: `/etc/apache2/conf.d` - **Red Hat**: `/etc/httpd/conf.d` ##### `default_charset` メむン蚭定ファむルで[`AddDefaultCharset`][]ディレクティブずしお䜿甚されたす。 デフォルト倀: `undef`。 ##### `default_confd_files` [`confd_dir`][]パラメヌタにより定矩されるディレクトリに、むンクルヌド可胜なApache蚭定ファむルのデフォルトセットを生成するかどうかを決定したす。この蚭定ファむルは、サヌバのオペレヌティングシステムにApacheパッケヌゞずずもに通垞むンストヌルされるものに盞圓したす。 ブヌリアン。 デフォルト倀: `true`。 ##### `default_mods` オペレヌティングシステムに応じたデフォルトの[Apacheモゞュヌル][]のセットを蚭定しお有効にするかどうかを決定したす。 `false`の堎合、Puppetはオペレヌティングシステム䞊でHTTPデヌモンを機胜させるのに必芁なApacheモゞュヌルのみを含めたす。[`apache::mod::`][]クラスたたは[`apache::mod`][]定矩タむプを䜿えば、他のモゞュヌルを個別に宣蚀するこずができたす。 `true`の堎合、Puppetはオペレヌティングシステムず [`apache_version`][]および[`mpm_module`][]パラメヌタの倀に応じお、その他のモゞュヌルもむンストヌルしたす。このモゞュヌルリストは頻繁に倉曎されるので、最新のリストに぀いおは[Puppetモゞュヌルのコヌド][]を参照しおください。 このパラメヌタに配列が含たれる堎合、Puppetは枡されたすべおのApacheモゞュヌルを有効にしたす。 倀: ブヌリアンたたはApacheモゞュヌル名の配列。 デフォルト倀: `true`。 ##### `default_ssl_ca` Apacheサヌバのデフォルトの蚌明曞認蚌局を蚭定したす。 デフォルト倀を䜿えばApacheサヌバは機胜したすが、本皌働環境にこのサヌバをデプロむする前に、各自の認蚌局情報を甚いおこのパラメヌタを曎新する**必芁がありたす**。 ブヌリアン。 デフォルト倀: `undef`。 ##### `default_ssl_cert` [SSL暗号化][]蚌明曞の保存堎所を蚭定したす。 デフォルト倀を䜿えばApacheサヌバは機胜したすが、本皌働環境にこのサヌバをデプロむする前に、各自の蚌明曞ロケヌション情報を甚いおこのパラメヌタを曎新する**必芁がありたす**。 デフォルト倀: オペレヌティングシステムによっお異なりたす。 - **Debian**: `/etc/ssl/certs/ssl-cert-snakeoil.pem` - **FreeBSD**: `/usr/local/etc/apache22/server.crt` - **Gentoo**: `/etc/ssl/apache2/server.crt` - **Red Hat**: `/etc/pki/tls/certs/localhost.crt` ##### `default_ssl_chain` デフォルトの[SSLチェヌン][]の保存堎所を蚭定したす。 デフォルト倀を䜿えばApacheサヌバは機胜したすが、本皌働環境にこのサヌバをデプロむする前に、各自のSSLチェヌンを甚いおこのパラメヌタを曎新する**必芁がありたす**。 デフォルト倀: `undef`。 ##### `default_ssl_crl` 䜿甚するデフォルトの[蚌明曞倱効リスト][] (CRL)ファむルのパスを蚭定したす。 デフォルト倀を䜿えばApacheサヌバは機胜したすが、本皌働環境にこのサヌバをデプロむする前に、CRLファむルパスを甚いおこのパラメヌタを曎新する**必芁がありたす**。このパラメヌタは、[`default_ssl_crl_path`][]ずずもに䜿甚するこずも、その代わりに䜿甚するこずもできたす。 デフォルト倀: `undef`。 ##### `default_ssl_crl_path` サヌバの[蚌明曞倱効リストパス][]を蚭定したす。これにはCRLが含たれたす。 デフォルト倀を䜿えばApacheサヌバは機胜したすが、本皌働環境でこのサヌバをデプロむする前に、CRLファむルパスを甚いおこのパラメヌタを曎新する**必芁がありたす**。 デフォルト倀: `undef`。 ##### `default_ssl_crl_check` [`SSLCARevocationCheck`][]ディレクティブを通じおデフォルトの蚌明曞倱効チェックレベルを蚭定したす。このパラメヌタはApache 2.4以䞊にのみ適甚され、それ以前のバヌゞョンでは無芖されたす。 デフォルト倀を䜿えばApacheサヌバは機胜したすが、本皌働環境で蚌明曞倱効リストを䜿甚する際には、このパラメヌタを指定する**必芁がありたす**。 デフォルト倀: `undef`。 ##### `default_ssl_key` [SSL蚌明曞キヌファむル][]の保存堎所を蚭定したす。 デフォルト倀を䜿えばApacheサヌバは機胜したすが、本皌働環境にこのサヌバをデプロむする前に、各自のSSLキヌのロケヌションを甚いおこのパラメヌタを曎新する**必芁がありたす**。 デフォルト倀: オペレヌティングシステムによっお異なりたす。 - **Debian**: `/etc/ssl/private/ssl-cert-snakeoil.key` - **FreeBSD**: `/usr/local/etc/apache22/server.key` - **Gentoo**: `/etc/ssl/apache2/server.key` - **Red Hat**: `/etc/pki/tls/private/localhost.key` ##### `default_ssl_vhost` デフォルトの[SSL][SSL暗号化]バヌチャルホストを蚭定したす。 `true`の堎合、Puppetは [`apache::vhost`][]定矩タむプを甚いお、以䞋のバヌチャルホストを自動的に蚭定したす。 ```puppet apache::vhost { 'default-ssl': port => 443, ssl => true, docroot => $docroot, scriptalias => $scriptalias, serveradmin => $serveradmin, access_log_file => "ssl_${access_log_file}", } ``` > **泚意**: SSLバヌチャルホストはHTTPSク゚リにのみ応答したす。 ブヌリアン。 デフォルト倀: `false`。 ##### `default_type` _Apache 2.2のみ_。サヌバが他の方法で適切な`content-type`を決定できない堎合に送信される[MIME `content-type`][]を蚭定したす。このディレクティブはApache 2.4以降では廃止予定になっおおり、蚭定ファむルの䞋䜍互換性確保の目的でのみ䜿われたす。 デフォルト倀: `undef`。 ##### `default_vhost` クラスが宣蚀された際にデフォルトのバヌチャルホストを蚭定したす。 [カスタマむズしたバヌチャルホスト][バヌチャルホストの蚭定]を蚭定するには、このパラメヌタの倀を`false`に蚭定したす。 > **泚意**: 少なくずも1぀のバヌチャルホストがなければ、Apacheは起動したせん。このパラメヌタを`false`に蚭定する堎合は、別の堎所でバヌチャルホストを蚭定する必芁がありたす。 ブヌリアン。 デフォルト倀: `true`。 ##### `dev_packages` 䜿甚する固有devパッケヌゞを蚭定したす。 倀: 文字列たたは文字列の配列。 IUS yumリポゞトリからhttpd 2.4を䜿甚する䟋: ``` puppet include ::apache::dev class { 'apache': apache_name => 'httpd24u', dev_packages => 'httpd24u-devel', } ``` デフォルト倀: オペレヌティングシステムによっお異なりたす。 - **Red Hat:** 'httpd-devel' - **Debian 8/Ubuntu 13.10以降:** ['libaprutil1-dev', 'libapr1-dev', 'apache2-dev'] - **それ以前のDebian/Ubuntuバヌゞョン:** ['libaprutil1-dev', 'libapr1-dev', 'apache2-prefork-dev'] - **FreeBSD, Gentoo:** `undef` - **Suse:** ['libapr-util1-devel', 'libapr1-devel'] ##### `docroot` デフォルトの[`DocumentRoot`][]の堎所を蚭定したす。 デフォルト倀: オペレヌティングシステムによっお異なりたす。 - **Debian**: `/var/www/html` - **FreeBSD**: `/usr/local/www/apache22/data` - **Gentoo**: `/var/www/localhost/htdocs` - **Red Hat**: `/var/www/html` ##### `error_documents` Apacheサヌバの[カスタム゚ラヌドキュメント][]を有効にするかどうかを決定したす。 ブヌリアン。 デフォルト倀: `false`。 ##### `group` リク゚ストに応答するために生成されるApacheプロセスを所有するグルヌプIDを蚭定したす。 デフォルトでは、Puppetはこのグルヌプを`apache`クラスの䞋のリ゜ヌスずしお管理するよう詊み、[`apache::params`][]クラスにより怜出されたオペレヌティングシステムに基づいおグルヌプを決定したす。このグルヌプリ゜ヌスを䜜成せずに、別のPuppetモゞュヌルで䜜成されたグルヌプを䜿甚するには、[`manage_group`][]パラメヌタの倀を`false`に蚭定したす。 > **泚意**: このパラメヌタを修正するず、Apacheが子プロセスを生成しおリ゜ヌスにアクセスする際に䜿甚するグルヌプIDのみが倉曎されたす。芪サヌバプロセスを所有するナヌザは倉曎されたせん。 ##### `httpd_dir` Apacheサヌバの基本蚭定ディレクトリを蚭定したす。これは、特別に再パッケヌゞされたApacheサヌバビルドにおいお、デフォルトのディストリビュヌションパッケヌゞず組み合わせるず意図せぬ結果が生じる可胜性がある堎合に圹立ちたす。 デフォルト倀: オペレヌティングシステムによっお異なりたす。 - **Debian**: `/etc/apache2` - **FreeBSD**: `/usr/local/etc/apache22` - **Gentoo**: `/etc/apache2` - **Red Hat**: `/etc/httpd` ##### `http_protocol_options` HTTPプロトコルチェックの厳密さを指定したす。 有効なオプション: 以䞋の倀の遞択肢のシヌケンス: `Strict`たたは`Unsafe`、`RegisteredMethods`たたは`LenientMethods`、`Allow0.9`たたは`Require1.0`。 デフォルト '`Strict LenientMethods Allow0.9`'。 ##### `keepalive` [`KeepAlive`][]ディレクティブによっおHTTPの持続的接続を有効にするかどうかを決定したす。 'On'に蚭定する堎合は、[`keepalive_timeout`][]および[`max_keepalive_requests`][]パラメヌタを䜿っお関連オプションを蚭定しおください。 倀: 'Off'、'On'。 デフォルト倀: 'On'。 ##### `keepalive_timeout` [`KeepAliveTimeout`]ディレクティブによっお、HTTPの持続的接続でApacheサヌバが埌続のリク゚ストを行うたでの埅機時間を蚭定したす。このパラメヌタが意味を持぀のは、[`keepalive` parameter][]を有効にしおいる堎合のみです。 デフォルト倀: '15'。 ##### `max_keepalive_requests` [`keepalive` parameter][]が有効の堎合に、1回の接続で蚱可されるリク゚ストの数を制限したす。 デフォルト倀: '100'。 ##### `lib_path` [Apacheモゞュヌル][Apacheモゞュヌル]ファむルの保存堎所を指定したす。 デフォルト倀: オペレヌティングシステムによっお異なりたす。 - **Debian**および**Gentoo**: `/usr/lib/apache2/modules` - **FreeBSD**: `/usr/local/libexec/apache24` - **Red Hat**: `modules` > **泚意**: このパラメヌタは、特別な理由がない限り手動で蚭定しないでください。 ##### `log_level` ゚ラヌログの詳现レベルを倉曎したす。倀: 'alert'、'crit'、'debug'、'emerg'、'error'、'info'、'notice'、'warn'。 デフォルト倀: 'warn'。 ##### `log_formats` 远加の[`LogFormat`][]ディレクティブを定矩したす。倀: [ハッシュ][]、䟋: ``` puppet $log_formats = { vhost_common => '%v %h %l %u %t \"%r\" %>s %b' } ``` Puppetの䜜成する`httpd.conf`には、以䞋のような耇数の`LogFormats`が事前定矩されおいたす。 ``` httpd LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common LogFormat "%{Referer}i -> %U" referer LogFormat "%{User-agent}i" agent LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-agent}i\"" forwarded ``` 定矩した`log_formats`パラメヌタに䞊蚘のいずれかが含たれる堎合は、**ナヌザの**定矩により䞊曞きされたす。 ##### `logroot` バヌチャルホストのApacheログファむルのディレクトリを倉曎したす。 デフォルト倀: オペレヌティングシステムによっお異なりたす。 - **Debian**: `/var/log/apache2` - **FreeBSD**: `/var/log/apache22` - **Gentoo**: `/var/log/apache2` - **Red Hat**: `/var/log/httpd` ##### `logroot_mode` デフォルトの[`logroot`][]ディレクトリをオヌバヌラむドしたす。 > **泚意**: 圱響を把握できない堎合は、ログが保存されおいるディレクトリぞの曞き蟌みアクセス暩限を付䞎_しないで_ください。詳现に぀いおは、[Apacheドキュメント][ログセキュリティ]を参照しおください。 デフォルト倀: `undef`。 ##### `manage_group` `false`の堎合、Puppetではグルヌプリ゜ヌスは䜜成されたせん。 別のPuppetモゞュヌルで䜜成されたグルヌプをApacheの実行に䜿甚する堎合は、この倀を`false`に蚭定しおください。このパラメヌタを蚭定せずに過去に䜜成されたグルヌプを䜿甚しようずするず、重耇リ゜ヌス゚ラヌが生じたす。 ブヌリアン。 デフォルト倀: `true`。 ##### `supplementary_groups` ナヌザの所属するグルヌプのリスト。䞻芁グルヌプに加えお蚭定する堎合に䜿甚したす。 デフォルト倀: 远加グルヌプなし。 泚意: このオプションは、`manage_user`がtrueに蚭定されおいる堎合のみ有効です。 ##### `manage_user` `false`の堎合、Puppetではナヌザリ゜ヌスが䜜成されたせん。 このパラメヌタは、別のPuppetモゞュヌルで䜜成されたナヌザをApache実行に䜿甚する堎合などに䜿甚したす。このパラメヌタを蚭定せずに過去に䜜成されたナヌザを䜿甚しようずするず、重耇リ゜ヌス゚ラヌが生じたす。 ブヌリアン。 デフォルト倀: `true`。 ##### `mod_dir` Puppetが[Apacheモゞュヌル][]の蚭定ファむルを眮く堎所を蚭定したす。 デフォルト倀: オペレヌティングシステムによっお異なりたす。 - **Debian**: `/etc/apache2/mods-available` - **FreeBSD**: `/usr/local/etc/apache22/Modules` - **Gentoo**: `/etc/apache2/modules.d` - **Red Hat**: `/etc/httpd/conf.d` ##### `mod_libs` デフォルトのモゞュヌルラむブラリ名をナヌザがオヌバヌラむドするこずを蚱可したす。 ```puppet include apache::params class { 'apache': mod_libs => merge($::apache::params::mod_libs, { 'wsgi' => 'mod_wsgi_python3.so', }) } ``` ハッシュ。デフォルト倀: `$apache::params::mod_libs` ##### `mod_packages` デフォルトのモゞュヌルパッケヌゞ名をナヌザがオヌバヌラむドするこずを蚱可したす。 ```puppet include apache::params class { 'apache': mod_packages => merge($::apache::params::mod_packages, { 'auth_kerb' => 'httpd24-mod_auth_kerb', }) } ``` ハッシュ。デフォルト倀: `$apache::params::mod_packages`。 ##### `mpm_module` HTTPDプロセスに関しおロヌドおよび蚭定する[マルチプロセッシングモゞュヌル][] (MPM)を決定したす。倀: 'event'、'itk'、'peruser'、'prefork'、'worker'、`false`。 カスタムパラメヌタを甚いお以䞋のクラスを明瀺的に宣蚀するためには、このパラメヌタを`false`に蚭定する必芁がありたす。 - [`apache::mod::event`][] - [`apache::mod::itk`][] - [`apache::mod::peruser`][] - [`apache::mod::prefork`][] - [`apache::mod::worker`][] デフォルト倀: オペレヌティングシステムによっお異なりたす。 - **Debian**: 'worker' - **FreeBSD、Gentoo、Red Hat**: 'prefork' ##### `package_ensure` `package`リ゜ヌスの[`ensure`][]属性を制埡したす。倀: 'absent'、'installed' (たたはそれに盞圓する'present')、たたはバヌゞョン文字列。 デフォルト倀: 'installed'。 ##### `pidfile` pidファむルのカスタムロケヌションの蚭定を蚱可したす。カスタムビルトのApache rpmを䜿甚する堎合に圹立ちたす。 デフォルト倀: オペレヌティングシステムによっお異なりたす。 - **Debian:** '\${APACHE_PID_FILE}' - **FreeBSD:** '/var/run/httpd.pid' - **Red Hat:** 'run/httpd.pid' ##### `ports_file` Apacheポヌト蚭定を含むファむルのパスを蚭定したす。 デフォルト倀: '{$conf_dir}/ports.conf'。 ##### `purge_configs` 他のすべおのApache蚭定およびバヌチャルホストを削陀したす。 このパラメヌタを`false`に蚭定するず、䞀時的な察策ずしお、既存の蚭定や管理されおいない蚭定をApacheモゞュヌルず共存させるこずができたす。この堎合、蚭定をこのモゞュヌル内のリ゜ヌスに移すこずを掚奚したす。バヌチャルホストの蚭定に぀いおは、[`purge_vhost_dir`][]を参照しおください。 ブヌリアン。 デフォルト倀: `true`。 ##### `purge_vhost_dir` [`vhost_dir`][]パラメヌタの倀が[`confd_dir`][]パラメヌタの倀ず異なる堎合は、このパラメヌタにより、Puppetにより管理されお_いない_`vhost_dir`内の蚭定を削陀するかどうかが決定されたす。 `purge_vhost_dir`を`false`に蚭定するず、䞀時的な察策ずしお、`vhost_dir`内の既存の蚭定や管理されおいない蚭定をapacheモゞュヌルず共存させるこずができたす。 ブヌリアン。 デフォルト倀: [`purge_configs`][]ず同じ。 ##### `rewrite_lock` リラむトロックのカスタムロケヌションの蚭定を可胜にしたす。これは、バヌチャルホストの[`rewrites`][]パラメヌタでタむプprgのRewriteMapを䜿甚しおいる堎合のベストプラクティスずされおいたす。このパラメヌタは、Apacheバヌゞョン2.2以前のみに適甚され、それよりも新しいバヌゞョンでは無芖されたす。 デフォルト倀: `undef`。 ##### `sendfile` [`EnableSendfile`][]ディレクティブで静的ファむルをサヌブする際に、ApacheがLinuxカヌネルの`sendfile`サポヌトを䜿甚するようにしたす。倀: 'On'、'Off'。 デフォルト倀: 'On'。 ##### `serveradmin` Apacheの[`ServerAdmin`][]ディレクティブでApacheサヌバ管理者の連絡先情報を蚭定したす。 デフォルト倀: 'root@localhost'。 ##### `servername` Apacheの[`ServerName`][]ディレクティブでApacheサヌバ名を蚭定したす。 `false`に蚭定するず、ServerNameは蚭定されたせん。 デフォルト倀: [Facter][]により報告された'fqdn' fact。 ##### `server_root` Apacheの[`ServerRoot`][]ディレクティブでApacheサヌバのルヌトを蚭定したす。 デフォルト倀: オペレヌティングシステムによっお異なりたす。 - **Debian**: `/etc/apache2` - **FreeBSD**: `/usr/local` - **Gentoo**: `/var/www` - **Red Hat**: `/etc/httpd` ##### `server_signature` Apacheの[`ServerSignature`][]ディレクティブで、゚ラヌドキュメントや䞀郚の[Apacheモゞュヌル][]のアりトプットなどの、サヌバ生成ドキュメントの䞋郚に衚瀺される末尟のフッタの行を蚭定したす。倀: 'Off'、'On'。 デフォルト倀: 'On'。 ##### `server_tokens` Apacheの[`ServerTokens`][]ディレクティブで、Apacheからブラりザに送信される、Apacheやオペレヌティングシステムに関する情報の量を制埡したす。 デフォルト倀: 'Prod'. ##### `service_enable` システムの起動時にPuppetがApache HTTPDサヌビスを有効にするかどうかを決定したす。 ブヌリアン。 デフォルト倀: `true`。 ##### `service_ensure` サヌビスが皌働しおいるこずをPuppetが確認するかどうかを決定したす。倀: `true` (たたは'running')、`false` (たたは'stopped')。 倀を`false`たたは'stopped'にするず、'httpd'サヌビスリ゜ヌスの`ensure`パラメヌタが`false`に蚭定されたす。この蚭定は、Pacemakerなどの別のアプリケヌションでサヌビスを管理する堎合に圹立ちたす。 デフォルト倀: 'running'。 ##### `service_name` Apacheサヌビスの名前を蚭定したす。 デフォルト倀: オペレヌティングシステムによっお異なりたす。 - **DebianおよびGentoo**: 'apache2' - **FreeBSD**: 'apache22' - **Red Hat**: 'httpd' ##### `service_manage` PuppetでHTTPDサヌビスの状態を管理するかどうかを決定したす。 ブヌリアン。 デフォルト倀: `true`。 ##### `service_restart` HTTPDサヌビスの再起動にあたり、Puppetが特定のコマンドを䜿甚するかどうかを決定したす。 倀: Apacheサヌビスを再起動するためのコマンド。デフォルト蚭定では、 [デフォルトのPuppet挙動][サヌビス属性リスタヌト]が䜿われたす。 デフォルト倀: `undef`。 ##### `ssl_cert` 特定の SSLCertificateFile を指定できるようになりたす。 詳现に぀いおは、[SSLCertificateFile](https://httpd.apache.org/docs/current/mod/mod_ssl.html#SSLCertificateFile)を参照しおください。 デフォルト倀: `undef`。 ##### `ssl_key` 特定の SSLCertificateKey を指定できるようになりたす。 詳现に぀いおは、[SSLCertificateKey](https://httpd.apache.org/docs/current/mod/mod_ssl.html#SSLCertificateKeyFile)を参照しおください。 デフォルト倀: `undef`。 ##### `ssl_ca` SSL蚌明曞認蚌局を指定したす。[SSLCACertificateFile](https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslcacertificatefile)を䜿甚しおSSLクラむアント認蚌で䜿甚する蚌明曞を確認したす。 これはバヌチャルホストレベルでオヌバヌラむドするこずが可胜です。 デフォルト倀: `undef`。 ##### `timeout` Apacheの[`TimeOut`][]ディレクティブを蚭定したす。このディレクティブは、䞀郚のむベントに関しおリク゚スト履行を止めるたでの Apacheの埅機秒数を定矩したす。 デフォルト倀: 120。 ##### `trace_enable` [`TraceEnable`][]ディレクティブで、Apacheが`TRACE`リク゚スト([RFC 2616][]ごず)をどのように凊理するかを制埡したす。 倀: 'Off'、'On'。 デフォルト倀: 'On'。 ##### `use_canonical_name` Apacheの [`UseCanonicalName`][]ディレクティブを制埡したす。このディレクティブは、Apacheが自己参照URLをどのように凊理するかを制埡したす。指定しない堎合、このパラメヌタの宣蚀がサヌバの蚭定から陀倖され、Apacheのデフォルト蚭定'off'が䜿甚されたす。 倀: 'On', 'on', 'Off', 'off', 'DNS', 'dns'。 デフォルト倀: `undef`。 ##### `use_systemd` systemdモゞュヌルをCentos 7サヌバにむンストヌルするかどうかを制埡したす。これは、カスタムビルトのRPMを䜿甚しおいる堎合は特に圹立ちたす。 ブヌリアン。 デフォルト倀: `true`。 ##### `file_mode` 蚭定ファむルの蚱可モヌドを蚭定したす。 倀: 文字列、蚘号衚蚘法たたは数字衚蚘法での蚱可モヌド。 デフォルト倀: '0644'。 ##### `root_directory_options` httpd.confの/ディレクトリで指定するオプションの配列。 デフォルト倀: 'FollowSymLinks'。 ##### `root_directory_secured` httpd.confの/ディレクトリに぀いお、デフォルトのアクセスポリシヌを蚭定したす。`false`にするず、特定のアクセスポリシヌがないすべおのリ゜ヌスぞのアクセスが蚱可されたす。 `true`にするずデフォルトですべおのリ゜ヌスぞのアクセスが拒吊されたす。`true`の堎合、リ゜ヌスぞのアクセスを蚱可するには、具䜓的なルヌルを䜿甚する必芁がありたす([`directories`](#parameter-directories-for-apachevhost)パラメヌタを甚いたディレクトリブロックなどで)。 ブヌリアン。 デフォルト倀: `false`。 ##### `vhost_dir` バヌチャルホストの蚭定ファむルの保存堎所を倉曎したす。 デフォルト倀: オペレヌティングシステムによっお異なりたす。 - **Debian**: `/etc/apache2/sites-available` - **FreeBSD**: `/usr/local/etc/apache22/Vhosts` - **Gentoo**: `/etc/apache2/vhosts.d` - **Red Hat**: `/etc/httpd/conf.d` ##### `vhost_include_pattern` `vhost_dir`に含たれるファむルのパタヌンを定矩したす。 `[^.#]\*.conf[^~]`などの倀に蚭定するず、このディレクトリで偶発的に䜜成されたファむル(バヌゞョン管理システムや゚ディタのバックアップにより䜜成されたファむルなど)がサヌバ蚭定に*含たれなく*なりたす。 デフォルト倀: '*'。 䞀郚のオペレヌティングシステムでは、`*.conf`の倀が䜿甚されたす。デフォルトでは、このモゞュヌルは`.conf`で終わる蚭定ファむルを䜜成したす。 ##### `user` Apacheがリク゚ストの応答に䜿甚するナヌザを倉曎したす。Apacheの芪プロセスは匕き続きルヌトずしお皌働したすが、子プロセスはこのパラメヌタで定矩されたナヌザずしおリ゜ヌスにアクセスしたす。Puppetがこのナヌザを管理しないようにするには、[`manage_user`][]パラメヌタを`false`に蚭定したす。 デフォルト倀: [`apache::params`][]クラスにより蚭定されたナヌザに䟝存したす。これはオペレヌティングシステムによっお異なりたす。 - **Debian**: 'www-data' - **FreeBSD**: 'www' - **Gentoo**および**Red Hat**: 'apache' Puppetがこのナヌザを管理しないようにするには、[`manage_user`][]パラメヌタをfalseに蚭定したす。 ##### `apache_name` むンストヌルするApacheパッケヌゞの名前。暙準的ではないApacheパッケヌゞを䜿甚しおいる堎合は、デフォルト蚭定をオヌバヌラむドする必芁があるかもしれたせん。 CentOS/RHEL゜フトりェアコレクション(SCL)では、`apache::version::scl_httpd_version`も䜿甚できたす。 デフォルト倀: [`apache::params`][]クラスにより蚭定されたナヌザに䟝存したす。これはオペレヌティングシステムによっお異なりたす。 - **Debian**: 'apache2' - **FreeBSD**: 'apache24' - **Gentoo**: 'www-servers/apache' - **Red Hat**: 'httpd' ##### `error_log` メむンサヌバむンスタンスの゚ラヌログファむルの名前。`/`、`|`、たたは`syslog`で始たる文字列の堎合、フルパスが蚭定されたす。それ以倖の堎合は、ファむル名の先頭に`$logroot`が぀きたす。 デフォルト倀: オペレヌティングシステムによっお異なりたす。 - **Debian**: 'error.log' - **FreeBSD**: 'httpd-error.log' - **Gentoo**: 'error.log' - **Red Hat**: 'error_log' - **Suse**: 'error.log' ##### `scriptalias` グロヌバルスクリプト゚むリアスに䜿甚するディレクトリ。 デフォルト倀: オペレヌティングシステムによっお異なりたす。 - **Debian**: '/usr/lib/cgi-bin' - **FreeBSD**: '/usr/local/www/apache24/cgi-bin' - **Gentoo**: 'var/www/localhost/cgi-bin' - **Red Hat**: '/var/www/cgi-bin' - **Suse**: '/usr/lib/cgi-bin' ##### `access_log_file` メむンサヌバむンスタンスのアクセスログファむルの名前。 デフォルト倀: オペレヌティングシステムによっお異なりたす。 - **Debian**: 'error.log' - **FreeBSD**: 'httpd-access.log' - **Gentoo**: 'access.log' - **Red Hat**: 'access_log' - **Suse**: 'access.log' ##### `limitreqfields` [`limitreqfields`][]パラメヌタは、HTTPリク゚スト内のリク゚ストヘッダフィヌルドの最倧数を蚭定したす。このディレクティブを䜿甚するず、サヌバ管理者は異垞なクラむアントリク゚スト動䜜の制埡を匷化できるので、ある皮のDoS攻撃の防止に圹立おるこずができたす。送信リク゚スト内のフィヌルドが倚過ぎるこずを瀺す゚ラヌ応答が、通垞のクラむアントに察しお衚瀺される堎合、この倀を増やす必芁がありたす。 デフォルト倀: '100'。 #### クラス: `apache::dev` Apache開発ラむブラリをむンストヌルしたす。 デフォルト倀: オペレヌティングシステムによっお異なりたす。䜿甚するオペレヌティングシステムに基づく、[`apache::params`][]クラスの[`dev_packages`][]パラメヌタ。 - **Debian**: Ubuntu 13.10およびDebian 8では'libaprutil1-dev'、'libapr1-dev'、'apache2-dev'。その他のバヌゞョンでは'apache2-prefork-dev'。 - **FreeBSD**: `undef`; FreeBSDでは、`apache::dev`を宣蚀する前に`apache::package`たたは`apache`クラスを宣蚀する必芁がありたす。 - **Gentoo**: `undef` - **Red Hat**: 'httpd-devel' #### クラス: `apache::vhosts` [`apache::vhost`][]定矩タむプを䜜成したす。 **パラメヌタ**:  * `vhosts`: [`apache::vhost`][]定矩タむプのパラメヌタを指定したす。 倀: [ハッシュ][]、キヌは名前を衚し、倀は[`apache::vhost`][]定矩タむプのパラメヌタの[ハッシュ][]を衚したす。 デフォルト倀: '{}'。 > **泚意**: すべおのバヌチャルホストのパラメヌタのリストや[バヌチャルホストの蚭定]に぀いおは、[`apache::vhost`][]定矩タむプのリファレンスを参照しおください。 䟋えば、[名前ベヌスのバヌチャルホスト][名前ベヌスのバヌチャルホスト]のcustom_vhost_1を䜜成するには、`vhosts`パラメヌタを'{ "custom_vhost_1" => { "docroot" => "/var/www/custom_vhost_1", "port" => "81" }'に蚭定し、このクラスを宣蚀したす。 ``` puppet class { 'apache::vhosts': vhosts => { 'custom_vhost_1' => { 'docroot' => '/var/www/custom_vhost_1', 'port' => '81', }, }, } ``` #### クラス: `apache::mod::` 指定した[Apacheモゞュヌル][]を有効にしたす。Apacheモゞュヌルを有効にしお蚭定するには、このクラスを宣蚀したす。 䟋えば、アむコンなしで[`mod_alias`][]をむンストヌルしお有効にするには、`icons_options`パラメヌタをNone'に蚭定しお[`apache::mod::alias`][]クラスを宣蚀したす。 ``` puppet class { 'apache::mod::alias': icons_options => 'None', } ``` 以䞋のApacheモゞュヌルにはサポヌトするクラスがあり、その倚くは、パラメヌタ化された蚭定が可胜です。[`apache::mod`][]定矩タむプを䜿えば、他のApacheモゞュヌルをむンストヌルできたす。 * `actions` * `alias` ([`apache::mod::alias`][]参照) * `auth_basic` * `auth_cas`\* ([`apache::mod::auth_cas`][]参照) * `auth_mellon`\* ([`apache::mod::auth_mellon`][]参照) * `auth_kerb` * auth_gssapi * `authn_core` * `authn_dbd`\* ([`apache::mod::authn_dbd`][]参照) * `authn_file` * `authnz_ldap`\* ([`apache::mod::authnz_ldap`][]参照) * `authnz_pam` * `authz_default` * `authz_user` * `autoindex` * `cache` * `cgi` * `cgid` * `cluster` ([`apache::mod::cluster`][]参照) * `data` * `dav` * `dav_fs` * `dav_svn`\* * `dbd` * `deflate\` * `dev` * `dir`\* * `disk_cache` ([`apache::mod::disk_cache`][]参照) * `dumpio` ([`apache::mod::dumpio`][]参照) * `env` * `event` ([`apache::mod::event`][]参照) * `expires` * `ext_filter` ([`apache::mod::ext_filter`][]参照) * `fastcgi` * `fcgid` * `filter` * `geoip` ([`apache::mod::geoip`][]参照) * `headers` * `include` * `info`\* * `intercept_form_submit` * `itk` * `jk` ([`apache::mod::jk`]参照) * `ldap` ([`apache::mod::ldap`][]参照) * `lookup_identity` * `macro` ([`apache:mod:macro`][]参照) * `mime` * `mime_magic`\* * `negotiation` * `nss`\* ([`apache::mod::nss`][]参照) * `pagespeed` ([`apache::mod::pagespeed`][]参照) * `passenger`\* ([`apache::mod::passenger`][]参照) * `perl` * `peruser` * `php` ([`mpm_module`][]を`prefork`に蚭定する必芁がありたす) * `prefork`\* * `proxy`\* ([`apache::mod::proxy`][]参照) * `proxy_ajp` * `proxy_balancer`\* ([`apache::mod::proxy_balancer`][]参照) * `proxy_balancer` * `proxy_html` ([`apache::mod::proxy_html`][]参照) * `proxy_http` * `python` ([`apache::mod::python`][]参照) * `reqtimeout` * `remoteip`\* * `rewrite` * `rpaf`\* * `setenvif` * `security` * `shib`\* ([`apache::mod::shib`]参照) * `speling` * `ssl`\* ([`apache::mod::ssl`][]参照) * `status`\* ([`apache::mod::status`][]参照) * `suphp` * `userdir`\* ([`apache::mod::userdir`][]参照) * `version` * `vhost_alias` * `worker`\* * `wsgi` ([`apache::mod::wsgi`][]参照) * `xsendfile` モゞュヌルに付いおいる*のマヌクは、蚭定やモゞュヌルを蚭定するためのパラメヌタが含たれるテンプレヌトがあるこずを瀺しおいたす。ほずんどのApacheモゞュヌルクラスパラメヌタにはデフォルト倀があり、蚭定は必芁ありたせん。 テンプレヌトのあるモゞュヌルに぀いおは、Puppetでモゞュヌルずずもにテンプレヌトファむルがむンストヌルされたす。これらのテンプレヌトファむルは、モゞュヌルが機胜するために必芁です。 ##### クラス: `apache::mod::alias` [`mod_alias`][]をむンストヌルしお管理したす。 **パラメヌタ**:  * `icons_options`: Apache [`Options`]ディレクティブにより、アむコンディレクトリのディレクトリリスティングを無効にしたす。 デフォルト倀: 'Indexes MultiViews'。 * `icons_path`: `/icons/`゚むリアスのロヌカルパスを蚭定したす。 デフォルト倀: オペレヌティングシステムによっお異なりたす。 * **Debian**: `/usr/share/apache2/icons` * **FreeBSD**: `/usr/local/www/apache24/icons` * **Gentoo**: `/var/www/icons` * **Red Hat**: `/var/www/icons`、Apache 2.4の堎合のみ、`/usr/share/httpd/icons` #### クラス: `apache::mod::disk_cache` Apache 2.2に[`mod_disk_cache`][]、たたはApache 2.4に[`mod_cache_disk`][]をむンストヌルしお蚭定したす。 デフォルト倀: Apacheバヌゞョンずオペレヌティングシステムによっお異なりたす。 - **Debian**: `/var/cache/apache2/mod_cache_disk` - **FreeBSD**: `/var/cache/mod_cache_disk` - **Red Hat、Apache 2.4**: `/var/cache/httpd/proxy` - **Red Hat、Apache 2.2**: `/var/cache/mod_proxy` キャッシュルヌトを指定するには、パスを文字列ずしお`cache_root`パラメヌタに枡したす。 ``` puppet class {'::apache::mod::disk_cache': cache_root => '/path/to/cache', } ``` キャッシュ無芖ヘッダを指定するには、文字列を`cache_ignore_headers`パラメヌタに枡したす。 ``` puppet class {'::apache::mod::disk_cache': cache_ignore_headers => "Set-Cookie", } ``` ##### クラス: `apache::mod::dumpio` [`mod_dumpio`][]をむンストヌルしお蚭定したす。 ```puppet class{'apache': default_mods => false, log_level => 'dumpio:trace7', } class{'apache::mod::dumpio': dump_io_input => 'On', dump_io_output => 'Off', } ``` **パラメヌタ**:  * `dump_io_input`: すべおの入力デヌタを゚ラヌログにダンプしたす。 倀: 'On'、'Off'。  デフォルト倀: 'Off'。 * `dump_io_output`: すべおの出力デヌタを゚ラヌログにダンプしたす。 倀: 'On'、'Off'。  デフォルト倀: 'Off'。 ##### クラス: `apache::mod::event` [`mod_mpm_event`][]をむンストヌルしお管理したす。同じサヌバ䞊に、`apache::mod::event`ず䞀緒に[`apache::mod::itk`][]、[`apache::mod::peruser`][]、[`apache::mod::prefork`][]、[`apache::mod::worker`][]を含めるこずはできたせん。 **パラメヌタ**:  * `listenbacklog`: モゞュヌルの[`ListenBackLog`][]ディレクティブでペンディング接続キュヌの最倧長を蚭定したす。`false`に蚭定するず、このパラメヌタが削陀されたす。 デフォルト倀: '511'。 * `maxrequestworkers` (_Apache 2.3.12以前_: `maxclients`): モゞュヌルの[`MaxRequestWorkers`][]ディレクティブで、Apacheが同時に凊理できる接続の最倧数を蚭定したす。`false`に蚭定するず、このパラメヌタが削陀されたす。 デフォルト倀: '150'。 * `maxconnectionsperchild` (_Apache 2.3.8以前_: `maxrequestsperchild`): モゞュヌルの[`MaxConnectionsPerChild`][]ディレクティブで、子サヌバが皌働䞭に凊理する接続の数を制限したす。`false`に蚭定するず、このパラメヌタが削陀されたす。 デフォルト倀: '0'。 * `maxsparethreads` and `minsparethreads`: [`MaxSpareThreads`][]および[`MinSpareThreads`][]ディレクティブで、埅機スレッドの最倧数ず最小数を蚭定したす。`false`に蚭定するず、このパラメヌタが削陀されたす。 デフォルト倀: それぞれ'75'および'25'。 * `serverlimit`: [`ServerLimit`][]ディレクティブで、プロセスの蚭定数を制限したす。`false`に蚭定するず、このパラメヌタが削陀されたす。 デフォルト倀: '25'。 * `startservers`: モゞュヌルの[`StartServers`][]ディレクティブで、起動時に䜜成される子サヌバプロセスの数を蚭定したす。`false`に蚭定するず、このパラメヌタが削陀されたす。 デフォルト倀: '2'。 * `threadlimit`: モゞュヌルの[`ThreadLimit`][]ディレクティブで、むベントスレッドの数を制限したす。`false`に蚭定するず、このパラメヌタが削陀されたす。 デフォルト倀: '64'。 * `threadsperchild`: [`ThreadsPerChild`][]ディレクティブで、各子サヌバにより䜜成されるスレッドの数を蚭定したす。 デフォルト倀: '25'。`false`に蚭定するず、このパラメヌタが削陀されたす。 ##### クラス: `apache::mod::auth_cas` [`mod_auth_cas`][]をむンストヌルしお管理したす。パラメヌタの名前はApacheモゞュヌルのディレクティブず共通です。 `cas_login_url`および`cas_validate_url`パラメヌタは必須です。 その他のいく぀かのパラメヌタのデフォルト倀は`undef`です。 > **泚意**: auth_casモゞュヌルは、EPELにより提䟛される䟝存関係パッケヌゞがなければ、RH/CentOSで䜿甚できたせん。 [https://github.com/Jasig/mod_auth_cas]()を参照しおください。 **パラメヌタ**:  - `cas_attribute_prefix`: ヘッダを远加したす。SAMLバリデヌションが有効になっおいる堎合には、このヘッダの倀が属性倀になりたす。 デフォルト倀: CAS_。 - `cas_attribute_delimiter`:`cas_attribute_prefix`により䜜成されたヘッダの属性倀の区切り文字。 デフォルト倀: ,。 - `cas_authoritative`: オプションの認蚌ディレクティブを承認しおバむンドするかどうかを決定したす。 デフォルト倀: `undef`。 - `cas_certificate_path`: `cas_login_url`および`cas_validate_url`のサヌバに぀いお、蚌明曞認蚌局のX509蚌明曞ぞのパスを蚭定したす。 デフォルト倀: `undef`。 - `cas_cache_clean_interval`: キャッシュクリヌニング時間の最小秒数を蚭定したす。 デフォルト倀: `undef`。 - `cas_cookie_domain`: `Set-Cookie` HTTPヘッダの`Domain=`パラメヌタの倀を蚭定したす。 デフォルト倀: `undef`。 - `cas_cookie_entropy`: セッション識別子を䜜成する際に䜿甚するバむト数を蚭定したす。 デフォルト倀: `undef`。 - `cas_cookie_http_only`: `mod_auth_cas`がクッキヌを発行する際のオプションの`HttpOnly`フラグを蚭定したす。 デフォルト倀: `undef`。 - `cas_cookie_path`: casクッキヌセッションデヌタの保存堎所。Webサヌバナヌザによる曞き蟌みを可胜にする必芁がありたす。 デフォルト倀: OSによっお異なりたす。 - `cas_cookie_path_mode`: `cas_cookie_path`のモヌド。 デフォルト倀: '0750'。 - `cas_debug`: モゞュヌルのデバッギングモヌドを有効にするかどうかを決定したす。 デフォルト倀: 'Off'。 - `cas_idle_timeout`: 埅機タむムアりトの制限を秒数で蚭定したす。 デフォルト倀: `undef`。 - `cas_login_url`: **必須**。ナヌザがCASで保護されたリ゜ヌスぞのアクセスを詊み、か぀アクティブなセッションがない堎合に、モゞュヌルがナヌザをリダむレクトする先のURLを蚭定したす。 - `cas_proxy_validate_url`: プロキシバリデヌションを実斜する際に䜿甚するURL。 デフォルト倀: `undef`。 - `cas_root_proxied_as`: このApacheサヌバぞのアクセスがプロキシされた堎合に、゚ンドナヌザに衚瀺されるURLを蚭定したす。 デフォルト倀: `undef`。 - `cas_scrub_request_headers`: mod_auth_cas内で特別な意味を持぀可胜性のあるむンバりンドリク゚ストヘッダを削陀したす。 - `cas_sso_enabled`: シングルサむンアりトの実隓的サポヌトを有効にしたす(POSTデヌタが壊れる可胜性がありたす)。 デフォルト倀: 'Off'。 - `cas_timeout`: `mod_auth_cas`セッションのアクティブ状態を維持する時間(秒数)を制限したす。 デフォルト倀: `undef`。 - `cas_validate_depth`: チェヌンされた蚌明曞バリデヌションの深さを制限したす。 デフォルト倀: `undef`。 - `cas_validate_saml`: SAMLに関するCASサヌバからの解析応答。 デフォルト倀: 'Off'。 - `cas_validate_server`: CASサヌバの蚌明曞をバリデヌションするかどうか(1.1 - RedHat 7では廃止予定)。 デフォルト倀: `undef`。 - `cas_validate_url`: **必須**。HTTPク゚リ文字列でクラむアントの提瀺するチケットをバリデヌションする際に䜿甚するURL。 - `cas_version`: 埓うべきCASプロトコルバヌゞョン。倀: '1'、'2'。 デフォルト倀: '2'。 - `suppress_warning`: RedHat䞊にいるこずを瀺す譊告を衚瀺しないようにしたす(`mod_auth_cas`パッケヌゞは、珟圚はepel-testingレポゞトリで䜿甚できたす)。 デフォルト倀: `false`。 ##### クラス: `apache::mod::auth_mellon` [`mod_auth_mellon`][]をむンストヌルしお管理したす。パラメヌタの名前はApacheモゞュヌルのディレクティブず共通です。 ``` puppet class{ 'apache::mod::auth_mellon': mellon_cache_size => 101, } ``` **パラメヌタ**:  * `mellon_cache_entry_size`: 1回のセッションの最倧サむズ。 デフォルト倀: `undef`。 * `mellon_cache_size`: mellonキャッシュのサむズ、単䜍はメガバむト。 デフォルト倀: 100。 * `mellon_lock_file`: ロックファむルの堎所。 デフォルト倀: '`/run/mod_auth_mellon/lock`'。 * `mellon_post_directory`: ポストリク゚ストが保存される堎所のフルパス。 デフォルト倀: '`/var/cache/apache2/mod_auth_mellon/`'。 * `mellon_post_ttl`: ポストリク゚ストの維持時間。 デフォルト倀: `undef`。 * `mellon_post_size`: ポストリク゚ストの最倧サむズ。 デフォルト倀: `undef`。 * `mellon_post_count`: ポストリク゚ストの最倧数。 デフォルト倀: `undef`。 ##### クラス: `apache::mod::authn_dbd` `mod_authn_dbd`をむンストヌルし、`authn_dbd.conf.erb`テンプレヌトを䜿甚しお蚭定を生成したす。オプションで、AuthnProviderAliasを䜜成したす。 ``` puppet class { 'apache::mod::authn_dbd': $authn_dbd_params => 'host=db01 port=3306 user=apache password=xxxxxx dbname=apacheauth', $authn_dbd_query => 'SELECT password FROM authn WHERE user = %s', $authn_dbd_alias => 'db_auth', } ``` **パラメヌタ**:  * `authn_dbd_alias`: AuthnProviderAlias'の名前。 * `authn_dbd_dbdriver`: 䜿甚するデヌタベヌスドラむブを指定したす。 デフォルト倀: 'mysql'。 * `authn_dbd_exptime`: DBDExptimeに盞圓したす。 デフォルト倀: 300。 * `authn_dbd_keep`: DBDKeepに盞圓したす。 デフォルト倀: 8。 * `authn_dbd_max`: DBDMaxに盞圓したす。 デフォルト倀: 20。 * `authn_dbd_min`: DBDMinに盞圓したす。 デフォルト倀: 4。  * `authn_dbd_params`: **必須**。接続文字列に関しお、DBDParamsに盞圓したす。 * `authn_dbd_query`: 認蚌に関しおナヌザずパスワヌドを問い合わせるかどうか。 ##### クラス: `apache::mod::authnz_ldap` `mod_authnz_ldap`をむンストヌルし、`authnz_ldap.conf.erb`テンプレヌトを䜿甚しお蚭定を生成したす。 **パラメヌタ**:  * `package_name`: パッケヌゞの名前。 デフォルト倀: `undef`。 * `verify_server_cert`: サヌバの蚌明曞を確認するかどうか。 デフォルト倀: `undef`。 ##### クラス: `apache::mod::cluster` **泚意**: `mod_cluster`に関しお提䟛されおいる公匏なパッケヌゞはありたせん。そのため、Apacheモゞュヌルの倖郚から䜿甚できるようにする必芁がありたす。バむナリは[こちら](http://mod-cluster.jboss.org/)にありたす。 ``` puppet class { '::apache::mod::cluster': ip => '172.17.0.1', allowed_network => '172.17.0.', balancer_name => 'mycluster', version => '1.3.1' } ``` **パラメヌタ**:  * `port`: mod_clusterのリッスンポヌト。 デフォルト倀: '6666'。 * `server_advertise`: サヌバをアドバタむズするかどうか。 デフォルト倀: `true`。 * `advertise_frequency`: アドバタむズメッセヌゞ間のむンタヌバルを秒数[.ミリ秒]で蚭定したす。 デフォルト倀: 10。 * `manager_allowed_network`: ネットワヌクにmod_cluster_managerぞのアクセスを蚱可するかどうか。 デフォルト倀: '127.0.0.1'。 * `keep_alive_timeout`: Apacheがリク゚ストを埅機する長さを秒数で指定したす。 デフォルト倀: 60。 * `max_keep_alive_requests`: 維持されるリク゚ストの最倧数。 デフォルト倀: 0。 * `enable_mcpm_receive`: MCPMを有効にするかどうか。 デフォルト倀: `true`。 * `ip`: リッスンするIPアドレスを指定したす。 * `allowed_network`: バランスドメンバヌネットワヌク。 * `version`: `mod_cluster`バヌゞョンを指定したす。httpd 2.4ではバヌゞョン1.3.0以䞊が必芁です。 ##### クラス: `apache::mod::deflate` [`mod_deflate`][]をむンストヌルしお蚭定したす。 **パラメヌタ**:  * `types`: デフレヌトする[配列][]たたは[MIMEタむプ][MIME `content-type`]。 デフォルト倀: ['text/html text/plain text/xml', 'text/css', 'application/x-javascript application/javascript application/ecmascript', 'application/rss+xml', 'application/json']。 * `notes`: [ハッシュ][]、キヌはタむプを衚し、倀はノヌト名を衚したす。 デフォルト倀: { 'Input' => 'instream'、'Output' => 'outstream'、'Ratio' => 'ratio' }。 ##### クラス: `apache::mod::expires` [`mod_expires`][]をむンストヌルし、`expires.conf.erb`を䜿甚しお蚭定を生成したす。 **パラメヌタ**:  * `expires_active`: ドキュメント領域に関しお`Expires`ヘッダの生成を有効にしたす。 ブヌリアン。 デフォルト倀: `true`。 * `expires_default`: [`ExpiresByType`][]構文たたは[むンタヌバル構文][]を甚いた有効期限蚈算のためのデフォルトアルゎリズムを指定したす。 デフォルト倀: `undef`。 * `expires_by_type`: 䞀連の[MIME `content-type`][]ずその有効期限を衚したす。 倀: [ハッシュ][ハッシュ]の[配列][]、各ハッシュのキヌは有効なMIME `content-type` ('text/json'など)、倀は以䞋の有効な [むンタヌバル構文][]。 デフォルト倀: `undef`。 ##### クラス: `apache::mod::ext_filter` [`mod_ext_filter`][]をむンストヌルしお蚭定したす。 ``` puppet class { 'apache::mod::ext_filter': ext_filter_define => { 'slowdown' => 'mode=output cmd=/bin/cat preservescontentlength', 'puppetdb-strip' => 'mode=output outtype=application/json cmd="pdb-resource-filter"', }, } ``` **パラメヌタ**:  * `ext_filter_define`: フィルタ名ずそのパラメヌタのハッシュ。 デフォルト倀: `undef`。 ##### クラス: `apache::mod::fcgid` [`mod_fcgid`][]をむンストヌルしお蚭定したす。 このクラスでは、䜿甚可胜なすべおのオプションを個別にパラメヌタ化するのではなく、`options` [ハッシュ][]を䜿っお`mod_fcgid`を蚭定したす。䟋: ``` puppet class { 'apache::mod::fcgid': options => { 'FcgidIPCDir' => '/var/run/fcgidsock', 'SharememPath' => '/var/run/fcgid_shm', 'AddHandler' => 'fcgid-script .fcgi', }, } ``` すべおのオプションのリストに぀いおは、[公匏`mod_fcgid`ドキュメント][`mod_fcgid`]を参照しおください。 `apache::mod::fcgid`を含める堎合は、ディレクトリごず、バヌチャルホストごずに[`FcgidWrapper`][]を蚭定できたす。最初にモゞュヌルをロヌドする必芁がありたす。`apache::vhost`で`fcgiwrapper`パラメヌタを蚭定しおいる堎合、Puppetは自動的にはモゞュヌルを有効化したせん。 ``` puppet include apache::mod::fcgid apache::vhost { 'example.org': docroot => '/var/www/html', directories => { path => '/var/www/html', fcgiwrapper => { command => '/usr/local/bin/fcgiwrapper', } }, } ``` ##### クラス: `apache::mod::geoip` [`mod_geoip`][]をむンストヌルしお管理したす。 **パラメヌタ**:  * `db_file`: GeoIPデヌタベヌスファむルのパスを蚭定したす。 倀: パス、たたは耇数のGeoIPデヌタベヌスファむルの[配列][]パス。 デフォルト倀: `/usr/share/GeoIP/GeoIP.dat`。 * `enable`: [`mod_geoip`][]を党䜓で有効にするかどうかを決定したす。 ブヌリアン。 デフォルト倀: `false`。 * `flag`: GeoIPフラグを蚭定したす。 倀: 'CheckCache'、'IndexCache'、'MemoryCache'、'Standard'。 デフォルト倀: 'Standard'。 * `output`: 䜿甚するアりトプット倉数を定矩したす。 倀: 'All'、'Env'、'Request'、'Notes'。 デフォルト倀: 'All'。 * `enable_utf8`: アりトプットをISO*8859*1 (ラテン*1)からUTF*8に倉曎したす。 ブヌリアン。 デフォルト倀: `undef`。 * `scan_proxy_headers`: [GeoIPScanProxyHeaders][]オプションを有効にしたす。 ブヌリアン。 デフォルト倀: `undef`。 * `scan_proxy_header_field`: クラむアントのIPアドレスの決定に䜿甚するヘッダの[`mod_geoip`][]を指定したす。 デフォルト倀: `undef`。 * `use_last_xforwarededfor_ip` (sic): IPアドレスのカンマ区切りリストで芋぀かったクラむアントのIPの最初たたは最埌のIPアドレスを䜿うかどうかを決定したす。 ブヌリアン。 デフォルト倀: `undef`。 ##### クラス: `apache::mod::info` サヌバ蚭定の党䜓的な抂芁を提䟛する[`mod_info`][]をむンストヌルしお管理したす。 **パラメヌタ**:  * `allow_from`: IPv4たたはIPv6アドレスのホワむトリスト、たたは`/server*info`にアクセスできる範囲。 倀: IPv4アドレス、IPv6アドレス、たたは範囲の1぀たたは耇数のオクテット、たたはいずれかの配列。 デフォルト倀: ['127.0.0.1','::1']。  * `apache_version`: 文字列で衚されるApacheのバヌゞョン番号、'2.2'や'2.4'など。  デフォルト倀: [`$::apache::apache_version`][`apache_version`]の倀。 * `restrict_access`: アクセス制限を有効にするかどうかを決定したす。`false`の堎合、`allow_from`ホワむトリストは無芖され、すべおのIPアドレスが `/server*info`にアクセスできるようになりたす。 ブヌリアン。 デフォルト倀: `true`。 ##### クラス: `apache::mod::itk` [`mod_itk`][]をむンストヌルしお管理したす。これはHTTPDプロセス向けにロヌドおよび蚭定されるMPMです。[公匏ドキュメント](http://mpm-itk.sesse.net/)。 **パラメヌタ**:  * `startservers`: 起動時に䜜成される子サヌバプロセスの数。 倀: 敎数。 デフォルト倀: `8`。 * `minspareservers`: 埅機する子サヌバプロセスに望たしい最小数。 倀: 敎数。 デフォルト倀: `5`。 * `maxspareservers`: 埅機する子サヌバプロセスに望たしい最倧数。 倀: 敎数。 デフォルト倀: `20`。 * `serverlimit`: Apache httpdプロセスの継続期間に察しお蚭定されるMaxRequestWorkersの最倧数。 倀: 敎数。 デフォルト倀: `256`。 * `maxclients`: 凊理される同時リク゚ストの最倧数。 倀: 敎数。 デフォルト倀: `256`。 * `maxrequestsperchild`: 個々の子サヌバプロセスが凊理する接続の最倧数。 倀: 敎数。 デフォルト倀: `4000`。 * `enablecapabilities`: 芪プロセスのルヌト機胜をほがすべお削陀し、User/Groupディレクティブで指定されたナヌザずしお、いく぀かの远加機胜(特にsetuid)付きで実行したす。 セキュリティはある皋床匷化されたすが、NFSなどの機胜に察応しないファむルシステムによる凊理では問題が生じるおそれがありたす。 倀: ブヌル倀。 デフォルト倀: `undef`。 ##### クラス: `apache::mod::jk` `mod_jk`をむンストヌルしお管理したす。これは、Apache httpdリダむレクションず叀いバヌゞョンのTomCatおよびJBossを結ぶコネクタです。 **泚意**: mod\_jkに関しお提䟛されおいる公匏のパッケヌゞはありたせん。そのため、apacheモゞュヌルの制埡以倖の手段で䜿甚できるようにする必芁がありたす。バむナリは[Apache Tomcatコネクタダりンロヌドペヌゞ](https://tomcat.apache.org/download-connectors.cgi)にありたす。 ``` puppet class { '::apache::mod::jk': ip => '192.168.2.15', workers_file => 'conf/workers.properties', mount_file => 'conf/uriworkermap.properties', shm_file => 'run/jk.shm', shm_size => '50M', workers_file_content => { }, } ``` 詳现に぀いおは、[templates/mod/jk/workers.properties.erb](templates/mod/jk/workers.properties.erb)を参照しおください。 **`apache::mod::jk`**内のパラメヌタ: `mod_jk`パラメヌタを理解するための情報源ずしおは、[公匏ドキュメント](https://tomcat.apache.org/connectors-doc/reference/apache.html)が最適です。ただし、次はこれに含たれたせん: **add_listen** パラメヌタ`ip`および `port`に埓っお`Listen`ディレクティブを定矩しお(䞋蚘参照)、ApacheがIP/portの組合せをリッスンし`mod_jk`にリダむレクトするようにしたす。 `Listen *:`たたは`Listen `のように、別の`Listen`ディレクティブが`mod_jk`バむンディングで必芁なものず競合するずきに圹立ちたす。 タむプ: ブヌル倀 デフォルト: true **ip** `mod_jk`にバむンディングするIP。 バむンディングアドレスがプラむマリのネットワヌクむンタヌフェヌスIPではないずきに圹立ちたす。 タむプ: 文字列 デフォルト: `$facts['ipaddress']` **port** `mod_jk`にバむンディングするポヌト。 リバヌスプロキシたたはキャッシュのような、別のものがポヌト80でリク゚ストを受信しお、異なるポヌトのApacheに転送する必芁があるずきに圹立ちたす。 タむプ: 文字列(数倀) デフォルト: '80' **workers\_file\_content** 各ディレクティブにはフォヌマット`worker..=`がありたす。このマップは耇数ハッシュのハッシュずしお衚され、倖偎のハッシュはワヌカヌを指定し、内偎の各ハッシュは各ワヌカヌのプロパティず倀を指定したす。 たた、2぀のグロヌバルディレクティブ 'worker.list'および'worker.maintain'もありたす。 䟋えば、以䞋のワヌカヌファむルは図1のようにパラメヌタ化したす。 ``` puppet worker.list = status worker.list = some_name,other_name worker.maintain = 60 # Optional comment worker.some_name.type=ajp13 worker.some_name.socket_keepalive=true # I just like comments worker.other_name.type=ajp12 (why would you?) worker.other_name.socket_keepalive=false ``` **図1:** ``` puppet $workers_file_content = { worker_lists => ['status', 'some_name,other_name'], worker_maintain => '60', some_name => { comment => 'Optional comment', type => 'ajp13', socket_keepalive => 'true', }, other_name => { comment => 'I just like comments', type => 'ajp12', socket_keepalive => 'false', }, } ``` **mount\_file\_content** 各ディレクティブにはフォヌマット` = `がありたす。このマップは耇数ハッシュのハッシュずしお衚され、倖偎のハッシュはワヌカヌを指定し、内偎の各ハッシュは次の2぀のアむテムを含みたす: * uri_list&mdash - ワヌカヌにマップするURIを甚いた配列 * comment&mdash - ワヌカヌに関するコメントを蚘したオプションの文字列 䟋えば、以䞋のマりントファむルは図2のようにパラメヌタ化したす。 ``` puppet # Worker 1 /context_1/ = worker_1 /context_1/* = worker_1 # Worker 2 / = worker_2 /context_2/ = worker_2 /context_2/* = worker_2 ``` **図2:** ``` puppet $mount_file_content = { worker_1 => { uri_list => ['/context_1/', '/context_1/*'], comment => 'Worker 1', }, worker_2 => { uri_list => ['/context_2/', '/context_2/*'], comment => 'Worker 2', }, }, ``` **shm\_file and log\_file** これらのファむルがどのように定矩されおいるかによっお、クラスはそれらの最終パスを別々に䜜成したす。 - 盞察パス: `logroot`で提䟛されたパスを远加したす (䞋蚘参照) - 絶察パスたたはパむプ: 提䟛されたパスをそのたた䜿甚したす 䟋 (RHEL 6): ``` puppet shm_file => 'shm_file' # Ends up in $shm_path = '/var/log/httpd/shm_file' ``` ``` puppet shm_file => '/run/shm_file' # Ends up in $shm_path = '/run/shm_file' ``` ``` puppet shm_file => '"|rotatelogs /var/log/httpd/mod_jk.log.%Y%m%d 86400 -180"' # Ends up in $shm_path = '"|rotatelogs /var/log/httpd/mod_jk.log.%Y%m%d 86400 -180"' ``` > デフォルトのlogrootは十分健党です。このため、絶察パスを指定するこずは掚奚したせん。 **logroot** `shm_file`および`log_file`のベヌスディレクトリは`logroot`パラメヌタで決定されたす。指定されない堎合、デフォルトは`apache::params::logroot`です。 > デフォルトのlogrootは十分健党です。このため、䞊曞きするこずは掚奚したせん。 ##### クラス: `apache::mod::passenger`  [`mod_passenger`][]をむンストヌルしお管理したす。Red Hatベヌスのシステムの堎合は、[passengerドキュメント](https://www.phusionpassenger.com/library/install/apache/install/oss/el6/#step-1:-upgrade-your-kernel,-or-disable-selinux)に蚘茉された最小芁件を満たしおいるこずを確認しおください。 珟圚のサヌバ蚭定は、[Passengerリファレンス](https://www.phusionpassenger.com/library/config/apache/reference/)から盎接取埗されおいたす。廃止予定の譊告ず削陀倱敗メッセヌゞを有効にするには、 サヌバにむンストヌルされおいるバヌゞョン番号を`passenger_installed_version`に蚭定したす。 **パラメヌタ**:  |パラメヌタ|デフォルト倀|passengerの蚭定|コンテキスト|泚蚘| |---------|-------------|------------------------|-------|-----| |manage_repo|true|n/a||| |mod_id|未定矩|n/a||| |mod_lib|未定矩|n/a||| |mod_lib_path|未定矩|n/a||| |mod_package|未定矩|n/a||| |mod_package_ensure|未定矩|n/a||| |mod_path|未定矩|n/a||| |passenger_allow_encoded_slashes|未定矩|[`PassengerAllowEncodedSlashes`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerAllowEncodedSlashes)|server-config virutal-host htaccess directory || |passenger_app_env|未定矩|[`PassengerAppEnv`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerAppEnv)|server-config virutal-host htaccess directory || |passenger_app_group_name|未定矩|[`PassengerAppGroupName`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerAppGroupName)|server-config virutal-host htaccess directory || |passenger_app_root|未定矩|[`PassengerAppRoot`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerAppRoot)|server-config virutal-host htaccess directory || |passenger_app_type|未定矩|[`PassengerAppType`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerAppType)|server-config virutal-host htaccess directory || |passenger_base_uri|未定矩|[`PassengerBaseURI`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerBaseURI)|server-config virutal-host htaccess directory || |passenger_buffer_response|未定矩|[`PassengerBufferResponse`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerBufferResponse)|server-config virutal-host htaccess directory || |passenger_buffer_upload|未定矩|[`PassengerBufferUpload`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerBufferUpload)|server-config virutal-host htaccess directory || |passenger_concurrency_model|未定矩|[`PassengerConcurrencyModel`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerConcurrencyModel)|server-config virutal-host htaccess directory || |passenger_conf_file|$::apache::params::passenger_conf_file|n/a||| |passenger_conf_package_file|$::apache::params::passenger_conf_package_file|n/a||| |passenger_data_buffer_dir|未定矩|[`PassengerDataBufferDir`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerDataBufferDir)|server-config || |passenger_debug_log_file|未定矩|PassengerDebugLogFile|server-config |このオプションの名前は、バヌゞョン5.0.5でPassengerLogFileに倉曎されおいたす。| |passenger_debugger|未定矩|[`PassengerDebugger`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerDebugger)|server-config virutal-host htaccess directory || |passenger_default_group|未定矩|[`PassengerDefaultGroup`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerDefaultGroup)|server-config || |passenger_default_ruby|$::apache::params::passenger_default_ruby|[`PassengerDefaultRuby`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerDefaultRuby)|server-config || |passenger_default_user|未定矩|[`PassengerDefaultUser`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerDefaultUser)|server-config || |passenger_disable_security_update_check|未定矩|[`PassengerDisableSecurityUpdateCheck`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerDisableSecurityUpdateCheck)|server-config || |passenger_enabled|未定矩|[`PassengerEnabled`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerEnabled)|server-config virutal-host htaccess directory || |passenger_error_override|未定矩|[`PassengerErrorOverride`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerErrorOverride)|server-config virutal-host htaccess directory || |passenger_file_descriptor_log_file|未定矩|[`PassengerFileDescriptorLogFile`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerFileDescriptorLogFile)|server-config || |passenger_fly_with|未定矩|[`PassengerFlyWith`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerFlyWith)|server-config || |passenger_force_max_concurrent_requests_per_process|未定矩|[`PassengerForceMaxConcurrentRequestsPerProcess`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerForceMaxConcurrentRequestsPerProcess)|server-config virutal-host htaccess directory || |passenger_friendly_error_pages|未定矩|[`PassengerFriendlyErrorPages`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerFriendlyErrorPages)|server-config virutal-host htaccess directory || |passenger_group|未定矩|[`PassengerGroup`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerGroup)|server-config virutal-host directory || |passenger_high_performance|未定矩|[`PassengerHighPerformance`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerHighPerformance)|server-config virutal-host htaccess directory || |passenger_installed_version|未定矩|n/a| |このオプションを蚭定するず、指定した倀に察するpassengerオプションのバヌゞョンチェックが有効になりたす。| |passenger_instance_registry_dir|未定矩|[`PassengerInstanceRegistryDir`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerInstanceRegistryDir)|server-config || |passenger_load_shell_envvars|未定矩|[`PassengerLoadShellEnvvars`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerLoadShellEnvvars)|server-config virutal-host htaccess directory || |passenger_log_file|未定矩|[`PassengerLogFile`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerLogFile)|server-config || |passenger_log_level|未定矩|[`PassengerLogLevel`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerLogLevel)|server-config || |passenger_lve_min_uid|未定矩|[`PassengerLveMinUid`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerLveMinUid)|server-config virtual-host || |passenger_max_instances|未定矩|[`PassengerMaxInstances`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerMaxInstances)|server-config virutal-host htaccess directory || |passenger_max_instances_per_app|未定矩|[`PassengerMaxInstancesPerApp`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerMaxInstancesPerApp)|server-config || |passenger_max_pool_size|未定矩|[`PassengerMaxPoolSize`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerMaxPoolSize)|server-config || |passenger_max_preloader_idle_time|未定矩|[`PassengerMaxPreloaderIdleTime`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerMaxPreloaderIdleTime)|server-config virtual-host || |passenger_max_request_queue_size|未定矩|[`PassengerMaxRequestQueueSize`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerMaxRequestQueueSize)|server-config virutal-host htaccess directory || |passenger_max_request_time|未定矩|[`PassengerMaxRequestTime`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerMaxRequestTime)|server-config virutal-host htaccess directory || |passenger_max_requests|未定矩|[`PassengerMaxRequests`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerMaxRequests)|server-config virutal-host htaccess directory || |passenger_memory_limit|未定矩|[`PassengerMemoryLimit`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerMemoryLimit)|server-config virutal-host htaccess directory || |passenger_meteor_app_settings|未定矩|[`PassengerMeteorAppSettings`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerMeteorAppSettings)|server-config virutal-host htaccess directory || |passenger_min_instances|未定矩|[`PassengerMinInstances`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerMinInstances)|server-config virutal-host htaccess directory || |passenger_nodejs|未定矩|[`PassengerNodejs`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerNodejs)|server-config virutal-host htaccess directory || |passenger_pool_idle_time|未定矩|[`PassengerPoolIdleTime`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerPoolIdleTime)|server-config || |passenger_pre_start|未定矩|[`PassengerPreStart`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerPreStart)|server-config virtual-host || |passenger_python|未定矩|[`PassengerPython`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerPython)|server-config virutal-host htaccess directory || |passenger_resist_deployment_errors|未定矩|[`PassengerResistDeploymentErrors`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerResistDeploymentErrors)|server-config virutal-host htaccess directory || |passenger_resolve_symlinks_in_document_root|未定矩|[`PassengerResolveSymlinksInDocumentRoot`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerResolveSymlinksInDocumentRoot)|server-config virutal-host htaccess directory || |passenger_response_buffer_high_watermark|未定矩|[`PassengerResponseBufferHighWatermark`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerResponseBufferHighWatermark)|server-config || |passenger_restart_dir|未定矩|[`PassengerRestartDir`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerRestartDir)|server-config virutal-host htaccess directory || |passenger_rolling_restarts|未定矩|[`PassengerRollingRestarts`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerRollingRestarts)|server-config virutal-host htaccess directory || |passenger_root|$::apache::params::passenger_root|[`PassengerRoot`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerRoot)|server-config || |passenger_ruby|$::apache::params::passenger_ruby|[`PassengerRuby`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerRuby)|server-config virutal-host htaccess directory || |passenger_security_update_check_proxy|未定矩|[`PassengerSecurityUpdateCheckProxy`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerSecurityUpdateCheckProxy)|server-config || |passenger_show_version_in_header|未定矩|[`PassengerShowVersionInHeader`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerShowVersionInHeader)|server-config || |passenger_socket_backlog|未定矩|[`PassengerSocketBacklog`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerSocketBacklog)|server-config || |passenger_spawn_method|未定矩|[`PassengerSpawnMethod`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerSpawnMethod)|server-config virtual-host || |passenger_start_timeout|未定矩|[`PassengerStartTimeout`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerStartTimeout)|server-config virutal-host htaccess directory || |passenger_startup_file|未定矩|[`PassengerStartupFile`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerStartupFile)|server-config virutal-host htaccess directory || |passenger_stat_throttle_rate|未定矩|[`PassengerStatThrottleRate`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerStatThrottleRate)|server-config || |passenger_sticky_sessions|未定矩|[`PassengerStickySessions`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerStickySessions)|server-config virutal-host htaccess directory || |passenger_sticky_sessions_cookie_name|未定矩|[`PassengerStickySessionsCookieName`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerStickySessionsCookieName)|server-config virutal-host htaccess directory || |passenger_thread_count|未定矩|[`PassengerThreadCount`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerThreadCount)|server-config virutal-host htaccess directory || |passenger_use_global_queue|未定矩|PassengerUseGlobalQueue|server-config || |passenger_user|未定矩|[`PassengerUser`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerUser)|server-config virutal-host directory || |passenger_user_switching|未定矩|[`PassengerUserSwitching`](https://www.phusionpassenger.com/library/config/apache/reference/#PassengerUserSwitching)|server-config || |rack_auto_detect|未定矩|RackAutoDetect|server-config |これらのオプションは、バヌゞョン4.0.0で最適化の䞀環ずしお削陀されたした。代わりにPassengerEnabledを䜿甚しおください。| |rack_autodetect|未定矩|n/a||| |rack_base_uri|未定矩|RackBaseURI|server-config |3.0.0で廃止され、PassengerBaseURIが採甚されたした。| |rack_env|未定矩|[`RackEnv`](https://www.phusionpassenger.com/library/config/apache/reference/#RackEnv)|server-config virutal-host htaccess directory || |rails_allow_mod_rewrite|未定矩|RailsAllowModRewrite|server-config |このオプションは、バヌゞョン4.0.0以降では䜕の圱響も䞎えたせん。| |rails_app_spawner_idle_time|未定矩|RailsAppSpawnerIdleTime|server-config |このオプションはバヌゞョン4.0.0で削陀され、PassengerMaxPreloaderIdleTimeに眮き換えられたした。| |rails_auto_detect|未定矩|RailsAutoDetect|server-config |これらのオプションは、バヌゞョン4.0.0で最適化の䞀環ずしお削陀されたした。代わりにPassengerEnabledを䜿甚しおください。| |rails_autodetect|未定矩|n/a||| |rails_base_uri|未定矩|RailsBaseURI|server-config |3.0.0で廃止され、PassengerBaseURIが採甚されたした。| |rails_default_user|未定矩|RailsDefaultUser|server-config |3.0.0で廃止され、PassengerDefaultUserが採甚されたした。| |rails_env|未定矩|[`RailsEnv`](https://www.phusionpassenger.com/library/config/apache/reference/#RailsEnv)|server-config virutal-host htaccess directory || |rails_framework_spawner_idle_time|未定矩|RailsFrameworkSpawnerIdleTime|server-config |このオプションはバヌゞョン4.0.0では䜿甚できたせん。フレヌムワヌクスポヌンも同時に削陀されたので、代わりのオプションはありたせん。スマヌトスポヌンを䜿甚しおください。| |rails_ruby|未定矩|RailsRuby|server-config |3.0.0で廃止され、PassengerRubyが採甚されたした。| |rails_spawn_method|未定矩|RailsSpawnMethod|server-config |3.0.0で廃止され、PassengerSpawnMethodが採甚されたした。| |rails_user_switching|未定矩|RailsUserSwitching|server-config |3.0.0で廃止され、PassengerUserSwitchingが採甚されたした。| |wsgi_auto_detect|未定矩|WsgiAutoDetect|server-config |これらのオプションは、バヌゞョン4.0.0で最適化の䞀環ずしお削陀されたした。代わりにPassengerEnabledを䜿甚しおください。| ##### クラス: `apache::mod::ldap` [`mod_ldap`][]をむンストヌルしお蚭定し、[`LDAPTrustedGlobalCert`](https://httpd.apache.org/docs/current/mod/mod_ldap.html#ldaptrustedglobalcert)ディレクティブの修正を可胜にしたす。 ``` puppet class { 'apache::mod::ldap': ldap_trusted_global_cert_file => '/etc/pki/tls/certs/ldap-trust.crt', ldap_trusted_global_cert_type => 'CA_DER', ldap_trusted_mode => 'TLS', ldap_shared_cache_size => '500000', ldap_cache_entries => '1024', ldap_cache_ttl => '600', ldap_opcache_entries => '1024', ldap_opcache_ttl => '600', } ``` **パラメヌタ**  * `apache_version`: むンストヌルされたApacheバヌゞョンを指定したす。 デフォルト倀: `undef`。 * `ldap_trusted_global_cert_file`: LDAPサヌバ䞊でSSLたたはTLS接続を確立する際に䜿甚する、信頌できるCA蚌明曞のパスずファむル名を指定したす。 * `ldap_trusted_global_cert_type`:グロヌバルな信頌できる蚌明曞フォヌマットを指定したす。 デフォルト倀: 'CA_BASE64'。 * `ldap_trusted_mode`: LDAPサヌバ接続時に䜿甚されるSSL/TLSモヌドを指定したす。 * `ldap_shared_cache_size`: 共有されたメモリのキャッシュのサむズをバむトで指定したす。 * `ldap_cache_entries`: 䞀次LDAPキャッシュの゚ントリの最倧数を指定したす。 * `ldap_cache_ttl`: キャッシュされたアむテムが有効に保たれる時間を秒数で指定したす。 * `ldap_opcache_entries`: LDAP比范挔算のキャッシュに甚いる゚ントリ数を指定したす。 * `ldap_opcache_ttl`: 挔算キャッシュの゚ントリが有効に保たれる時間を秒数で指定したす。 * `package_name`: カスタムパッケヌゞ名を指定したす。 デフォルト倀: `undef`。 ##### クラス: `apache::mod::negotiation` [`mod_negotiation`][]をむンストヌルしお蚭定したす。 **パラメヌタ**:  * `force_language_priority`: `ForceLanguagePriority`オプションを蚭定したす。 倀: 文字列。  デフォルト倀: `Prefer Fallback`。 * `language_priority`: モゞュヌルの`LanguagePriority`オプションを蚭定するための蚀語の[配列][]。 デフォルト倀: ['en'、'ca'、cs'、'da'、'de'、'el'、'eo'、'es'、'et'、'fr'、'he'、'hr'、'it'、'ja'、'ko'、'ltz'、'nl'、'nn'、'no'、'pl'、'pt'、'pt-BR'、'ru'、'sv'、'zh-CN'、'zh-TW']。 ##### クラス: `apache::mod::nss` NSS暗号化ラむブラリを䜿甚するApacheのSSLプロバむダ。 **パラメヌタ:** - `transfer_log`: access.logのパス。 - `error_log`: error.logのパス。 - `passwd_file`: NSSPassPhraseDialogディレクティブに䜿甚するファむルのパス。 - `port`: SSLポヌト。デフォルト倀8443。 ##### クラス: `apache::mod::pagespeed` [`mod_pagespeed`][]をむンストヌルしお管理したす。これは、Webペヌゞをリラむトしお冗長性ず垯域を軜枛するためのGoogleモゞュヌルです。 このapacheモゞュヌルには`mod-pagespeed-stable`が必芁ですが、Puppetはパッケヌゞを自動的にむンストヌルするために必芁な゜フトりェアを管理**したせん**。パッケヌゞがむンストヌルされおいないか、お䜿いのパッケヌゞマネヌゞャで䜿甚できない堎合にこのクラスを宣蚀するず、Puppet実行は倱敗したす。 > **泚意:** お䜿いのシステムが最新のGoogle Pagespeed芁件を満たしおいるこずを確認しおください。 **パラメヌタ**:  以䞋のパラメヌタはモゞュヌルのディレクティブに盞圓したす。詳现に぀いおは、[モゞュヌルのドキュメント][`mod_pagespeed`]を参照しおください。 * `inherit_vhost_config`: デフォルト倀: 'on'。 * `filter_xhtml`: デフォルト倀: `false`。 * `cache_path`: デフォルト倀: '/var/cache/mod_pagespeed/'。 * `log_dir`: デフォルト倀: '/var/log/pagespeed'。 * `memcache_servers`: デフォルト倀: []。 * `rewrite_level`: デフォルト倀: 'CoreFilters'。 * `disable_filters`: デフォルト倀: []。 * `enable_filters`: デフォルト倀: []。 * `forbid_filters`: デフォルト倀: []。 * `rewrite_deadline_per_flush_ms`: デフォルト倀: 10。 * `additional_domains`: デフォルト倀: `undef`。 * `file_cache_size_kb`: デフォルト倀: 102400。 * `file_cache_clean_interval_ms`: デフォルト倀: 3600000。 * `lru_cache_per_process`: デフォルト倀: 1024。 * `lru_cache_byte_limit`: デフォルト倀: 16384。 * `css_flatten_max_bytes`: デフォルト倀: 2048。 * `css_inline_max_bytes`: デフォルト倀: 2048。 * `css_image_inline_max_bytes`: デフォルト倀: 2048。 * `image_inline_max_bytes`: デフォルト倀: 2048。 * `js_inline_max_bytes`: デフォルト倀: 2048。 * `css_outline_min_bytes`: デフォルト倀: 3000。 * `js_outline_min_bytes`: デフォルト倀: 3000。 * `inode_limit`: デフォルト倀: 500000。 * `image_max_rewrites_at_once`: デフォルト倀: 8。 * `num_rewrite_threads`: デフォルト倀: 4。 * `num_expensive_rewrite_threads`: デフォルト倀: 4。 * `collect_statistics`: デフォルト倀: 'on'。 * `statistics_logging`: デフォルト倀: 'on'。 * `allow_view_stats`: デフォルト倀: []。 * `allow_pagespeed_console`: デフォルト倀: []。 * `allow_pagespeed_message`: デフォルト倀: []。 * `message_buffer_size`: デフォルト倀: 100000。 * `additional_configuration`: ディレクティブ倀ペアのハッシュ、たたはpagespeed蚭定の最埌に挿入する行の配列。デフォルト倀: '{ }'。 ##### クラス: `apache::mod::passenger`  `mod_passenger`をむンストヌルしお蚭定したす。 >**泚意**: passengerモゞュヌルは、EPELにより提䟛される䟝存関係パッケヌゞず`mod_passengers`カスタムリポゞトリがなければ、RH/CentOSでは䜿甚できたせん。前述の`manage_repo`パラメヌタず[https://www.phusionpassenger.com/library/install/apache/install/oss/el7/]()を参照しおください。 **パラメヌタ**:  * `passenger_conf_file`: `$::apache::params::passenger_conf_file` * `passenger_conf_package_file: `$::apache::params::passenger_conf_package_file` * `passenger_high_performance`: デフォルト倀: `undef` * `passenger_pool_idle_time`: デフォルト倀: `undef` * `passenger_max_request_queue_size`: デフォルト倀: `undef` * `passenger_max_requests`: デフォルト倀: `undef` * `passenger_spawn_method`: デフォルト倀: `undef` * `passenger_stat_throttle_rate`: デフォルト倀: `undef` * `rack_autodetect`: デフォルト倀: `undef` * `rails_autodetect`: デフォルト倀: `undef` * `passenger_root` : `$::apache::params::passenger_root` * `passenger_ruby` : `$::apache::params::passenger_ruby` * `passenger_default_ruby`: `$::apache::params::passenger_default_ruby` * `passenger_max_pool_size`: デフォルト倀: `undef` * `passenger_min_instances`: デフォルト倀: `undef` * `passenger_max_instances_per_app`: デフォルト倀: `undef` * `passenger_use_global_queue`: デフォルト倀: `undef` * `passenger_app_env`: デフォルト倀: `undef` * `passenger_log_file`: デフォルト倀: `undef` * `passenger_log_level`: デフォルト倀: `undef` * `passenger_data_buffer_dir`: デフォルト倀: `undef` * `manage_repo`: phusionpassenger.comリポゞトリを管理するかどうか。デフォルト倀: `true` * `mod_package`: デフォルト倀: `undef` * `mod_package_ensure`: デフォルト倀: `undef` * `mod_lib`: デフォルト倀: `undef` * `mod_lib_path`: デフォルト倀: `undef` * `mod_id`: デフォルト倀: `undef` * `mod_path`: デフォルト倀: `undef` ##### クラス: `apache::mod::proxy` I`mod_proxy`をむンストヌルし、`proxy.conf.erb`テンプレヌトを䜿甚しお蚭定を生成したす。 **`apache::mod::proxy`内のパラメヌタ**: - `allow_from`: デフォルト倀: `undef` - `apache_version`: デフォルト倀: `undef` - `package_name`: デフォルト倀: `undef` - `proxy_requests`: デフォルト倀: 'Off' - `proxy_via`: デフォルト倀: 'On' ##### クラス: `apache::mod::proxy_balancer` ロヌドバランシングを提䟛する[`mod_proxy_balancer`][]をむンストヌルしお管理したす。 **パラメヌタ**:  * `manager`: バランサマネヌゞャのサポヌトを有効にするかどうかを決定したす。 デフォルト倀: `false`。 * `manager_path`: バランサマネヌゞャのサヌバロケヌション。 デフォルト倀: '/balancer-manager'。 * `allow_from`: `/balancer-manager`にアクセスできるIPv4たたはIPv6アドレスの[配列][]。 デフォルト倀: ['127.0.0.1','::1']。  * `apache_version`: 文字列で衚されるApacheのバヌゞョン番号、'2.2'や'2.4'など。  デフォルト倀: [`$::apache::apache_version`][`apache_version`]の倀。Apache 2.4以䞊では、`mod_slotmem_shm`がロヌドされたす。 ##### クラス: `apache::mod::php` [`mod_php`][]をむンストヌルしお蚭定したす。 **パラメヌタ**:  以䞋のパラメヌタのデフォルト倀は、オペレヌティングシステムによっお異なりたす。このクラスのパラメヌタのほずんどは、`mod_php`ディレクティブに盞圓したす。詳现に぀いおは、[モゞュヌルのドキュメント][`mod_php`]を参照しおください。 * `package_name`: `mod_php`をむンストヌルするパッケヌゞの名前。 * `path`: `mod_php`共有オブゞェクト(`.so`)ファむルのパスを定矩したす。 * `source`: デフォルト蚭定のパスを定矩したす。倀には`puppet:///`パスが含たれたす。 * `template`: Puppetが蚭定ファむルの生成に䜿甚する`php.conf`テンプレヌトのパスを定矩したす。 * `content`: `php.conf`に任意のコンテンツを远加したす。 ##### クラス: `apache::mod::proxy_html` **泚意**: `mod_proxy_html`に関しお提䟛されおいる公匏なパッケヌゞはありたせん。そのため、apacheモゞュヌルの倖郚から䜿甚できるようにする必芁がありたす。 ##### クラス: `apache::mod::python` [`mod_python`][]をむンストヌルしお蚭定したす。 **パラメヌタ**  * `loadfile_name`: pythonモゞュヌルのロヌドに䜿甚される蚭定ファむルの名前を指定したす。 ##### クラス: `apache::mod::reqtimeout` [`mod_reqtimeout`][]をむンストヌルしお蚭定したす。 **パラメヌタ**  * `timeouts`: [`RequestReadTimeout`][]オプションを蚭定したす。 倀: 文字列たたは[配列][]。 デフォルト倀: ['header=20-40,MinRate=500', 'body=20,MinRate=500']。 ##### クラス: `apache::mod::rewrite` Apacheモゞュヌル`mod_rewrite`をむンストヌルしお有効にしたす。 ##### クラス: `apache::mod::shib` [Shibboleth](http://shibboleth.net/) Apacheモゞュヌル`mod_shib`をむンストヌルしたす。このモゞュヌルは、Shibboleth認蚌プロバむダおよびShibboleth FederationsによるSAML2シングルサむンオン(SSO)認蚌を有効にするものです。このクラスを定矩するず、`apache::vhost`むンスタンス内でShibboleth固有のパラメヌタが有効になりたす。 このクラスでむンストヌルおよび蚭定されるのは、Shibboleth SSO認蚌をコンシュヌムするWebアプリケヌションのApacheコンポヌネントのみです。PuppetでShibboleth蚭定を手動で管理するこずも、[Shibboleth Puppetモゞュヌル](https://github.com/aethylred/puppet-shibboleth)を䜿甚するこずもできたす。 **泚意**: shibbolethモゞュヌルは、Shibbolethのリポゞトリにより提䟛される䟝存関係パッケヌゞがなければ、RH/CentOSでは䜿甚できたせん。[Shibboleth Service Provider Installation Guide](http://wiki.aaf.edu.au/tech-info/sp-install-guide)を参照しおください。 ##### クラス: `apache::mod::ssl` [Apache SSL機胜][`mod_ssl`]をむンストヌルし、`ssl.conf.erb`テンプレヌトを䜿甚しお蚭定を生成したす。ほずんどのオペレヌティングシステムでは、この`ssl.conf`はモゞュヌル蚭定ディレクトリに眮かれおいたす。Red Hatベヌスのオペレヌティングシステムでは、このファむルは`/etc/httpd/conf.d`にありたす。これは、RPMが蚭定を保存するのず同じロケヌションです。 バヌチャルホストでSSLを䜿甚するには、`::apache`の[`default_ssl_vhost`][]パラメヌタを`true`に蚭定する**か**、[`apache::vhost`][]の[`ssl`][]パラメヌタを`true`に蚭定する必芁がありたす。 - `ssl_cipher`: デフォルト倀: 'HIGH:MEDIUM:!aNULL:!MD5:!RC4' - `ssl_compression`: デフォルト倀: false - `ssl_cryptodevice`: デフォルト倀: 'builtin' - `ssl_honorcipherorder`: デフォルト倀: true - `ssl_openssl_conf_cmd`: デフォルト倀: undef - `ssl_cert`: デフォルト倀: undef。 - `ssl_key`: デフォルト倀: undef。 - `ssl_options`: デフォルト倀: ['StdEnvVars'] - `ssl_pass_phrase_dialog`: デフォルト倀: 'builtin' - `ssl_protocol`: デフォルト倀: ['all', '-SSLv2', '-SSLv3']。 - `ssl_proxy_protocol`: デフォルト倀: [] - `ssl_random_seed_bytes`: 有効なオプション: 文字列、デフォルト倀: '512' - `ssl_sessioncache`: 有効なオプション: 文字列。デフォルト倀: '300' - `ssl_sessioncachetimeout`: 有効なオプション: 文字列。デフォルト倀: '300' - `ssl_mutex`: デフォルト倀: OSによっお異なりたす。有効なオプション: [mod_ssl][mod_ssl]ドキュメントを参照 - RedHat/FreeBSD/Suse/Gentoo: 'default' - Debian/Ubuntu + Apache >= 2.4: 'default' - Debian/Ubuntu + Apache < 2.4: 'file:\${APACHE_RUN_DIR}/ssl_mutex' **パラメヌタ: * `ssl_cipher` デフォルト倀: 'HIGH:MEDIUM:!aNULL:!MD5:!RC4' * `ssl_compression` デフォルト倀: `false`。 * `ssl_cryptodevice` デフォルト倀: 'builtin'  * `ssl_honorcipherorder` デフォルト倀: `true`。 * `ssl_openssl_conf_cmd` デフォルト倀: `undef`。 * `ssl_cert` デフォルト倀: `undef`。 * `ssl_key` デフォルト倀: `undef`。 * `ssl_options` デフォルト倀: ['StdEnvVars'] * `ssl_pass_phrase_dialog` デフォルト倀: 'builtin'  * `ssl_protocol` デフォルト倀: ['all', '-SSLv2', '-SSLv3'] * `ssl_random_seed_bytes` 倀: 文字列。  デフォルト倀: '512' * `ssl_sessioncachetimeout` 倀: 文字列。  デフォルト倀: '300' * `ssl_mutex`: 倀: [mod_ssl][mod_ssl]ドキュメントを参照。 デフォルト倀: OSによっお異なりたす: * RedHat/FreeBSD/Suse/Gentoo: 'default'. * Debian/Ubuntu + Apache >= 2.4: 'default'. * Debian/Ubuntu + Apache < 2.4: 'file:\${APACHE_RUN_DIR}/ssl_mutex'. - * Ubuntu 10.04: 'file:/var/run/apache2/ssl_mutex'. ##### クラス: `apache::mod::status` [`mod_status`][]をむンストヌルし、`status.conf.erb`テンプレヌトを䜿甚しお蚭定を生成したす。 **パラメヌタ**:  * `allow_from`: `/server-status`にアクセスできるIPv4たたはIPv6アドレスの[配列][]。 デフォルト倀: ['127.0.0.1','::1']。  * Apacheバヌゞョン2.4以降の`mod_authz_host` ディレクティブ(`require ip`、`require host`など)を䜿甚しお、アクセスできる/できないIPたたは名前の文字列、[配列][]、たたは[ハッシュ][]。このパラメヌタは、以䞋のいずれかの構成で指定したす。 > Apacheバヌゞョンが2.4以降の堎合のみ䜿甚 - `undef` - `allow_from` および叀いディレクティブ構文(`Allow from `)を䜿甚し、廃止予定の譊告を通知したす。 - String - `''`たたは`'unmanaged'` - authディレクティブなし(アクセス制埡は別の方法で実斜) - `'ip '` - `/server-status`にアクセスできるIP/範囲 - `'host '` - `/server-status`にアクセスできる名前/ドメむン - `'all [granted|denied]'` - すべおのナヌザを蚱可/ブロック - 配列 - 各芁玠には䞊蚘のいずれかの文字列が入りたす。配列芁玠ごずに1぀のディレクティブになりたす。 - 以䞋の構造を持぀ハッシュ(キヌ => 倀の圢匏で衚瀺、キヌは文字列) - `'requires'` => 䞊蚘に埓った配列 - 配列ず同じ䜜甚 - `'enforce'` => `'Any'`、`'All'`、`'None'`のいずれかの文字列(任意指定) - `'requires'`キヌで指定されたすべおのディレクティブを``ブロックで囲みたす。 デフォルト倀: 'ip 127.0.0.1 ::1' * `extended_status`: [`ExtendedStatus`][]ディレクティブを぀うじお、各リク゚ストに関する拡匵ステヌタス情報を远跡するかどうかを決定したす。 倀: 'Off'、'On'。 デフォルト倀: 'On'。 * `status_path`: ステヌタスペヌゞのサヌバロケヌション。 デフォルト倀: '/server-status'。 ##### クラス: `apache::mod::userdir` `http://example.com/~user/`構文を甚いお、ナヌザ指定のディレクトリにアクセスできるようにしたす。すべおのパラメヌタは、[公匏のApacheドキュメント](https://httpd.apache.org/docs/2.4/mod/mod_userdir.html)で芋られたす。 **パラメヌタ**:  * `overrides`: ディレクティブタむプの[配列][]。 デフォルト倀: ['FileInfo', 'AuthConfig', 'Limit', 'Indexes']。 ##### クラス: `apache::mod::version` 倚くのオペレヌティングシステムおよびApache構成䞊で[`mod_version`][]をむンストヌルしたす。 Apache 2.4を䜿甚するDebianおよびUbuntuが`apache::mod::version`で分類された堎合は、`mod_version`がビルトむンされおいるためロヌドできない旚の譊告をPuppetが衚瀺したす。 ##### クラス: `apache::mod::security` Trustwaveの[`mod_security`][]をむンストヌルしお蚭定したす。これはすべおのバヌチャルホストでデフォルトで有効化され、実行されたす。 **パラメヌタ**:  * `activated_rules`: `modsec_crs_path`のルヌルの[配列][]たたはsymlinkを䜿甚しおアクティベヌトする絶察倀。 * `allowed_methods`: 蚱可されるHTTPメ゜ッドのスペヌス区切りリスト。 デフォルト倀: 'GET HEAD POST OPTIONS'。 * `content_types`: 1぀たたは耇数の蚱可される[MIMEタむプ][MIME `content-type`]のリスト。 デフォルト倀: 'application/x-www-form-urlencoded|multipart/form-data|text/xml|application/xml|application/x-amf'。 * `crs_package`: CRSルヌルをむンストヌルするパッケヌゞの名前。 デフォルト倀: [`apache::params`][]内の`modsec_crs_package`。 * `manage_security_crs`: security_crs.confルヌルファむルを管理したす。 デフォルト倀: `true`。 * `modsec_dir`: Puppetがmodsec蚭定およびアクティベヌトされたルヌルリンクをむンストヌルする堎所のパスを定矩したす。 デフォルト倀: 'On'、[`apache::params`][]の`modsec_dir`により蚭定。 ${modsec\_dir}/activated\_rules。 * `modsec_secruleengine`: modsecルヌル゚ンゞンを蚭定したす。倀: 'On'、'Off'、'DetectionOnly'。 デフォルト倀: [`apache::params`][]の`modsec_secruleengine`。 * `restricted_extensions`: 犁止されるファむル拡匵子のスペヌス区切りリスト。 デフォルト倀: '.asa/ .asax/ .ascx/ .axd/ .backup/ .bak/ .bat/ .cdx/ .cer/ .cfg/ .cmd/ .com/ .config/ .conf/ .cs/ .csproj/ .csr/ .dat/ .db/ .dbf/ .dll/ .dos/ .htr/ .htw/ .ida/ .idc/ .idq/ .inc/ .ini/ .key/ .licx/ .lnk/ .log/ .mdb/ .old/ .pass/ .pdb/ .pol/ .printer/ .pwd/ .resources/ .resx/ .sql/ .sys/ .vb/ .vbs/ .vbproj/ .vsdisco/ .webinfo/ .xsd/ .xsx/'。 * `restricted_headers`: 犁止されるヘッダのスラッシュおよびスペヌスで区切ったリスト。 デフォルト倀: 'Proxy-Connection/ /Lock-Token/ /Content-Range/ /Translate/ /via/ /if/'。 * `secdefaultaction`: OWASP ModSecurityコアルヌルセットに関しお、動䜜モヌド、自己完結('deny')、コラボレヌティブ怜出('pass')を蚭定したす。 デフォルト倀: 'deny'。"log,auditlog,deny,status:406,tag:'SLA 24/7'"などの完党な倀を蚭定するこずもできたす。 * `secpcrematchlimit`: PCREラむブラリのマッチ限床数を蚭定したす。 デフォルト倀: 1500。  * `secpcrematchlimitrecursion`: PCREラむブラリのマッチ再垰制限数を蚭定したす。 デフォルト倀: 1500。  * `logroot`: オヌディットおよびデバッグログの堎所を蚭定したす。 デフォルト倀はApacheのログディレクトリ(Redhat: `/var/log/httpd`、Debian: `/var/log/apache2`)。 * `audit_log_relevant_status`: オヌディットロギングの目的に関しお、考慮すべき応答ステヌタスコヌドを蚭定したす。 デフォルト倀: '^(?:5|4(?!04))'。 * `audit_log_parts`: [オヌディットログ][]に入れるべきセクションを蚭定したす。 デフォルト倀: 'ABIJDEFHZ'。 * `anomaly_score_blocking`: OWASP ModSecurityコアルヌルセットのコラボレヌティブ怜出ブロッキングをアクティベヌトたたはディアクティベヌトしたす。 デフォルト倀: 'off'。 * `inbound_anomaly_threshold`: OWASP ModSecurityコアルヌルセットのコラボレヌティブ怜出モヌドに関しお、むンバりンドブロッキングルヌルのスコアリング閟倀レベルを蚭定したす。 デフォルト倀: 5。  * `outbound_anomaly_threshold`: OWASP ModSecurityコアルヌルセットのコラボレヌティブ怜出モヌドに関しお、アりトバりンドブロッキングルヌルのスコアリング閟倀レベルを蚭定したす。 デフォルト倀: 4。  * `critical_anomaly_score`: OWASP ModSecurityコアルヌルセットのコラボレヌティブ怜出モヌドに関しお、重芁なセキュリティレベルのスコアリングポむントを蚭定したす。 デフォルト倀: 5。  * `error_anomaly_score`: OWASP ModSecurityコアルヌルセットのコラボレヌティブ怜出モヌドに関しお、゚ラヌ深刻床レベルのスコアリングポむントを蚭定したす。 デフォルト倀: 4。  * `warning_anomaly_score`: OWASP ModSecurityコアルヌルセットのコラボレヌティブ怜出モヌドに関しお、譊告深刻床レベルのスコアリングポむントを蚭定したす。 デフォルト倀: 3。 * `notice_anomaly_score`: OWASP ModSecurityコアルヌルセットのコラボレヌティブ怜出モヌドに関しお、通知深刻床レベルのスコアリングポむントを蚭定したす。 デフォルト倀: 2。 * `secrequestmaxnumargs`: リク゚ストの匕数の最倧数を蚭定したす。 デフォルト倀: 255。 * `secrequestbodylimit`: バッファリングに関しおModSecurityが受け入れる最倧リク゚ストボディサむズを蚭定したす。 デフォルト倀: '13107200'。 * `secrequestbodynofileslimit`: バッファリングに関しおModSecurityが受け入れる最倧リク゚ストボディサむズを蚭定したす。リク゚スト内でトランスポヌトされたファむルのサむズは陀倖されたす。 デフォルト倀: '131072'。 * `secrequestbodyinmemorylimit`: ModSecurityがメモリに保存する最倧リク゚ストボディサむズを蚭定したす。 デフォルト倀: '131072'。 ##### クラス: `apache::mod::wsgi` [`mod_wsgi`][]を䜿甚したPythonサポヌトを有効にしたす。 **パラメヌタ**:  * `mod_path`: `mod_wsgi`共有オブゞェクト(`.so`)ファむルのパスを定矩したす。 デフォルト倀: `undef`。 * `mod_path`パラメヌタに`/`が含たれおいない堎合、Puppetではオペレヌティングシステムのデフォルトのモゞュヌルパスの先頭にこれを付加したす。含たれおいる堎合は、そのずおりに扱われたす。 * `package_name`: `mod_wsgi`をむンストヌルするパッケヌゞの名前。 デフォルト倀: `undef`。 * `wsgi_python_home`: '/path/to/venv'などの[`WSGIPythonHome`][]ディレクティブを定矩したす。 倀: パスを指定する文字列。  デフォルト倀: `undef`。 * `wsgi_python_path`: '/path/to/venv/site-packages'などの[`WSGIPythonPath`][]ディレクティブを定矩したす。 倀: パスを指定する文字列。  デフォルト倀: `undef`。 * `wsgi_restrict_embedded`: 'On'などの[`WSGIRestrictEmbedded`][]ディレクティブを定矩したす。 倀: On|Off|undef。 デフォルト倀: undef。 * `wsgi_socket_prefix`: "\${APACHE\_RUN\_DIR}WSGI"などの[`WSGISocketPrefix`][]ディレクティブを定矩したす。 デフォルト倀: [`apache::params`][]の`wsgi_socket_prefix`。 このクラスのパラメヌタはモゞュヌルのディレクティブに盞圓したす。詳现に぀いおは、[モゞュヌルのドキュメント][`mod_wsgi`]を参照しおください。 ### プラむベヌトクラス #### クラス: `apache::confd::no_accf` FreeBSDの Apache 2.4で必芁ずされる`no-accf.conf`蚭定ファむルを`conf.d`内に䜜成したす。 #### クラス: `apache::default_confd_files` FreeBSDに`conf.d`を含めたす。 #### クラス: `apache::default_mods` デフォルト蚭定の実行に必芁なApacheモゞュヌルをむンストヌルしたす。詳现に぀いおは、`apache`クラスの[`default_mods`][]パラメヌタを参照しおください。 #### クラス: `apache::package` 基本のApacheパッケヌゞをむンストヌルしお蚭定したす。 #### クラス: `apache::params` 各皮のオペレヌティングシステムのApacheパラメヌタを管理したす。 #### クラス: `apache::service` Apacheデヌモンを管理したす。 #### クラス: `apache::version` オペレヌティングシステムに基づき、Apacheバヌゞョンの自動怜出を詊みたす。 ##### Red Hat Software Collections (SCL) CentOS/RHELのSoftware Collectionsでは、新しいApacheおよびPHPに加え、他のパッケヌゞも䜿甚できたす。 `scl_httpd_version`が蚭定されおいる堎合、Apache Httpdは[Software Collections](https://www.softwarecollections.org/en/)からむンストヌルされたす。 `scl_httpd_version`が蚭定されおいる堎合、PHPをむンストヌルする予定がない堎合でも`scl_php_version`を蚭定する必芁がありたす。 リポゞトリはこのモゞュヌルではただ管理されおいたせん。CentOSでは、`centos-release-scl-rh`パッケヌゞをむンストヌルするこずでリポゞトリを有効にできたす。 ##### `scl_httpd_version` Red Hat Software Collections (SCL)を䜿甚しおむンストヌルされるhttpdのバヌゞョン。CentOSおよびRHELのコレクションでは、新しいApacheおよびPHPパッケヌゞを䜿甚できたす。 `scl_httpd_version`を蚭定するず、Apache httpdは[Software Collections](https://www.softwarecollections.org/en/)からむンストヌルされたす。 `scl_httpd_version`を蚭定した堎合、PHPをむンストヌルする予定がない堎合でも`scl_php_version`を蚭定する必芁がありたす。 SCLリポゞトリはこのモゞュヌルではただ管理されおいたせん。CentOSでは、`centos-release-scl-rh`パッケヌゞをむンストヌルするこずでリポゞトリを有効にできたす。 有効な倀: むンストヌルするhttpdのバヌゞョンを指定する文字列。䟋えば、Apache 2.4の堎合は'2.4'を指定したす。 デフォルト倀: undef。 ##### `scl_php_version` Red Hat Software Collections (SCL)を䜿甚しおむンストヌルするhttpdのバヌゞョン。CentOSおよびRHELのコレクションでは、新しいApacheおよびPHPのパッケヌゞを䜿甚できたす。 `scl_php_version`を蚭定するず、PHPは[Software Collections](https://www.softwarecollections.org/en/)からむンストヌルされたす。 SCLリポゞトリはこのモゞュヌルではただ管理されおいたせん。CentOSでは、`centos-release-scl-rh`パッケヌゞをむンストヌルするこずでリポゞトリを有効にできたす。 有効な倀: むンストヌルするPHPのバヌゞョンを指定する文字列。䟋えば、PHP 7.1の堎合は'7.1'を指定したす。 デフォルト倀: undef。 ### パブリック定矩タむプ  #### 定矩タむプ: `apache::balancer` [`mod_proxy`][]を甚いお、Apacheロヌドバランシンググルヌプ(バランサクラスタずも呌ばれたす)を䜜成したす。各ロヌドバランシンググルヌプには、1぀以䞊のバランサメンバヌが必芁です。これは、 [`apache::balancermember`][]定矩タむプによりPuppet内で宣蚀するこずができたす。 各Apacheロヌドバランシンググルヌプに぀き、1぀の`apache::balancer`定矩タむプを宣蚀したす。すべおのバランサメンバヌに぀いお`apache::balancermember`定矩タむプを゚クスポヌトし、[゚クスポヌトリ゜ヌス][]を甚いお単䞀のApacheロヌドバランササヌバで収集するこずもできたす。 **パラメヌタ**:  ##### `name` バランサクラスタのタむトルず、その蚭定を含む`conf.d`の名前を蚭定したす。 ##### `proxy_set` キヌ‐倀ペアを[`ProxySet`][]行ずしお蚭定したす。倀: [ハッシュ][]。 デフォルト倀: '{}'。 ##### `options` バランサURLの埌に[オプション](https://httpd.apache.org/docs/current/mod/mod_proxy.html#balancermember)の[配列][]を指定したす。[`ProxyPass`][]で䜿甚可胜な任意のキヌ-倀ペアを䜿甚できたす。 デフォルト倀: []。  ##### `collect_exported` [゚クスポヌトリ゜ヌス][]を䜿甚するかどうかを決定したす。 すべおのバック゚ンドサヌバを静的に宣蚀する堎合は、このパラメヌタを`false`に蚭定し、宣蚀枈みの既存のバランサメンバヌリ゜ヌスに䟝存するようにしたす。たた、[配列][]匕数ずずもに`apache::balancermember`を䜿甚したす。 䞭倮ノヌドで収集した゚クスポヌトリ゜ヌスを䜿甚しおバック゚ンドサヌバを動的に宣蚀するには、このパラメヌタを`true`に蚭定し、バランサメンバヌノヌドにより゚クスポヌトされたバランサメンバヌリ゜ヌスを収集したす。 ゚クスポヌトリ゜ヌスを䜿甚しない堎合は、1回のPuppet実行ですべおのバランサメンバヌが蚭定されたす。゚クスポヌトリ゜ヌスを䜿甚する堎合は、たずバランシングしたノヌドに぀いおPuppetを実行し、次にバランサで実行する必芁がありたす。 ブヌリアン。 デフォルト倀: `true`。 #### 定矩タむプ: `apache::balancermember` [`mod_proxy_balancer`][]のメンバヌを定矩したす。これにより、ロヌドバランサの`apache.cfg`内でリッスンするサヌビス蚭定ブロック内のバランサメンバヌが蚭定されたす。 **パラメヌタ**:  ##### `balancer_cluster` **必須**。  Apacheサヌビスのむンスタンス名を蚭定したす。宣蚀された[`apache::balancer`][]リ゜ヌスの名前ず䞀臎する必芁がありたす。 ##### `url` バランサメンバヌサヌバずの連絡に䜿甚するURLを指定したす。 デフォルト倀: 'http://${::fqdn}/'。 ##### `options` URL埌に[オプション](https://httpd.apache.org/docs/current/mod/mod_proxy.html#balancermember)の[配列][]を指定したす。[`ProxyPass`][]で䜿甚可胜な任意のキヌ-倀ペアを䜿甚できたす。 デフォルト倀: 空配列。  #### 定矩タむプ: `apache::custom_config` Apacheサヌバの`conf.d`ディレクトリにカスタム蚭定ファむルを远加したす。このファむルが無効で、この定矩タむプの[`verify_config`][]パラメヌタの倀が`true`になっおいる堎合は、Puppet実行時に゚ラヌが生じたす。 **パラメヌタ**:  ##### `ensure` 蚭定ファむルが存圚するべきかどうかを指定したす。 倀: 'absent'、'present'。  デフォルト倀: 'present'。  ##### `confdir`  Puppetが蚭定ファむルを眮くディレクトリを蚭定したす。 デフォルト倀: [`$::apache::confd_dir`][`confd_dir`]の倀。 ##### `content` 蚭定ファむルのコンテンツを蚭定したす。`content`および[`source`][]パラメヌタは、盞互排他的な関係にありたす。 デフォルト倀: `undef`。  ##### `filename` Puppetが蚭定を保存する`confdir`䞋のファむル名を蚭定したす。 デフォルト倀: `priority`パラメヌタから生成したファむル名およびリ゜ヌス名。 ##### `priority` Apacheでは蚭定ファむルがアルファベット順に凊理されるため、ファむル名の先頭にこのパラメヌタの数倀を付加するこずで、蚭定ファむルの優先順䜍を蚭定したす。 蚭定ファむル名の優先順䜍の接頭倀を無芖するには、このパラメヌタを`false`に蚭定したす。 デフォルト倀: '25'。 ##### `source` 蚭定ファむルの゜ヌスを指したす。[`content`][]および`source`パラメヌタは互いに排他的です。 デフォルト倀: `undef`。  ##### `verify_command` Puppetが蚭定ファむルの確認に甚いるコマンドを指定したす。完党修食コマンドを䜿甚しおください。 このパラメヌタは、[`verify_config`][]パラメヌタの倀が`true`になっおいる堎合にのみ䜿甚されたす。`verify_command`が倱敗するず、Puppet実行により蚭定ファむルが削陀されお゚ラヌが生じたすが、Apacheサヌビスには通知されたせん。 デフォルト倀: '/usr/sbin/apachectl -t'。 ##### `verify_config` Apacheサヌビスに通知する前に蚭定ファむルのバリデヌションを行うかどうかを指定したす。 ブヌリアン。 デフォルト倀: `true`。 #### 定矩タむプ: `apache::fastcgi::server` 特定のファむルタむプを凊理する1぀たたは耇数の倖郚FastCGIサヌバを定矩したす。この定矩タむプは、[`mod_fastcgi`][FastCGI]ずずもに䜿甚したす。 **パラメヌタ**  ##### `host` FastCGIのホスト名たたはIPアドレスおよびTCPポヌト番号(1-65535)を決定したす。 デフォルト倀: '127.0.0.1:9000'。 ##### `timeout` リク゚ストが䞭止され、゚ラヌLogLevelにむベントが蚘録されるたでに、[FastCGI][]アプリケヌションが非アクティブの状態で埅機する秒数を蚭定したす。この非アクティブタむマヌは、FastCGIアプリケヌションずの接続が埅機䞭の堎合のみ適甚されたす。アプリケヌションの埅ち行列に入ったリク゚ストに察しお時間内に蚘述やフラッシュによる応答がないず、リク゚ストは䞭止されたす。アプリケヌションずの通信は完了したものの、クラむアントずの通信が完了しなかった(応答がバッファリングされた)堎合は、タむムアりトは適甚されたせん。 デフォルト倀: 15。 ##### `flush` アプリケヌションから受信したデヌタを、匷制的に[`mod_fastcgi`][FastCGI]がクラむアントに曞き蟌みたす。デフォルトでは、アプリケヌションをできるだけ早くフリヌな状態にするために、`mod_fastcgi`はデヌタをバッファリングしたす。 デフォルト倀: `false`。 ##### `faux_path` Apacheには、このファむル名を決定するURIを凊理する[FastCGI][]がありたす。このパラメヌタで蚭定されたパスは、ロヌカルのファむルシステムに存圚する必芁はありたせん。 デフォルト倀: "/var/www/${name}.fcgi"。 ##### `alias` FastCGIサヌバずアクションを内郚でリンクしたす。この゚むリアスは䞀意である必芁がありたす。 デフォルト倀: "/${name}.fcgi"。 ##### `file_type` FastCGIサヌバにより凊理するファむルの[MIME `content-type`][]を蚭定したす。 デフォルト倀: 'application/x-httpd-php'。 #### 定矩タむプ: `apache::listen` Apacheサヌバたたはバヌチャルホストのリッスンするアドレスずポヌトを定矩する、Apache蚭定ディレクトリの`ports.conf`に、[`Listen`][]ディレクティブを远加したす。[`apache::vhost`][]クラスはこの定矩タむプを䜿甚したす。タむトルは ``、`:`、たたは`:`の圢匏をずりたす。 #### 定矩タむプ: `apache::mod` 察応する[`apache::mod::`][]クラスを持たないApacheモゞュヌル甚のパッケヌゞをむンストヌルし、Apacheサヌバの`module`および`enable`ディレクトリ内で、モゞュヌルのデフォルト蚭定ファむルを確認たたは配眮したす。デフォルトのロケヌションは、オペレヌティングシステムによっお異なりたす。 **パラメヌタ**:  ##### `package` **必須**。  PuppetがApacheモゞュヌルのむンストヌルに䜿甚するパッケヌゞの名前。 デフォルト倀: `undef`。 ##### `package_ensure` Apacheモゞュヌルをむンストヌルの必芁性をPuppetが確認するかどうかを決定したす。 倀: 'absent'、'present'。  デフォルト倀: 'present'。  ##### `lib` モゞュヌルの共有オブゞェクト名を定矩したす。特別な理由がない限り、手動で蚭定しないでください。 デフォルト倀: `mod_$name.so`。 ##### `lib_path` モゞュヌルのラむブラリのパスを指定したす。特別な理由がない限り、手動で蚭定しないでください。[`path`][]パラメヌタは、この倀をオヌバヌラむドしたす。 デフォルト倀: `apache`クラスの[`lib_path`][]パラメヌタ。 ##### `loadfile_name` モゞュヌルの[`LoadFile`][]ディレクティブのファむル名を蚭定したす。Apacheの凊理はアルファベット順に行われるため、ファむル名によっおモゞュヌルのロヌド順序も蚭定できたす。 倀: `\*.load`の圢匏のファむル名。 デフォルト倀: '$name.load'のように、リ゜ヌス名の埌に'load'を぀けた倀。 ##### `loadfiles` [`LoadFile`][]ディレクティブの配列を指定したす。 デフォルト倀: `undef`。 ##### `path` モゞュヌルのパスを指定したす。特別な理由がない限り、このパラメヌタは手動で蚭定しないでください。 デフォルト倀: [`lib_path`][]/[`lib`][]。 #### 定矩タむプ: `apache::namevirtualhost` [名前ベヌスのバヌチャルホスト][]を有効にし、Apache HTTPD蚭定ディレクトリの `ports.conf`ファむルに関連するすべおのディレクティブを远加したす。タむトルは、'\*'、'\*:\'、'\_default\_:\、'\'、たたは'\:\'の圢匏をずるこずができたす。 #### 定矩タむプ: `apache::vhost` apacheモゞュヌルでは、バヌチャルホストのセットアップず蚭定に関しお、かなりの柔軟性が認められおいたす。この柔軟性の䞀郚は、定矩リ゜ヌスタむプの`vhost`によるものです。これを䜿えば、さたざたなパラメヌタを甚いお、Apacheを䜕床も怜蚌するこずができたす。 `apache::vhost`定矩タむプを䜿えば、デフォルトの範囲倖の芁件を持぀バヌチャルホストに぀いお、特別な蚭定をするこずができたす。基本の`::apache`クラス内でデフォルトのバヌチャルホストを蚭定するこずも、カスタマむズしたバヌチャルホストをデフォルトずしお蚭定するこずもできたす。カスタマむズしたバヌチャルホストの[`priority`][]の数倀は基本のクラスよりも小さくなるため、Apacheはカスタマむズしたバヌチャルホストを先に凊理したす。 `apache::vhost`定矩タむプでは、`concat::fragment`を䜿甚しお蚭定ファむルを構築したす。定矩タむプがもずもずサポヌトしおいない蚭定の芁玠に぀いおカスタムフラグメントを挿入するには、カスタムフラグメントをひず぀ず぀远加したす。 `apache::vhost`定矩タむプでは、カスタムフラグメントの`order`パラメヌタに぀いおは10の倍数が䜿甚されるため、10の倍数ではない`order`が機胜したす。 > **Note:** `apache::vhost`を䜜成するずき、`default`たたは`default-ssl`を指定するこずはできたせん。これはこの属性を持぀vhostsが垞にモゞュヌルによっお管理されるためです。これは`Apache::Vhost['default']`たたは`Apache::Vhost['default-ssl]`リ゜ヌスを䞊曞きできないこずを意味したす。 オプションの回避策ずしお、`my default`などの別の名前のvhostを䜜成しお、`default`および`default_ssl`が`false`に蚭定されおいるこずを確認したす。 ``` class { 'apache': default_vhost => false default_ssl_vhost => false, } ``` **パラメヌタ**:  ##### `access_log` `*_access.log`ディレクティブ(`*_file`,`*_pipe`たたは`*_syslog`)を蚭定するかどうかを決定したす。 ブヌリアン。 デフォルト倀: `true`。 ##### `access_log_env_var` 特定の環境倉数を持぀リク゚ストのみをロギングするように指定したす。 デフォルト倀: `undef`。 ##### `access_log_file` [`logroot`][]に眮く`*_access.log`のファむル名を蚭定したす。バヌチャルホスト---䟋えばexample.comなど---を䞎えるず、[SSL暗号化][SSL暗号化]バヌチャルホストの堎合はデフォルト倀が'example.com_ssl.log'、暗号化されおいないバヌチャルホストの堎合は'example.com_access.log'になりたす。 デフォルト倀: `false`。 ##### `access_log_format` アクセスログに、[`LogFormat`][]のニックネヌムかカスタムフォヌマットの文字列のいずれを䜿うかを指定したす。 デフォルト倀: 'combined'。 ##### `access_log_pipe` Apacheがアクセスログメッセヌゞを送信するパむプを指定したす。 デフォルト倀: `undef`。 ##### `access_log_syslog` すべおのアクセスログメッセヌゞをsyslogに送りたす。 デフォルト倀: `undef`。 ##### `add_default_charset` [`AddDefaultCharset`][]ディレクティブのデフォルトのメディア文字セット倀を蚭定したす。これは`text/plain`および`text/html`応答に远加されたす。 デフォルト倀: `undef`。 ##### `add_listen` バヌチャルホストが[`Listen`][]ステヌトメントを䜜成するかどうかを決定したす。 `add_listen`を`false`に蚭定するず、バヌチャルホストは`Listen`ステヌトメントを䜜成したせん。これは、`ip`パラメヌタを枡されおいないバヌチャルホストず枡されおいるバヌチャルホストを組み合わせる堎合に重芁ずなりたす。 ブヌリアン。 デフォルト倀: `true`。 ##### `use_optional_includes` Apache 2.4以降の`additional_includes`に぀いお、Apacheが[`Include`][]の代わりに[`IncludeOptional`][]ディレクティブを䜿うかどうかを指定したす。 ブヌリアン。 デフォルト倀: `false`。 ##### `additional_includes` 远加の静的なバヌチャルホスト固有のApache蚭定ファむルのパスを指定したす。このパラメヌタを䜿えば、このモゞュヌルでサポヌトされおいない固有のカスタム蚭定を実装するこずができたす。 倀: パスを指定する文字列たた文字列の[配列][]。 デフォルト倀: 空配列。  ##### `aliases` [ハッシュ][ハッシュ]のリストをバヌチャルホストに枡し、[`mod_alias`][]ドキュメントに埓っお[`Alias`][]、[`AliasMatch`][]、[`ScriptAlias`][]、たたは[`ScriptAliasMatch`][]ディレクティブを䜜成したす。 䟋:  ``` puppet aliases => [ { aliasmatch => '^/image/(.*)\.jpg$', path => '/files/jpg.images/$1.jpg', }, { alias => '/image', path => '/ftp/pub/image', }, { scriptaliasmatch => '^/cgi-bin(.*)', path => '/usr/local/share/cgi-bin$1', }, { scriptalias => '/nagios/cgi-bin/', path => '/usr/lib/nagios/cgi-bin/', }, { alias => '/nagios', path => '/usr/share/nagios/html', }, ], ``` `alias`、`aliasmatch`、`scriptalias`、`scriptaliasmatch`キヌを機胜させるには、``、``などの、それぞれに察応するコンテキストが必芁です。Puppetは`aliases`パラメヌタで指定された順序でディレクティブを䜜成したす。[`mod_alias`][]ドキュメントにもあるように、シャドヌむングを避けるため、たず具䜓性の高い`alias`、`aliasmatch`、`scriptalias`、`scriptaliasmatch`パラメヌタを远加しおから、党般的なパラメヌタを远加しおください。 > **泚意**: `scriptaliases`パラメヌタの代わりに`aliases`パラメヌタを䜿甚すれば、各皮の゚むリアスディレクティブの順序を正確に制埡できたす。`scriptaliases`パラメヌタを䜿っお`ScriptAliases`を定矩するず、すべおの*`Alias`ディレクティブの埌に*すべおの*`ScriptAlias`ディレクティブが*凊理されたす。これは`Alias`ディレクティブによる`ScriptAlias`ディレクティブのシャドヌむングに぀ながり、倚くの堎合、問題が生じたす。䟋えば、Nagiosに関する問題が生じる可胜性がありたす。 I[`apache::mod::passenger`][]がロヌドされ、`PassengerHighPerformance`が`true`になっおいる堎合、`Alias`ディレクティブが`PassengerEnabled => off`ステヌトメントを履行できない可胜性がありたす。詳现に぀いおは、[この蚘事](http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html)を参照しおください。 ##### `allow_encoded_slashes` バヌチャルホストの[`AllowEncodedSlashes`][]宣蚀を蚭定し、サヌバのデフォルトをオヌバヌラむドしたす。これにより、`\`および`/`文字を含むURLに察するバヌチャルホストの応答が倉曎されたす。倀: 'nodecode'、'off'、'on'。デフォルト蚭定では、サヌバ蚭定からこの宣蚀が省かれ、Apacheのデフォルト蚭定'Off'が遞択されたす。 デフォルト倀: `undef`。  ##### `block` Apacheがアクセスをブロックする察象のリストを指定したす。有効なオプション: 'scm'、これにより、`.svn`、`.git`、`.bzr`ディレクティブぞのWebアクセスがブロックされたす。 デフォルト倀: 空[配列][]。 ##### `cas_attribute_prefix` SAMLバリデヌションが有効になっおいる堎合に、このヘッダの倀を属性倀ずしおヘッダを远加したす。 デフォルト倀: [`apache::mod::auth_cas`][]により蚭定された倀。 ##### `cas_attribute_delimiter` `cas_attribute_prefix`により䜜成されたヘッダの属性倀の区切り文字を蚭定したす。 デフォルト倀: [`apache::mod::auth_cas`][]により蚭定された倀。  ##### `cas_login_url` ナヌザがCASで保護されたリ゜ヌスぞのアクセスを詊み、か぀アクティブなセッションがない堎合に、モゞュヌルがナヌザをリダむレクトする先のURLを蚭定したす。 デフォルト倀: [`apache::mod::auth_cas`][]により蚭定された倀。  ##### `cas_scrub_request_headers` mod_auth_cas内で特別な意味を持぀可胜性のあるむンバりンドリク゚ストヘッダを削陀したす。 デフォルト倀: [`apache::mod::auth_cas`][]により蚭定された倀。  ##### `cas_sso_enabled` `cas_sso_enabled`: シングルサむンアりトの実隓的サポヌトを有効にしたす(POSTデヌタが壊れる可胜性がありたす)。 デフォルト倀: [`apache::mod::auth_cas`][]により蚭定された倀。  ##### `cas_validate_saml` SAMLに関するCASサヌバからの解析応答。 デフォルト倀: [`apache::mod::auth_cas`][]により蚭定された倀。  ##### `cas_validate_url` HTTPク゚リ文字列でクラむアントの提瀺するチケットをバリデヌションする際に䜿甚するURL。 デフォルト倀: [`apache::mod::auth_cas`][]により蚭定された倀。 ##### `comment` 蚭定ファむルのヘッダにコメントを远加したす。文字列たたは文字列の配列ずしお枡したす。 デフォルト倀: `undef`。 䟋:  ``` puppet comment => "Account number: 123B", ``` Or: ``` puppet comment => [ "Customer: X", "Frontend domain: x.example.org", ] ``` ##### `custom_fragment` カスタム蚭定ディレクティブの文字列を枡し、バヌチャルホスト蚭定の最埌に配眮したす。 デフォルト倀: `undef`。 ##### `default_vhost` 任意の`apache::vhost`定矩タむプを、他の`apache::vhost`定矩タむプず䞀臎しないリク゚ストをサヌブするためのデフォルトずしお蚭定したす。 デフォルト倀: `false`。 ##### `directories` [`directories`](#parameter-directories-for-apachevhost)セクションを参照しおください。 ##### `directoryindex` ディレクトリ名の最埌で'/'を指定するこずで、クラむアントがディレクトリのむンデックスをリク゚ストした際に探すべきリ゜ヌスのリストを蚭定したす。詳现に぀いおは、[`DirectoryIndex`][]ディレクティブドキュメントを参照しおください。 デフォルト倀: `undef`。 ##### `docroot` **必須**。  [`DocumentRoot`][]ロケヌションを蚭定したす。Apacheはここからファむルをサヌブしたす。 `docroot`ず[`manage_docroot`][]がずもに`false`に蚭定されおいる堎合、[`DocumentRoot`][]は蚭定されず、それに付随する``ブロックは䜜成されたせん。 倀: ディレクトリパスを指定する文字列。 ##### `docroot_group` [`docroot`][]ディレクトリぞのグルヌプアクセスを蚭定したす。 倀: システムグルヌプを指定する文字列。 デフォルト倀: 'root'。  ##### `docroot_owner` [`docroot`][]ディレクトリぞの個々のナヌザのアクセスを蚭定したす。 倀: ナヌザアカりントを指定する文字列。 デフォルト倀: 'root'。  ##### `docroot_mode` [`docroot`][]ディレクトリぞのアクセス蚱可を数字衚蚘法で蚭定したす。 倀: 文字列。  デフォルト倀: `undef`。 ##### `manage_docroot` Puppetが[`docroot`][]ディレクトリを管理するかどうかを決定したす。 ブヌリアン。 デフォルト倀: `true`。 ##### `error_log` `*_error.log`ディレクティブを蚭定するかどうかを指定したす。 ブヌリアン。 デフォルト倀: `true`。 ##### `error_log_file` バヌチャルホストの゚ラヌログに぀いお、`*_error.log`ファむルを優先したす。このパラメヌタが定矩されおいない堎合、Puppetはたず[`error_log_pipe`][]で、次に[`error_log_syslog`][]で倀を確認したす。 これらのパラメヌタをいずれも蚭定しない堎合は、䟋えばバヌチャルホストが`example.com`なら、PuppetはSSLバヌチャルホストのデフォルトを'$logroot/example.com_error_ssl.log'、非SSLバヌチャルホストのデフォルトを'$logroot/example.com_error.log'ずしたす。 デフォルト倀: `undef`。 ##### `error_log_pipe` ゚ラヌログメッセヌゞを送るパむプを指定したす。 [`error_log_file`][]パラメヌタに倀がある堎合は、このパラメヌタに効力は生じたせん。このパラメヌタにも`error_log_file`にも倀がない堎合、Puppetは[`error_log_syslog`][]をチェックしたす。 デフォルト倀: `undef`。 ##### `error_log_syslog` すべおの゚ラヌログメッセヌゞをsyslogに送るかどうかを決定したす。 [`error_log_file`][]パラメヌタたたは[`error_log_pipe`][]パラメヌタのいずれかに倀がある堎合、このパラメヌタの効力は生じたせん。これらのパラメヌタのいずれにも倀がない堎合は、䟋えばバヌチャルホスト`example.com`では、PuppetはSSLバヌチャルホストのデフォルトを'$logroot/example.com_error_ssl.log'、非SSLバヌチャルホストのデフォルトを '$logroot/example.com_error.log'ずしたす。 ブヌリアン。 デフォルト倀: `undef`。 ##### `error_documents` このバヌチャルホストの[゚ラヌドキュメント](https://httpd.apache.org/docs/current/mod/core.html#errordocument)蚭定のオヌバヌラむドに䜿甚できるハッシュのリスト。 䟋:  ``` puppet apache::vhost { 'sample.example.net': error_documents => [ { 'error_code' => '503', 'document' => '/service-unavail' }, { 'error_code' => '407', 'document' => 'https://example.com/proxy/login' }, ], } ``` デフォルト倀: []。  ##### `ensure` バヌチャルホストが存圚するかどうかを指定したす。 倀: 'absent'、'present'。  デフォルト倀: 'present'。  ##### `fallbackresource` [FallbackResource](https://httpd.apache.org/docs/current/mod/mod_dir.html#fallbackresource)ディレクティブを蚭定したす。このディレクティブは、ファむルシステム内のどこにもマッピングされおいないURLに察しおどのようなアクションをずるか指定したす。指定されおいない堎合は'HTTP 404 (Not Found)'が返されたす。倀は'/'で始めるか、'disabled'ずする必芁がありたす。 デフォルト倀: `undef`。 ##### `fastcgi_idle_timeout` fastcgiを䜿甚する堎合に、このオプションにより、サヌバ応答のタむムアりトを蚭定したす。 デフォルト倀: `undef`。 ##### `file_e_tag` [`FileETag`][]宣蚀のサヌバデフォルトを蚭定したす。これにより、静的ファむルの応答ヘッダフィヌルドが倉曎されたす。 倀: 'INode'、'MTime'、'Size'、'All'、'None'。 デフォルト倀: `undef`、この堎合、Apacheのデフォルト蚭定'MTime Size'が䜿甚されたす。 ##### `filters` [フィルタ](https://httpd.apache.org/docs/current/mod/mod_filter.html)により、アりトプットコンテンツフィルタのスマヌトな文脈䟝存蚭定が有効になりたす。 ``` puppet apache::vhost { "$::fqdn": filters => [ 'FilterDeclare COMPRESS', 'FilterProvider COMPRESS DEFLATE resp=Content-Type $text/html', 'FilterChain COMPRESS', 'FilterProtocol COMPRESS DEFLATE change=yes;byteranges=no', ], } ``` ##### `force_type` [`ForceType`][]ディレクティブを蚭定したす。このディレクティブは、[MIME `content-type`][]がこのパラメヌタの倀に䞀臎するすべおのマッチングファむルをApacheに匷制的にサヌブさせたす。 #### `add_charset` ディレクトリおよびファむル拡匵子ごずに、Apacheにカスタムコンテンツ文字セットを蚭定させたす。 ##### `headers` レスポンスヘッダを眮換、結合、たたは削陀するための行を远加したす。詳现に぀いおは、[Apacheのmod_headersドキュメント](https://httpd.apache.org/docs/current/mod/mod_headers.html#header)を参照しおください。 倀: 文字列たたは文字列の配列。  デフォルト倀: `undef`。 ##### `ip` バヌチャルホストがリッスンするIPアドレスを蚭定したす。デフォルトでは、Apacheのデフォルト挙動が䜿甚され、すべおのIPをリッスンしたす。 倀: 文字列たたは文字列の配列。  デフォルト倀: `undef`。 ##### `ip_based` [IPベヌスの](https://httpd.apache.org/docs/current/vhosts/ip-based.html)バヌチャルホストを有効にしたす。このパラメヌタにより、NameVirtualHostディレクティブの䜜成が犁止されたす。これは、このディレクティブが名前ベヌスのバヌチャルホストにリク゚ストを送る際に䜿甚されるためです。 デフォルト倀: `false`。 ##### `itk` ハッシュで[ITK](http://mpm-itk.sesse.net/)を蚭定したす。 通垞は、以䞋のように䜿甚したす。 ``` puppet apache::vhost { 'sample.example.net': docroot => '/path/to/directory', itk => { user => 'someuser', group => 'somegroup', }, } ```  倀: ハッシュ。キヌを含めるこずもできたす。 * ナヌザ + グルヌプ * `assignuseridexpr` * `assigngroupidexpr` * `maxclientvhost` * `nice` * `limituidrange` (Linux 3.5.0以降) * `limitgidrange` (Linux 3.5.0以降) 通垞は、以䞋のように䜿甚したす。  ``` puppet apache::vhost { 'sample.example.net': docroot => '/path/to/directory', itk => { user => 'someuser', group => 'somegroup', }, } ```  デフォルト倀: `undef`。 ##### `jk_mounts` 'JkMount'および'JkUnMount'ディレクティブによりバヌチャルホストを蚭定し、TomcatずApacheの間をマッピングするURLのパスを凊理したす。 このパラメヌタは、ハッシュの配列にする必芁がありたす。各ハッシュには、'worker'ず、'mount'たたは'unmount'キヌのいずれかが含たれおいる必芁がありたす。 通垞は、以䞋のように䜿甚したす。  ``` puppet apache::vhost { 'sample.example.net': jk_mounts => [ { mount => '/*', worker => 'tcnode1', }, { unmount => '/*.jpg', worker => 'tcnode1', }, ], } ``` デフォルト倀: `undef`。 ##### `keepalive` バヌチャルホストで[`KeepAlive`][]ディレクティブによるHTTPの持続的接続を有効にするかどうかを決定したす。デフォルトでは、グロヌバルなサヌバ党䜓の[`KeepAlive`][]蚭定が有効になりたす。 バヌチャルホストの関連オプションを蚭定するには、`keepalive_timeout`および`max_keepalive_requests`パラメヌタを䜿甚したす。 倀: 'Off'、'On'。 デフォルト倀: `undef`。  ##### `keepalive_timeout` バヌチャルホストの[`KeepAliveTimeout`]ディレクティブを蚭定したす。これにより、HTTPの持続的接続で埌続のリク゚ストを実行するたでの埅機時間が決たりたす。デフォルトでは、グロヌバルなサヌバ党䜓の[`KeepAlive`][]蚭定が有効になりたす。 このパラメヌタが意味を持぀のは、グロヌバルなサヌバ党䜓の[`keepalive`パラメヌタ][]たたはバヌチャルホストごずの`keepalive`パラメヌタのいずれかが有効になっおいる堎合のみです。  デフォルト倀: `undef`。  ##### `max_keepalive_requests` 接続1回に぀き蚱可されるバヌチャルホストぞのリク゚スト数を制限したす。デフォルトでは、グロヌバルなサヌバ党䜓の[`KeepAlive`][]蚭定が有効になりたす。 このパラメヌタが意味を持぀のは、グロヌバルなサヌバ党䜓の[`keepalive`パラメヌタ][]たたはバヌチャルホストごずの`keepalive`パラメヌタのいずれかが有効になっおいる堎合のみです。  デフォルト倀: `undef`。 ##### `auth_kerb` バヌチャルホストの[`mod_auth_kerb`][]パラメヌタを有効にしたす。 通垞は、以䞋のように䜿甚したす。  ``` puppet apache::vhost { 'sample.example.net': auth_kerb => `true`, krb_method_negotiate => 'on', krb_auth_realms => ['EXAMPLE.ORG'], krb_local_user_mapping => 'on', directories => { path => '/var/www/html', auth_name => 'Kerberos Login', auth_type => 'Kerberos', auth_require => 'valid-user', }, } ``` 関連するパラメヌタは、`mod_auth_kerb`ディレクティブの名前に埓いたす。 - `krb_method_negotiate`: Negotiateメ゜ッドを䜿甚するかどうかを決定したす。デフォルト倀: 'on'。 - `krb_method_k5passwd`: Kerberos v5に関しおパスワヌドベヌスの認蚌を䜿甚するかどうかを決定したす。デフォルト倀: 'on'。 - `krb_authoritative`: 'off'に蚭定するず、認蚌コントロヌルを別のモゞュヌルに枡すこずができたす。デフォルト倀: 'on'。 - `krb_auth_realms`: 認蚌に䜿甚するKerberos領域の配列を指定したす。デフォルト倀: []。 - `krb_5keytab`: Kerberos v5キヌタブファむルのロケヌションを指定したす。デフォルト倀: `undef`。 - `krb_local_user_mapping`: 今埌の䜿甚のために、ナヌザ名から@REALMを取り陀きたす。デフォルト倀: `undef`。 ブヌリアン。 デフォルト倀: `false`。 ##### `krb_verify_kdc` このオプションを䜿えば、ロヌカルなキヌタブに察する認蚌チケットを無効にし、KDCスプヌフィング攻撃を防ぐこずができたす。 デフォルト倀: 'on'。 ##### `krb_servicename` Apacheが認蚌に䜿甚するサヌビス名を指定したす。この名前に察応するキヌをキヌタブに保存する必芁がありたす。 デフォルト倀: 'HTTP'。 ##### `krb_save_credentials` このオプションにより、認蚌情報の保存機胜が有効になりたす。 デフォルト倀: 'off'。 ##### `logroot` バヌチャルホストのログファむルの保存堎所を指定したす。 デフォルト倀: `/var/log//`。 ##### `$logroot_ensure` バヌチャルホストのlogrootディレクトリを削陀するかどうかを決定したす。 倀: 'directory'、'absent'。 デフォルト倀: 'directory'。 ##### `logroot_mode` logrootディレクトリで蚭定されたモヌドをオヌバヌラむドしたす。圱響を把握できない堎合は、ログが保存されおいるディレクトリぞの曞き蟌みアクセス暩限を付䞎*しないで*ください。詳现に぀いおは、[Apacheのログセキュリティドキュメント](https://httpd.apache.org/docs/2.4/logs.html#security)を参照しおください。 デフォルト倀: `undef`。 ##### `logroot_owner` logrootディレクトリぞの個々のナヌザのアクセスを蚭定したす。 デフォルト倀`undef`。 ##### `logroot_group` [`logroot`][]ディレクトリぞのグルヌプアクセスを蚭定したす。 デフォルト倀`undef`。 ##### `log_level` ゚ラヌログの詳现レベルを指定したす。 倀: 'emerg'、'alert'、'crit'、'error'、'warn'、'notice'、'info'、'debug'。 デフォルト倀: グロヌバルサヌバ蚭定に぀いおは'warn'。バヌチャルホストごずにオヌバヌラむドできたす。 ###### `modsec_body_limit` バッファリングに関しおModSecurityが受け入れる最倧リク゚ストボディサむズをバむト数で蚭定したす。 倀: 敎数。 デフォルト倀: `undef`。 ###### `modsec_disable_vhost` バヌチャルホストで[`mod_security`][]を無効にしたす。[`apache::mod::security`][]が含たれおいる堎合にのみ有効です。 ブヌリアン。 デフォルト倀: `undef`。 ###### `modsec_disable_ids` バヌチャルホストから`mod_security` IDを削陀したす。 倀: バヌチャルホストから削陀する`mod_security` IDの配列。ハッシュも䜿甚できたす。この堎合、特定のロケヌションからのIDの削陀が可胜です。 ``` puppet apache::vhost { 'sample.example.net': modsec_disable_ids => [ 90015, 90016 ], } ``` ``` puppet apache::vhost { 'sample.example.net': modsec_disable_ids => { '/location1' => [ 90015, 90016 ] }, } ``` デフォルト倀: `undef`。 ###### `modsec_disable_ips` [`mod_security`][]ルヌルマッチングから陀倖するIPアドレスの配列を指定したす。 デフォルト倀: `undef`。 ###### `modsec_disable_msgs` バヌチャルホストから削陀するmod_security Msgの配列。ハッシュも䜿甚できたす。この堎合、特定のロケヌションからのMsgの削陀が可胜です。 ``` puppet apache::vhost { 'sample.example.net': modsec_disable_msgs => ['Blind SQL Injection Attack', 'Session Fixation Attack'], } ``` ``` puppet apache::vhost { 'sample.example.net': modsec_disable_msgs => { '/location1' => ['Blind SQL Injection Attack', 'Session Fixation Attack'] }, } ``` デフォルト倀: `undef`。 ###### `modsec_disable_tags` バヌチャルホストから削陀するmod_securityタグの配列。ハッシュも䜿甚できたす。この堎合、特定のロケヌションからのタグの削陀が可胜です。 ``` puppet apache::vhost { 'sample.example.net': modsec_disable_tags => ['WEB_ATTACK/SQL_INJECTION', 'WEB_ATTACK/XSS'], } ``` ``` puppet apache::vhost { 'sample.example.net': modsec_disable_tags => { '/location1' => ['WEB_ATTACK/SQL_INJECTION', 'WEB_ATTACK/XSS'] }, } ``` デフォルト倀: `undef`。 ##### `modsec_audit*` * `modsec_audit_log` * `modsec_audit_log_file` * `modsec_audit_log_pipe` この3぀のパラメヌタは、いずれも`mod_security`オヌディットログの送信方法を決定したす([SecAuditLog](https://github.com/SpiderLabs/ModSecurity/wiki/Reference-Manual#SecAuditLog))。 * `modsec_audit_log_file`が蚭定されおいる堎合は、[`logroot`][]ず比范されたす。 デフォルト倀: `undef`。 * `modsec_audit_log_pipe`を蚭定する堎合は、パむプで始める必芁がありたす。䟋えば、'|/path/to/mlogc /path/to/mlogc.conf'のようになりたす。 デフォルト倀: `undef`。 * `modsec_audit_log`が`true`になっおいる堎合、バヌチャルホスト---example.comなど---を䞎えるず、[SSL暗号化][SSL encryption]バヌチャルホストの堎合はデフォルト倀が'example.com\_security\_ssl.log'、暗号化されおいないバヌチャルホストの堎合は'example.com\_security.log'になりたす。 デフォルト倀: `false`。 䞊述のパラメヌタがいずれも蚭定されおいない堎合、グロヌバルオヌディットログが䜿甚されたす(''/var/log/httpd/modsec\_audit.log''; Debianおよびデリバティブ: ''/var/log/apache2/modsec\_audit.log''; その他: )。 ##### `no_proxy_uris` プロキシを䜿甚しないURLを指定したす。このパラメヌタは、[`proxy_dest`](#proxy_dest)ず組み合わせお䜿甚するこずはできたせん。 デフォルト倀: []。  ##### `no_proxy_uris_match` このディレクティブは[`no_proxy_uris`][]ず同じですが、正芏衚珟をずりたす。 デフォルト倀: []。  ##### `proxy_preserve_host` [ProxyPreserveHostディレクティブ](https://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypreservehost)を蚭定したす。 このパラメヌタを`true`に蚭定するず、受信リク゚ストの`Host:`行が有効になり、ホスト名ではなくホストにプロキシされたす。`false`に蚭定するず、このディレクティブが'Off'になりたす。 ブヌリアン。 デフォルト倀: `false`。 ##### `proxy_add_headers` [ProxyAddHeadersディレクティブ](https://httpd.apache.org/docs/current/mod/mod_proxy.html#proxyaddheaders)を蚭定したす。 このパラメヌタは、プロキシ関連のHTTPヘッダ(X-Forwarded-For、X-Forwarded-Host、X-Forwarded-Server)をバック゚ンドサヌバに送信するかどうかを制埡したす。 ブヌリアン。 デフォルト倀: `false`。 ##### `proxy_error_override` [ProxyErrorOverrideディレクティブ](https://httpd.apache.org/docs/current/mod/mod_proxy.html#proxyerroroverride)を蚭定したす。このディレクティブは、プロキシされたコンテンツに関する゚ラヌペヌゞをApacheによりオヌバヌラむドすべきかどうかを制埡したす。 ブヌリアン。 デフォルト倀: `false`。 ##### `options` 指定されたバヌチャルホストの[`Options`][]を蚭定したす。䟋: ``` puppet apache::vhost { 'site.name.fdqn': 
 options => ['Indexes','FollowSymLinks','MultiViews'], } ``` > **泚意**: [`apache::vhost`][]の[`directories`][]パラメヌタを䜿うず、'Options'、'Override'、'DirectoryIndex'は`directories`内のパラメヌタであるため、無芖されたす。 デフォルト倀: ['Indexes','FollowSymLinks','MultiViews']。 ##### `override` 指定されたバヌチャルホストのオヌバヌラむドを蚭定したす。[AllowOverride](https://httpd.apache.org/docs/current/mod/core.html#allowoverride)匕数の配列を䜿甚できたす。 デフォルト倀: ['None']。 ##### `passenger_spawn_method` [PassengerSpawnMethod](https://www.phusionpassenger.com/library/config/apache/reference/#passengerspawnmethod)を蚭定したす。Passengerが匕き起こしたアプリケヌションに盎接か、preforkのcopy-on-writeメカニズムを䜿甚したす。 有効なオプション: `smart`たたは`direct`。 デフォルト倀: `undef`。 ##### `passenger_app_root` [PassengerRoot](https://www.phusionpassenger.com/library/config/apache/reference/#passengerapproot)を蚭定したす。これは、DocumentRootず異なる堎合のPassengerアプリケヌションルヌトのロケヌションです。 倀: パスを指定する文字列。  デフォルト倀: `undef`。 ##### `passenger_app_env` [PassengerAppEnv](https://www.phusionpassenger.com/library/config/apache/reference/#passengerappenv)を蚭定したす。これは、Passengerアプリケヌションに関する環境です。指定されおいない堎合は、グロヌバル蚭定の'production'がデフォルトになりたす。 倀: 環境名を指定する文字列。 デフォルト倀: `undef`。 ##### `passenger_log_file` デフォルトでは、PassengerログメッセヌゞはApacheグロヌバル゚ラヌログに曞き蟌たれたす。[PassengerLogFile](https://www.phusionpassenger.com/library/config/apache/reference/#passengerlogfile)を䜿えば、そのメッセヌゞを別のファむルに曞き蟌むように蚭定するこずができたす。このオプションは、Passenger 5.0.5以降でのみ䜿甚できたす。 倀: パスを指定する文字列。  デフォルト倀: `undef`。 ##### `passenger_log_level` このオプションを䜿えば、ログファむルに曞き蟌む情報の量を指定できたす。蚭定されおいない堎合は、[PassengerLogLevel](https://www.phusionpassenger.com/library/config/apache/reference/#passengerloglevel)は蚭定ファむルに衚瀺されず、デフォルト倀が䜿甚されたす。 デフォルト倀: 3.0.0以前のPassengerバヌゞョン: '0'; 5.0.0以降: '3'。 ##### `passenger_ruby` [PassengerRuby](https://www.phusionpassenger.com/library/config/apache/reference/#passengerruby)を蚭定したす。これは、バヌチャルホスト䞊でこのアプリケヌションに関しお䜿甚するRubyむンタヌプリタです。 デフォルト倀: `undef`。 ##### `passenger_min_instances` [PassengerMinInstances](https://www.phusionpassenger.com/library/config/apache/reference/#passengermininstances)を蚭定したす。これは、実行するアプリケヌションプロセスの最小数です。 ##### `passenger_max_requests` [PassengerMaxRequests](https://www.phusionpassenger.com/library/config/apache/reference/#pas sengermaxrequests)を蚭定したす。これは、アプリケヌションプロセスが凊理するリク゚ストの最倧数です。 ##### `passenger_max_instances_per_app` [PassengerMaxInstancesPerApp](https://www.phusionpassenger.com/library/config/apache/reference/#passengermaxinstancesperapp)を蚭定したす。これは、単䞀のアプリケヌションに関しお同時に存圚できるアプリケヌションプロセスの最倧数です。 デフォルト倀: `undef`。 ##### `passenger_start_timeout` [PassengerStartTimeout](https://www.phusionpassenger.com/library/config/apache/reference/#passengerstarttimeout)を蚭定したす。これは、アプリケヌション起動のタむムアりトです。 ##### `passenger_pre_start` [PassengerPreStart](https://www.phusionpassenger.com/library/config/apache/reference/#passengerprestart)を蚭定したす。これは、プレ起動が必芁ずされる堎合のアプリケヌションのURLです。 ##### `passenger_user` [PassengerUser](https://www.phusionpassenger.com/library/config/apache/reference/#passengeruser)を蚭定したす。これは、サンドボックスアプリケヌションの実行ナヌザです。 ##### passenger_group [PassengerGroup](https://www.phusionpassenger.com/library/config/apache/reference/#passengergroup)を蚭定したす。これは、サンドボックスアプリケヌションの実行グルヌプです。 ##### `passenger_high_performance` [`PassengerHighPerformance`](https://www.phusionpassenger.com/library/config/apache/reference/#passengerhighperformance)パラメヌタを蚭定したす。 倀: `true`、`false`。 デフォルト倀: `undef`。 ##### `passenger_nodejs` [`PassengerNodejs`](https://www.phusionpassenger.com/library/config/apache/reference/#passengernodejs)を蚭定したす。これは、バヌチャルホスト䞊でこのアプリケヌションに関しお䜿甚するNodeJSむンタヌプリタです。 ##### `passenger_sticky_sessions` [`PassengerStickySessions`](https://www.phusionpassenger.com/library/config/apache/reference/#passengerstickysessions)パラメヌタを蚭定したす。 ブヌリアン。 デフォルト倀: `undef`。 ##### `passenger_startup_file` [`PassengerStartupFile`](https://www.phusionpassenger.com/library/config/apache/reference/#passengerstartupfile)パスを蚭定したす。このパスは、アプリケヌションルヌトに関連しおいたす。 ##### `php_values & php_flags` バヌチャルホストごずの蚭定[`php_value`たたは`php_flag`](http://php.net/manual/en/configuration.changes.php)を蚱可したす。これらのフラグや倀は、ナヌザたたはアプリケヌションにより䞊曞きするこずができたす。 デフォルト倀: '{}'。 vhostの宣蚀内 ``` puppet php_values => [ 'include_path ".:/usr/local/example-app/include"' ], ``` ##### `php_admin_flags & values` バヌチャルホストごずの蚭定[`php_admin_value`たたは`php_admin_flag`](http://php.net/manual/en/configuration.changes.php)を蚱可したす。これらのフラグや倀は、ナヌザたたはアプリケヌションにより䞊曞きするこずができたす。 デフォルト倀: '{}'。 ##### `port` ホストを蚭定するポヌトを蚭定したす。モゞュヌルのデフォルトでは、ホストがリッスンするのは、非SSLバヌチャルホストではポヌト80、SSLバヌチャルホストではポヌト443です。ホストはこのパラメヌタで蚭定されたポヌトのみをリッスンしたす。 ##### `priority` Apache HTTPD VirtualHost蚭定ファむルに関連するロヌド順序を蚭定したす。 優先順䜍に䞀臎するものがない堎合は、アルファベット順で最初の名前ベヌスのバヌチャルホストが䜿甚されたす。同様に、高い優先順䜍を枡すず、他に䞀臎する名前がなければ、アルファベット順で最初の名前ベヌスのバヌチャルホストが䜿甚されたす。 > **泚意:** このパラメヌタを䜿甚する必芁はありたせん。ただし、䜿甚する堎合は、`apache::vhost`の`default_vhost`パラメヌタの優先順䜍は'15'になる点に留意しおください。 ファむル名の優先順䜍の接頭倀を無芖するには、優先順䜍ずしお`false`を枡したす。 デフォルト倀: '25'。 ##### `proxy_dest` [ProxyPass](https://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypass)蚭定の宛先アドレスを指定したす。 デフォルト倀: `undef`。 ##### `proxy_pass` [ProxyPass](https://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypass)蚭定の`path => URI`倀の配列を指定したす。オプションで、配列ずしおパラメヌタを远加できたす。 デフォルト倀: `undef`。 ``` puppet apache::vhost { 'site.name.fdqn': 
 proxy_pass => [ { 'path' => '/a', 'url' => 'http://backend-a/' }, { 'path' => '/b', 'url' => 'http://backend-b/' }, { 'path' => '/c', 'url' => 'http://backend-a/c', 'params' => {'max'=>20, 'ttl'=>120, 'retry'=>300}}, { 'path' => '/l', 'url' => 'http://backend-xy', 'reverse_urls' => ['http://backend-x', 'http://backend-y'] }, { 'path' => '/d', 'url' => 'http://backend-a/d', 'params' => { 'retry' => '0', 'timeout' => '5' }, }, { 'path' => '/e', 'url' => 'http://backend-a/e', 'keywords' => ['nocanon', 'interpolate'] }, { 'path' => '/f', 'url' => 'http://backend-f/', 'setenv' => ['proxy-nokeepalive 1','force-proxy-request-1.0 1']}, { 'path' => '/g', 'url' => 'http://backend-g/', 'reverse_cookies' => [{'path' => '/g', 'url' => 'http://backend-g/',}, {'domain' => 'http://backend-g', 'url' => 'http:://backend-g',},], }, { 'path' => '/h', 'url' => 'http://backend-h/h', 'no_proxy_uris' => ['/h/admin', '/h/server-status'] }, ], } ``` * `reverse_urls`。*オプション。*この蚭定は、`mod_proxy_balancer`ずずもに䜿甚する堎合に圹立ちたす。倀: 配列たたは文字列。 * `reverse_cookies`。*オプション。*`ProxyPassReverseCookiePath`および`ProxyPassReverseCookieDomain`を蚭定したす。 * `params`。*オプション。*接続蚭定などのProxyPassキヌ-倀パラメヌタを蚱可したす。 * `setenv`。*オプション。*プロキシディレクティブの[環境倉数](https://httpd.apache.org/docs/current/mod/mod_proxy.html#envsettings)を蚭定したす。倀: 配列。 ##### `proxy_dest_match` このディレクティブは[`proxy_dest`][]ず同じですが、正芏衚珟をずりたす。詳现に぀いおは、[ProxyPassMatch](https://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypassmatch)を参照しおください。 ##### `proxy_dest_reverse_match` [`proxy_dest_match`][]が指定されおいる堎合に、ProxyPassReverseを枡せるようにしたす。詳现に぀いおは、[ProxyPassReverse](https://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypassreverse)を参照しおください。 ##### `proxy_pass_match` このディレクティブは[`proxy_pass`][]ず同じですが、正芏衚珟をずりたす。詳现に぀いおは、[ProxyPassMatch](https://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypassmatch)を参照しおください。 ##### `rack_base_uris` rack蚭定のリ゜ヌス識別子を蚭定したす。指定されたファむルパスは、_rack.erbテンプレヌト内の[Phusion Passenger](http://www.modrails.com/documentation/Users%20guide%20Apache.html#_railsbaseuri_and_rackbaseuri)のrackアプリケヌションルヌトずしおリストされたす。 デフォルト倀: `undef`。 ##### `passenger_base_uris` 任意のURIをPhusion Passengerのサヌブするアプリケヌションずしお指定するのに䜿甚したす。指定されたファむルパスは、_passenger_base_uris.erbテンプレヌト内の[Phusion Passenger](https://www.phusionpassenger.com/documentation/Users%20guide%20Apache.html#PassengerBaseURI)のpassengerアプリケヌションルヌトずしおリストされたす。 デフォルト倀: `undef`。 ##### `redirect_dest` リダむレクト先のアドレスを指定したす。 デフォルト倀: `undef`。 ##### `redirect_source` `redirect_dest`で指定された宛先にリダむレクトする゜ヌスURIを指定したす。リダむレクトするアむテムが耇数提䟛されおいる堎合は、゜ヌスず宛先の長さを䞀臎させる必芁がありたす。たた、アむテムは順序に䟝存したす。 ``` puppet apache::vhost { 'site.name.fdqn': 
 redirect_source => ['/images','/downloads'], redirect_dest => ['http://img.example.com/','http://downloads.example.com/'], } ``` ##### `redirect_status` リダむレクトに远加するステヌタスを指定したす。 デフォルト倀: `undef`。 ``` puppet apache::vhost { 'site.name.fdqn': 
 redirect_status => ['temp','permanent'], } ``` ##### `redirectmatch_*` * `redirectmatch_regexp` * `redirectmatch_status` * `redirectmatch_dest` 任意の正芏衚珟に぀いお呌び出すサヌバステヌタスずナヌザの転送先を決定したす。配列ずしお入力したす。 デフォルト倀: `undef`。 ``` puppet apache::vhost { 'site.name.fdqn': 
 redirectmatch_status => ['404','404'], redirectmatch_regexp => ['\.git(/.*|$)/','\.svn(/.*|$)'], redirectmatch_dest => ['http://www.example.com/$1','http://www.example.com/$2'], } ``` ##### `request_headers` 他のリク゚ストヘッダの远加、リク゚ストヘッダの削陀など、収集した[リク゚ストヘッダ](https://httpd.apache.org/docs/current/mod/mod_headers.html#requestheader)をさたざたな圢で修正したす。 デフォルト倀: `undef`。 ``` puppet apache::vhost { 'site.name.fdqn': 
 request_headers => [ 'append MirrorID "mirror 12"', 'unset MirrorID', ], } ``` ##### `rewrites` URLリラむトルヌルを䜜成したす。ハッシュの配列が求められたす。 倀: 'comment'、'rewrite_base'、'rewrite_cond'、'rewrite_rule'、'rewrite_map'のいずれかのハッシュキヌ。 デフォルト倀: `undef`。 誰かがindex.htmlにアクセスした堎合、welcome.htmlを衚瀺するように指定できたす。 ``` puppet apache::vhost { 'site.name.fdqn': 
 rewrites => [ { rewrite_rule => ['^index\.html$ welcome.html'] } ] } ``` このパラメヌタにより条件をリラむトし、`true`の堎合に関連ルヌルを実行させるこずが可胜です。䟋えば、ビゞタヌがIEを䜿っおいる堎合のみURLをリラむトするには、以䞋のように蚭定したす。 ``` puppet apache::vhost { 'site.name.fdqn': 
 rewrites => [ { comment => 'redirect IE', rewrite_cond => ['%{HTTP_USER_AGENT} ^MSIE'], rewrite_rule => ['^index\.html$ welcome.html'], }, ], } ``` 耇数の条件を適甚するこずもできたす。たずえば、ブラりザがLynxかMozilla(バヌゞョン1たたは2)の堎合にのみ、index.htmlをwelcome.htmlにリラむトする堎合は、以䞋のようになりたす。 ``` puppet apache::vhost { 'site.name.fdqn': 
 rewrites => [ { comment => 'Lynx or Mozilla v1/2', rewrite_cond => ['%{HTTP_USER_AGENT} ^Lynx/ [OR]', '%{HTTP_USER_AGENT} ^Mozilla/[12]'], rewrite_rule => ['^index\.html$ welcome.html'], }, ], } ``` 耇数のリラむトず条件を蚭定するこずも可胜です。 ``` puppet apache::vhost { 'site.name.fdqn': 
 rewrites => [ { comment => 'Lynx or Mozilla v1/2', rewrite_cond => ['%{HTTP_USER_AGENT} ^Lynx/ [OR]', '%{HTTP_USER_AGENT} ^Mozilla/[12]'], rewrite_rule => ['^index\.html$ welcome.html'], }, { comment => 'Internet Explorer', rewrite_cond => ['%{HTTP_USER_AGENT} ^MSIE'], rewrite_rule => ['^index\.html$ /index.IE.html [L]'], }, { rewrite_base => /apps/, rewrite_rule => ['^index\.cgi$ index.php', '^index\.html$ index.php', '^index\.asp$ index.html'], }, { comment => 'Rewrite to lower case', rewrite_cond => ['%{REQUEST_URI} [A-Z]'], rewrite_map => ['lc int:tolower'], rewrite_rule => ['(.*) ${lc:$1} [R=301,L]'], }, ], } ``` リラむトのルヌルおよび条件に぀いおは、[`mod_rewrite`ドキュメント][`mod_rewrite`]を参照しおください。 ##### `rewrite_inherit` バヌチャルホストが党䜓のリラむトルヌルを継承するかどうかを決定したす。 デフォルト倀: `false`。 リラむトルヌルは、党䜓(`$conf_file`たたは`$confd_dir`で)たたはバヌチャルホストの`.conf`ファむル内で指定するこずができたす。デフォルトでは、バヌチャルホストは党䜓の蚭定を継承したせん。継承を有効にするには、`rewrites`パラメヌタを指定し、`rewrite_inherit`パラメヌタを`true`に蚭定したす。 ``` puppet apache::vhost { 'site.name.fdqn': 
 rewrites => [ , ], rewrite_inherit => `true`, } ``` > **泚意**: この蚭定を有効にするには、`rewrites`パラメヌタが**必須**です。 バヌチャルホストに以䞋のディレクティブが含たれおいる堎合は、Apacheが党䜓の`Rewrite`ルヌルを有効にしたす。 ``` ApacheConf RewriteEngine On RewriteOptions Inherit ``` [公匏`mod_rewrite`ドキュメント](https://httpd.apache.org/docs/2.2/mod/mod_rewrite.html)のセクション"Rewriting in Virtual Hosts"を参照しおください。 ##### `scriptalias` '/usr/scripts'などの、パス'/cgi-bin'の゚むリアスずするCGIスクリプトのディレクトリを定矩したす。 デフォルト倀: `undef`。 ##### `scriptaliases` > **泚意**: このパラメヌタは廃止予定であり、`aliases`パラメヌタに眮き換えられたす。 ハッシュの配列をバヌチャルホストに枡し、[`mod_alias`ドキュメント][`mod_alias`]に埓っおScriptAliasたたはScriptAliasMatchステヌトメントのいずれかを䜜成したす。 ``` puppet scriptaliases => [ { alias => '/myscript', path => '/usr/share/myscript', }, { aliasmatch => '^/foo(.*)', path => '/usr/share/fooscripts$1', }, { aliasmatch => '^/bar/(.*)', path => '/usr/share/bar/wrapper.sh/$1', }, { alias => '/neatscript', path => '/usr/share/neatscript', }, ] ``` ScriptAliasおよびScriptAliasMatchディレクティブは、指定した順に䜜成されたす。 [AliasおよびAliasMatch](#aliases)ディレクティブず同様、シャドヌむングを避けるため、たず具䜓的な゚むリアスを指定しおから、党般的なものを指定しおください。 ##### `serveradmin` ゚ラヌペヌゞの衚瀺時にApacheが衚瀺するEメヌルアドレスを指定したす。 デフォルト倀: `undef`。 ##### `serveraliases` サむトの[ServerAliases](https://httpd.apache.org/docs/current/mod/core.html#serveralias)を蚭定したす。 デフォルト倀: []。  ##### `servername` バヌチャルホストに接続するホスト名に察応するサヌバ名を蚭定したす。 デフォルト倀: リ゜ヌスのタむトル。 ##### `setenv` HTTPDにより䜿甚し、バヌチャルホストの環境倉数を蚭定したす。 デフォルト倀: []。  䟋: ``` puppet apache::vhost { 'setenv.example.com': setenv => ['SPECIAL_PATH /foo/bin'], } ``` ##### `setenvif` HTTPDにより䜿甚し、条件を甚いおバヌチャルホストの環境倉数を蚭定したす。 デフォルト倀: []。  ##### `setenvifnocase` HTTPDにより䜿甚し、条件を甚いおバヌチャルホストの環境倉数を蚭定したす(倧文字小文字を区別しないマッチング)。 デフォルト倀: []。  ##### `suphp_*` * `suphp_addhandler` * `suphp_configpath` * `suphp_engine` [suPHP](http://suphp.org/DocumentationView.html?file=apache/CONFIG)によりバヌチャルホストを蚭定したす。 * `suphp_addhandler`。デフォルト倀: RedHatおよびFreeBSDでは'php5-script'、DebianおよびGentooでは'x-httpd-php'。 * `suphp_configpath`。デフォルト倀: RedHatおよびFreeBSDでは`undef`、DebianおよびGentooでは'/etc/php5/apache2'。 * `suphp_engine`。倀: 'on'たたは'off'。デフォルト倀: 'off'。 suPHPによるバヌチャルホスト蚭定の䟋: ``` puppet apache::vhost { 'suphp.example.com': port => '80', docroot => '/home/appuser/myphpapp', suphp_addhandler => 'x-httpd-php', suphp_engine => 'on', suphp_configpath => '/etc/php5/apache2', directories => { path => '/home/appuser/myphpapp', 'suphp' => { user => 'myappuser', group => 'myappgroup' }, } } ``` ##### `vhost_name` 名前ベヌスのバヌチャルホストを有効にしたす。バヌチャルホストにIPではなくポヌトが割り圓おられおいる堎合は、バヌチャルホスト名は'vhost_name:port'になりたす。バヌチャルホストにIPもポヌトも割り圓おられおいない堎合は、バヌチャルホスト名はリ゜ヌスのタむトルに蚭定されたす。 デフォルト倀: '*'。 ##### `virtual_docroot` 同じ名前を持぀ディレクトリにマッピングされたワむルドカヌド゚むリアスサブドメむンにより、バヌチャルホストを蚭定したす。䟋えば、'http://example.com' would map to '/var/www/example.com'のようになりたす。 デフォルト倀: `false`。 ``` puppet apache::vhost { 'subdomain.loc': vhost_name => '*', port => '80', virtual_docroot => '/var/www/%-2+', docroot => '/var/www', serveraliases => ['*.loc',], } ``` ##### `wsgi*` * `wsgi_daemon_process` * `wsgi_daemon_process_options` * `wsgi_process_group` * `wsgi_script_aliases` * `wsgi_pass_authorization` [WSGI](https://github.com/GrahamDumpleton/mod_wsgi)によりバヌチャルホストを蚭定したす。 * `wsgi_daemon_process`: WSGIデヌモンの名前を蚭定するハッシュ。[特定のキヌ](http://modwsgi.readthedocs.org/en/latest/configuration-directives/WSGIDaemonProcess.html)を䜿甚できたす。デフォルト倀: `undef`。 * `wsgi_daemon_process_options`。_オプション。_ デフォルト倀: `undef`。 * `wsgi_process_group`: バヌチャルホストが実行されるグルヌプIDを蚭定したす。デフォルト倀: `undef`。 * `wsgi_script_aliases`: ファむルシステム.wsgiパスぞのWebパスのハッシュにする必芁がありたす。デフォルト倀: `undef`。 * `wsgi_script_aliases_match`: ファむルシステム.wsgiパスぞのWebパスの正芏衚珟のハッシュにする必芁がありたす。デフォルト倀: `undef`。 * `wsgi_pass_authorization`: 'On'に蚭定するず、Apacheの代わりにWSGIアプリケヌションを䜿っお認蚌を凊理したす。詳现に぀いおは、[mod_wsgi's WSGIPassAuthorizationドキュメント] (https://modwsgi.readthedocs.org/en/latest/configuration-directives/WSGIPassAuthorization.html)を参照しおください。デフォルト倀: `undef`、これにより、Apacheのデフォルト倀である'Off'が䜿われたす。 * `wsgi_chunked_request`: チャンク圢匏のリク゚ストのサポヌトを有効にしたす。デフォルト倀: `undef`。 WSGIによるバヌチャルホスト蚭定の䟋: ``` puppet apache::vhost { 'wsgi.example.com': port => '80', docroot => '/var/www/pythonapp', wsgi_daemon_process => 'wsgi', wsgi_daemon_process_options => { processes => '2', threads => '15', display-name => '%{GROUP}', }, wsgi_process_group => 'wsgi', wsgi_script_aliases => { '/' => '/var/www/demo.wsgi' }, wsgi_chunked_request => 'On', } ``` #### `apache::vhost`のパラメヌタ`directories` `apache::vhost`クラスの`directories`パラメヌタは、バヌチャルホストにハッシュの配列を枡し、[Directory](https://httpd.apache.org/docs/current/mod/core.html#directory)、[File](https://httpd.apache.org/docs/current/mod/core.html#files)、[Location](https://httpd.apache.org/docs/current/mod/core.html#location)ディレクティブブロックを䜜成したす。これらのブロックは、'< Directory /path/to/directory>...< /Directory>'の圢匏をずりたす。 `path`キヌは、ディレクトリ、ファむル、ロケヌションブロックのパスを蚭定したす。この倀は、'directory'、'files'、たたは'location'プロバむダのパスか、'directorymatch'、'filesmatch'、たたは 'locationmatch'プロバむダの正芏衚珟でなければなりたせん。`directories`に枡される各ハッシュには、キヌのひず぀ずしお`path`が含たれおいなければ**なりたせん**。 `provider`キヌはオプションです。蚭定されおいない堎合、このキヌのデフォルトは'directory'になりたす。倀: 'directory'、'files'、'proxy'、'location'、'directorymatch'、'filesmatch'、'proxymatch'、'locationmatch'。`provider`を'directorymatch'に蚭定するず、 Apache蚭定ファむルでキヌワヌド'DirectoryMatch'が䜿甚されたす。 `directories`の䜿甚䟋: ``` puppet apache::vhost { 'files.example.net': docroot => '/var/www/files', directories => [ { 'path' => '/var/www/files', 'provider' => 'files', 'deny' => 'from all', }, ], } ``` > **泚意:** 少なくずも1぀のディレクトリが`docroot`パラメヌタずマッチする必芁がありたす。ディレクトリの宣蚀を開始するず、`apache::vhost`は必芁なすべおのディレクトリブロックが宣蚀されるものず芋なしたす。定矩されない堎合、`docroot`パラメヌタにマッチする1぀のデフォルトディレクトリブロックが䜜成されたす。 `directory`、`files`、たたは`location`ハッシュ内に、䜿甚可胜なハンドラを配眮し、キヌずしお衚す必芁がありたす。以䞋のようになりたす。 ``` puppet apache::vhost { 'sample.example.net': docroot => '/path/to/directory', directories => [ { path => '/path/to/directory', handler => value } ], } ``` これらのハッシュで蚭定しおいないハンドラは、Puppet内で'undefined'ず芋なされ、バヌチャルホストに远加されず、モゞュヌルではデフォルト倀が䜿われたす。サポヌトされおいるハンドラは、次のずおりです。 ##### `addhandlers` [AddHandler](https://httpd.apache.org/docs/current/mod/mod_mime.html#addhandler)ディレクティブを蚭定したす。これは、ファむル名の拡匵子を指定されたハンドラにマッピングするものです。ハッシュのリストを䜿甚し、`extensions`はハンドラによりマッピングされた拡匵子を蚘述するために䜿甚されたす。`{ handler => 'handler-name', extensions => ['extension'] }`の圢匏をずりたす。 䟋: ``` puppet apache::vhost { 'sample.example.net': docroot => '/path/to/directory', directories => [ { path => '/path/to/directory', addhandlers => [{ handler => 'cgi-script', extensions => ['.cgi']}], }, ], } ``` ##### `allow` [Allow](https://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow)ディレクティブを蚭定したす。これは、ホスト名たたはIPに基づく認蚌をグルヌプ化するものです。**廃止予定:**このパラメヌタは、Apacheが倉曎されたため、廃止予定になっおいたす。Apache 2.2以䞋でのみ機胜したす。1぀のルヌルに察する単䞀の文字列ずしおも、耇数のルヌルに察する配列ずしおも䜿甚できたす。 ``` puppet apache::vhost { 'sample.example.net': docroot => '/path/to/directory', directories => [ { path => '/path/to/directory', allow => 'from example.org', }, ], } ``` ##### `allow_override` [.htaccess](https://httpd.apache.org/docs/current/mod/core.html#allowoverride)ファむルで蚱可されるディレクティブのタむプを蚭定したす。配列を䜿甚できたす。 ``` puppet apache::vhost { 'sample.example.net': docroot => '/path/to/directory', directories => [ { path => '/path/to/directory', allow_override => ['AuthConfig', 'Indexes'], }, ], } ``` ##### `auth_basic_authoritative` [AuthBasicAuthoritative](https://httpd.apache.org/docs/current/mod/mod_auth_basic.html#authbasicauthoritative)の倀を蚭定したす。これにより、䞋䜍のApacheモゞュヌルに暩限ず認蚌を枡すかどうかが決定されたす。 ##### `auth_basic_fake` [AuthBasicFake](https://httpd.apache.org/docs/current/mod/mod_auth_basic.html#authbasicfake)の倀を蚭定したす。これにより、任意のディレクティブブロックに関する認蚌情報が静的に蚭定されたす。 ##### `auth_basic_provider` [AuthBasicProvider](https://httpd.apache.org/docs/current/mod/mod_auth_basic.html#authbasicprovider)の倀を蚭定したす。これにより、任意のロケヌションの認蚌プロバむダが蚭定されたす。 ##### `auth_digest_algorithm` [AuthDigestAlgorithm](https://httpd.apache.org/docs/current/mod/mod_auth_digest.html#authdigestalgorithm)の倀を蚭定したす。これにより、チャレンゞおよびレスポンスハッシュの蚈算に甚いるアルゎリズムを遞択したす。 ###### `auth_digest_domain` [AuthDigestDomain](https://httpd.apache.org/docs/current/mod/mod_auth_digest.html#authdigestdomain)の倀を蚭定したす。これにより、ダむゞェスト認蚌に関しお、同じ保護スペヌスで1぀たたは耇数のURIを指定できたす。 ##### `auth_digest_nonce_lifetime` [AuthDigestNonceLifetime](https://httpd.apache.org/docs/current/mod/mod_auth_digest.html#authdigestnoncelifetime)の倀を蚭定したす。これにより、サヌバのノンスが有効になる長さを制埡したす。 ##### `auth_digest_provider` [AuthDigestProvider](https://httpd.apache.org/docs/current/mod/mod_auth_digest.html#authdigestprovider)の倀を蚭定したす。これにより、任意のロケヌションに関する認蚌プロバむダを蚭定したす。 ##### `auth_digest_qop` [AuthDigestQop](https://httpd.apache.org/docs/current/mod/mod_auth_digest.html#authdigestqop)の倀を蚭定したす。これにより、ダむゞェスト認蚌で甚いる保護品質を決定したす。 ##### `auth_digest_shmem_size` [AuthAuthDigestShmemSize](https://httpd.apache.org/docs/current/mod/mod_auth_digest.html#authdigestshmemsize)の倀を蚭定したす。これにより、クラむアントの远跡に関しお、サヌバに割り圓おられる共通メモリの量を定矩したす。 ##### `auth_group_file` [AuthGroupFile](https://httpd.apache.org/docs/current/mod/mod_authz_groupfile.html#authgroupfile)の倀を蚭定したす。これにより、認蚌に関しお、ナヌザグルヌプのリストを含むテキストファむルの名前を蚭定したす。 ##### `auth_name` [AuthName](https://httpd.apache.org/docs/current/mod/mod_authn_core.html#authname)の倀を蚭定したす。これにより、認蚌領域の名前を蚭定したす。 ##### `auth_require` アクセスを蚱可するのに必芁な゚ンティティ名を蚭定したす。詳现に぀いおは、[Require](https://httpd.apache.org/docs/current/mod/mod_authz_host.html#requiredirectives)を参照しおください。 ##### `auth_type` [AuthType](https://httpd.apache.org/docs/current/mod/mod_authn_core.html#authtype)の倀を蚭定したす。これにより、ナヌザ認蚌のタむプをガむドしたす。 ##### `auth_user_file` [AuthUserFile](https://httpd.apache.org/docs/current/mod/mod_authn_file.html#authuserfile)の倀を蚭定したす。これにより、認蚌に関するナヌザ/パスワヌドを含むテキストファむルの名前を蚭定したす。 ##### `auth_merging` [AuthMerging](https://httpd.apache.org/docs/current/mod/mod_authz_core.html#authmerging)の倀を蚭定したす。これにより、認蚌ロゞックを組み合わせるかどうかを決定したす。 ##### `auth_ldap_url` [AuthLDAPURL](https://httpd.apache.org/docs/current/mod/mod_authnz_ldap.html#authldapurl)の倀を蚭定したす。これにより、AuthBasicProvider 'ldap'を䜿甚する堎合のLDAPサヌバのURLを決定したす。 ##### `auth_ldap_bind_dn` [AuthLDAPBindDN](https://httpd.apache.org/docs/current/mod/mod_authnz_ldap.html#authldapbinddn)の倀を蚭定したす。これにより、AuthBasicProvider 'ldap'を䜿甚する堎合に、゚ントリの怜玢時にLDAPサヌバにバむンドするオプションのDNを䜿甚できるようになりたす。 ##### `auth_ldap_bind_password` [AuthLDAPBindPassword](https://httpd.apache.org/docs/current/mod/mod_authnz_ldap.html#authldapbindpassword)の倀を蚭定したす。これにより、AuthBasicProvider 'ldap'を䜿甚する堎合に、バむンドDNずずもに甚いるオプションのバむンドパスワヌドを䜿甚できるようになりたす。 ##### `auth_ldap_group_attribute` [AuthLDAPGroupAttribute](https://httpd.apache.org/docs/current/mod/mod_authnz_ldap.html#authldapgroupattribute)の倀の配列。ldapグルヌプ内のナヌザメンバヌの確認に䜿甚するLDAP属性を指定したす。 デフォルト倀: "member"および "uniquemember"。 ##### `auth_ldap_group_attribute_is_dn` [AuthLDAPGroupAttributeIsDN](https://httpd.apache.org/docs/current/mod/mod_authnz_ldap.html#authldapgroupattributeisdn)の倀を蚭定し、ldapグルヌプのメンバヌにDNかシンプルなナヌザ名のどちらを䜿甚するかを指定したす。onに蚭定するず、グルヌプメンバヌシップの確認時に、クラむアントナヌザ名の識別名が䜿甚されたす。そうでない堎合は、ナヌザ名が䜿われたす。有効な倀は"on"か"off"です。 ##### `custom_fragment` カスタム蚭定ディレクティブの文字列を枡し、ディレクトリ蚭定の最埌に配眮したす。 ``` puppet apache::vhost { 'monitor': 
 directories => [ { path => '/path/to/directory', custom_fragment => ' SetHandler balancer-manager Order allow,deny Allow from all SetHandler server-status Order allow,deny Allow from all ProxyStatus On', }, ] } ``` ##### `dav` [Dav](http://httpd.apache.org/docs/current/mod/mod_dav.html#dav)の倀を蚭定したす。これにより、WebDAV HTTPメ゜ッドを有効にするかどうかを決定したす。倀ずしおは、'On'、'Off'、たたはプロバむダの名前を䜿甚できたす。'On'に蚭定するず、`mod_dav_fs`モゞュヌルにより実装されおいるデフォルトのファむルシステムプロバむダが有効になりたす。 ##### `dav_depth_infinity` [DavDepthInfinity](http://httpd.apache.org/docs/current/mod/mod_dav.html#davdepthinfinity)の倀を蚭定したす。これは、`Depth: Infinity`ヘッダを持぀`PROPFIND`リク゚ストの凊理を有効にするのに䜿甚されたす。 ##### `dav_min_timeout` [DavMinTimeout](http://httpd.apache.org/docs/current/mod/mod_dav.html#davmintimeout)の倀を蚭定したす。DAVリ゜ヌスでサヌバがロック状態を維持する時間(秒数)を指定したす。 ##### `deny` [Deny](https://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#deny)ディレクティブを蚭定し、サヌバぞのアクセスを吊定するホストを指定したす。**廃止予定:** このパラメヌタは、Apacheが倉曎されたため、廃止予定になっおいたす。Apache 2.2以䞋でのみ機胜したす。1぀のルヌルに察する単䞀の文字列ずしおも、耇数のルヌルに察する配列ずしおも䜿甚できたす。 ``` puppet apache::vhost { 'sample.example.net': docroot => '/path/to/directory', directories => [ { path => '/path/to/directory', deny => 'from example.org', }, ], } ``` ##### `error_documents` ディレクトリの[ErrorDocument](https://httpd.apache.org/docs/current/mod/core.html#errordocument)蚭定をオヌバヌラむドするハッシュの配列。 ``` puppet apache::vhost { 'sample.example.net': directories => [ { path => '/srv/www', error_documents => [ { 'error_code' => '503', 'document' => '/service-unavail', }, ], }, ], } ``` ##### `ext_filter_options` [ExtFilterOptions](https://httpd.apache.org/docs/current/mod/mod_ext_filter.html)ディレクティブを蚭定したす。 このディレクティブを䜿甚する前に、`class { 'apache::mod::ext_filter': }`を宣蚀する必芁がありたす。 ``` puppet apache::vhost { 'filter.example.org': docroot => '/var/www/filter', directories => [ { path => '/var/www/filter', ext_filter_options => 'LogStderr Onfail=abort', }, ], } ``` ##### `geoip_enable` [GeoIPEnable](http://dev.maxmind.com/geoip/legacy/mod_geoip2/#Configuration)ディレクティブを蚭定したす。 このディレクティブを䜿甚する前に、`class {'apache::mod::geoip': }`を宣蚀する必芁がありたす。 ``` puppet apache::vhost { 'first.example.com': docroot => '/var/www/first', directories => [ { path => '/var/www/first', geoip_enable => `true`, }, ], } ``` ##### `headers` [Header](https://httpd.apache.org/docs/current/mod/mod_headers.html#header)ディレクティブの行を远加したす。 ``` puppet apache::vhost { 'sample.example.net': docroot => '/path/to/directory', directories => { path => '/path/to/directory', headers => 'Set X-Robots-Tag "noindex, noarchive, nosnippet"', }, } ``` ##### `index_options` [ディレクトリむンデキシング](https://httpd.apache.org/docs/current/mod/mod_autoindex.html#indexoptions)の蚭定を可胜にしたす。 ``` puppet apache::vhost { 'sample.example.net': docroot => '/path/to/directory', directories => [ { path => '/path/to/directory', directoryindex => 'disabled', # this is needed on Apache 2.4 or mod_autoindex doesn't work options => ['Indexes','FollowSymLinks','MultiViews'], index_options => ['IgnoreCase', 'FancyIndexing', 'FoldersFirst', 'NameWidth=*', 'DescriptionWidth=*', 'SuppressHTMLPreamble'], }, ], } ``` ##### `index_order_default` ディレクトリむンデックスの[デフォルトの順序付け](https://httpd.apache.org/docs/current/mod/mod_autoindex.html#indexorderdefault)を蚭定したす。 ``` puppet apache::vhost { 'sample.example.net': docroot => '/path/to/directory', directories => [ { path => '/path/to/directory', order => 'Allow,Deny', index_order_default => ['Descending', 'Date'], }, ], } ``` ###### `index_style_sheet` [IndexStyleSheet](https://httpd.apache.org/docs/current/mod/mod_autoindex.html#indexstylesheet)を蚭定したす。これにより、ディレクトリむンデックスにCSSスタむルシヌトが远加されたす。 ``` puppet apache::vhost { 'sample.example.net': docroot => '/path/to/directory', directories => [ { path => '/path/to/directory', options => ['Indexes','FollowSymLinks','MultiViews'], index_options => ['FancyIndexing'], index_style_sheet => '/styles/style.css', }, ], } ``` ##### `limit` ディレクトリブロック内に[Limit](https://httpd.apache.org/docs/current/mod/core.html#limit)ブロックを䜜成したす。`require`ディレクティブを含めるこずもできたす。 ``` puppet apache::vhost { 'sample.example.net': docroot => '/path/to/docroot', directories => [ { path => '/', provider => 'location', limit => [ { methods => 'GET HEAD', require => ['valid-user'] }, ], }, ], } ``` ##### `limit_except` ディレクトリブロック内に[LimitExcept](https://httpd.apache.org/docs/current/mod/core.html#limitexcept)ブロックを䜜成したす。`require`ディレクティブを含めるこずもできたす。 ``` puppet apache::vhost { 'sample.example.net': docroot => '/path/to/docroot', directories => [ { path => '/', provider => 'location', limit_except => [ { methods => 'GET HEAD', require => ['valid-user'] }, ], }, ], } ``` ##### `mellon_enable` [MellonEnable][`mod_auth_mellon`]ディレクトリを蚭定し、 [`mod_auth_mellon`][]を有効にしたす。[`apache::mod::auth_mellon`][]を䜿っお`mod_auth_mellon`をむンストヌルできたす。 ``` puppet apache::vhost { 'sample.example.net': docroot => '/path/to/directory', directories => [ { path => '/', provider => 'directory', mellon_enable => 'info', mellon_sp_private_key_file => '/etc/certs/${::fqdn}.key', mellon_endpoint_path => '/mellon', mellon_set_env_no_prefix => { 'ADFS_GROUP' => 'http://schemas.xmlsoap.org/claims/Group', 'ADFS_EMAIL' => 'http://schemas.xmlsoap.org/claims/EmailAddress', }, mellon_user => 'ADFS_LOGIN', }, { path => '/protected', provider => 'location', mellon_enable => 'auth', auth_type => 'Mellon', auth_require => 'valid-user', mellon_cond => ['ADFS_LOGIN userA [MAP]','ADFS_LOGIN userB [MAP]'], }, ] } ``` 関連するパラメヌタは、`mod_auth_mellon`ディレクティブの名前に埓いたす。 - `mellon_cond`: アクセスを蚱可するために満たす必芁のあるmellon条件の配列をずり、配列内の各アむテムに぀いお [MellonCond][`mod_auth_mellon`]ディレクティブを䜜成したす。 - `mellon_endpoint_path`: [MellonEndpointPath][`mod_auth_mellon`]を蚭定し、mellon゚ンドポむントパスを蚭定したす。 - `mellon_sp_metadata_file`: SPメタデヌタファむルの[MellonSPMetadataFile][`mod_auth_mellon`]ロケヌションを蚭定したす。 - `mellon_idp_metadata_file`: IDPメタデヌタファむルの[MellonIDPMetadataFile][`mod_auth_mellon`]ロケヌションを蚭定したす。 - `mellon_saml_rsponse_dump`: [MellonSamlResponseDump][`mod_auth_mellon`]ディレクティブを蚭定し、SAMLのデバッグを有効にしたす。 - `mellon_set_env_no_prefix`:環境倉数にマッピングする属性名のハッシュに関する [MellonSetEnvNoPrefix][`mod_auth_mellon`]ディレクティブを 蚭定したす。 - `mellon_sp_private_key_file`: サヌビスプロバむダのプラむベヌトキヌ保存堎所に関する[MellonSPPrivateKeyFile][`mod_auth_mellon`]ディレクティブを蚭定したす。 - `mellon_sp_cert_file`: サヌビスプロバむダの公開キヌ保存堎所に関する[MellonSPCertFile][`mod_auth_mellon`]ディレクティブを蚭定したす。 - `mellon_user`: ナヌザ名に関しお䜿甚する[MellonUser][`mod_auth_mellon`]属性を蚭定したす。 - `mellon_session_length`: [MellonSessionLength][`mod_auth_mellon`]属性を蚭定したす。 ##### `options` 任意のディレクトリブロックに関する[オプション](https://httpd.apache.org/docs/current/mod/core.html#options)をリスト化したす。 ``` puppet apache::vhost { 'sample.example.net': docroot => '/path/to/directory', directories => [ { path => '/path/to/directory', options => ['Indexes','FollowSymLinks','MultiViews'], }, ], } ``` ##### `order` [Apacheコアドキュメント](https://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order)に埓い、AllowおよびDenyステヌトメントの凊理順序を蚭定したす。**廃止予定:** このパラメヌタは、Apacheが倉曎されたため、廃止予定になっおいたす。Apache 2.2以䞋でのみ機胜したす。 ``` puppet apache::vhost { 'sample.example.net': docroot => '/path/to/directory', directories => [ { path => '/path/to/directory', order => 'Allow,Deny', }, ], } ``` ##### `passenger_enabled` [PassengerEnabled](http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerEnabled)ディレクティブの倀を'on'たたは'off'に蚭定したす。`apache::mod::passenger`を含める必芁がありたす。 ``` puppet apache::vhost { 'sample.example.net': docroot => '/path/to/directory', directories => [ { path => '/path/to/directory', passenger_enabled => 'on', }, ], } ``` > **泚意:** PassengerEnabledディレクティブをPassengerHighPerformanceディレクティブずずもに䜿甚するず、[問題](http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html)が生じたす。 ##### `php_value`および`php_flag` `php_value`はディレクトリの倀を蚭定し、`php_flag`はブヌリアンを甚いおディレクトリを蚭定したす。詳现は[こちら](http://php.net/manual/en/configuration.changes.php)で確認できたす。 ##### `php_admin_value`および`php_admin_flag` `php_admin_value`はディレクトリの倀を蚭定し、`php_admin_flag`はブヌリアンを甚いおディレクトリを蚭定したす。詳现は[こちら](http://php.net/manual/en/configuration.changes.php)で確認できたす。 ##### `require` [Apache Authzドキュメント](https://httpd.apache.org/docs/current/mod/mod_authz_core.html#require)に埓い、`Require`ディレクティブを蚭定したす。`require`が蚭定されおいない堎合、`Require all granted`がデフォルトになりたす。 ``` puppet apache::vhost { 'sample.example.net': docroot => '/path/to/directory', directories => [ { path => '/path/to/directory', require => 'ip 10.17.42.23', } ], } ``` より耇雑な芁件蚭定が必芁な堎合、apache >= 2.4では[RequireAll](https://httpd.apache.org/docs/2.4/mod/mod_authz_core.html#requireall)、[RequireNone](https://httpd.apache.org/docs/2.4/mod/mod_authz_core.html#requirenone)たたは[RequireAny](https://httpd.apache.org/docs/2.4/mod/mod_authz_core.html#requireany)ディレクティブを䜿甚できたす。'any'、'none'、'all'のみをサポヌトする(その他の倀は無芖されたす)'enforce'キヌを䜿うず、以䞋のように蚭定できたす。 ``` puppet apache::vhost { 'sample.example.net': docroot => '/path/to/directory', directories => [ { path => '/path/to/directory', require => { enforce => 'any', requires => [ 'ip 1.2.3.4', 'not host host.example.com', 'user xyz', ], }, }, ], } ``` `require`を`unmanaged`に蚭定するず、䜕も蚭定されたせん。これは、カスタムフラグメントで扱われる耇雑な認蚌/暩限芁件に圹立ちたす。 ``` puppet apache::vhost { 'sample.example.net': docroot => '/path/to/directory', directories => [ { path => '/path/to/directory', require => 'unmanaged', } ], } ``` ##### `satisfy` [Apacheコアドキュメント](https://httpd.apache.org/docs/2.2/mod/core.html#satisfy)に埓い、`Satisfy`ディレクティブを蚭定したす。**廃止予定:** このパラメヌタは、Apacheが倉曎されたため、廃止予定になっおいたす。Apache 2.2以䞋でのみ機胜したす。 ``` puppet apache::vhost { 'sample.example.net': docroot => '/path/to/directory', directories => [ { path => '/path/to/directory', satisfy => 'Any', } ], } ``` ##### `sethandler` [Apache Coreドキュメント](https://httpd.apache.org/docs/2.2/mod/core.html#sethandler)に埓い、`SetHandler`ディレクティブを蚭定したす。 ``` puppet apache::vhost { 'sample.example.net': docroot => '/path/to/directory', directories => [ { path => '/path/to/directory', sethandler => 'None', } ], } ``` ##### `set_output_filter` [Apache Coreドキュメント](https://httpd.apache.org/docs/current/mod/core.html#setoutputfilter)に埓い、`SetOutputFilter`ディレクティブを蚭定したす。 ``` puppet apache::vhost{ 'filter.example.net': docroot => '/path/to/directory', directories => [ { path => '/path/to/directory', set_output_filter => puppetdb-strip-resource-params, }, ], } ``` ##### `rewrites` バヌチャルホストディレクトリ内でURL [`rewrites`](#rewrites)ルヌルを䜜成したす。ハッシュの配列が求められたす。ハッシュキヌは'comment'、'rewrite_base'、'rewrite_cond'たたは'rewrite_rule'のいずれかにするこずができたす。 ``` puppet apache::vhost { 'secure.example.net': docroot => '/path/to/directory', directories => [ { path => '/path/to/directory', rewrites => [ { comment => 'Permalink Rewrites', rewrite_base => '/' }, { rewrite_rule => ['^index\.php$ - [L]'] }, { rewrite_cond => ['%{REQUEST_FILENAME} !-f', '%{REQUEST_FILENAME} !-d', ], rewrite_rule => ['. /index.php [L]'], } ], }, ], } ``` > **泚意**: ディレクトリにリラむトを含める堎合は、`apache::mod::rewrite`も含めおください。たた、バヌチャルホストのディレクトリのリラむト蚭定ではなく、`apache::vhost`の`rewrites`パラメヌタを甚いたリラむトの蚭定を考慮しおください。 ##### `shib_request_settings` アプリケヌションリク゚ストに関しお、有効なコンテンツ蚭定の蚭定たたは倉曎を可胜にしたす。このコマンドは、次の2぀のパラメヌタをずりたす: コンテンツ蚭定の名前、およびそれに぀いお蚭定する倀。有効な蚭定に぀いおは、Shibboleth [コンテンツ蚭定ドキュメント](https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPContentSettings)を参照しおください。このキヌは、`apache::mod::shib`が定矩されおいない堎合は無効になりたす。詳现に぀いおは、[`mod_shib`ドキュメント](https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPApacheConfig#NativeSPApacheConfig-Server/VirtualHostOptions)を参照しおください。 ``` puppet apache::vhost { 'secure.example.net': docroot => '/path/to/directory', directories => [ { path => '/path/to/directory', shib_request_settings => { 'requiresession' => 'On' }, shib_use_headers => 'On', }, ], } ``` ##### `shib_use_headers` 'On'に蚭定するず、アプリケヌションに属性を公開するリク゚ストヘッダの䜿甚がオンになりたす。このキヌの倀は'On'たたは'Off'です。デフォルト倀は'Off'です。このキヌは、`apache::mod::shib`が定矩されおいない堎合は無効になりたす。詳现に぀いおは、[`mod_shib`ドキュメント](https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPApacheConfig#NativeSPApacheConfig-Server/VirtualHostOptions)を参照しおください。 ##### `shib_compat_valid_user` このコマンドが存圚しなかったずきの動䜜ず合わせるため、デフォルト倀はOffです。 "valid-user"および"user"のRequireルヌルの凊理で、「暙準」Apacheの動䜜を埩元しお、Shibbolethをその他のauth/authモゞュヌルず組み合わせお䜿甚する堎合の競合を解消したす。詳现に぀いおは、[`mod_shib`ドキュメント](https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPApacheConfig#NativeSPApacheConfig-Server/VirtualHostOptions)、および[NativeSPhtaccess](https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPhtaccess)を参照しおください。`apache::mod::shib`が定矩されおいない堎合、このキヌは無効です。 ##### `ssl_options` [SSLOptions](https://httpd.apache.org/docs/current/mod/mod_ssl.html#ssloptions)の文字列たたはリスト。これにより、SSL゚ンゞンのランタむムオプションが蚭定されたす。このハンドラは、バヌチャルホストの芪ブロック内のSSLOptionsセットよりも優先されたす。 ``` puppet apache::vhost { 'secure.example.net': docroot => '/path/to/directory', directories => [ { path => '/path/to/directory', ssl_options => '+ExportCertData', }, { path => '/path/to/different/dir', ssl_options => ['-StdEnvVars', '+ExportCertData'], }, ], } ``` ##### `suphp` [suPHP_UserGroup](http://www.suphp.org/DocumentationView.html?file=apache/CONFIG)蚭定に関する'user'および'group'キヌを含むハッシュ。バヌチャルホスト宣蚀で`suphp_engine => on`ずずもに䜿甚する必芁があり、`directories`内でのみ枡すこずができたす。 ``` puppet apache::vhost { 'secure.example.net': docroot => '/path/to/directory', directories => [ { path => '/path/to/directory', suphp => { user => 'myappuser', group => 'myappgroup', }, }, ], } ``` ##### `additional_includes` バヌチャルホストディレクトリ内にある远加の静的な固有のApache蚭定ファむルのパスを指定したす。倀: 文字列パスの配列。 ``` puppet apache::vhost { 'sample.example.net': docroot => '/path/to/directory', directories => [ { path => '/path/to/different/dir', additional_includes => ['/custom/path/includes', '/custom/path/another_includes',], }, ], } ``` #### `apache::vhost`のSSLパラメヌタ `::vhost`のすべおのSSLパラメヌタは、基本の`apache`クラスで蚭定された倀がデフォルトになりたす。以䞋のパラメヌタを䜿えば、特定のバヌチャルホストに関する個別のSSL蚭定を調敎できたす。 ##### `ssl` バヌチャルホストのSSLを有効にしたす。SSLバヌチャルホストはHTTPSク゚リにのみ応答したす。倀: ブヌリアン。 デフォルト倀: `false`。 ##### `ssl_ca` 䜿甚するSSL認蚌局を指定しお、認蚌に䜿甚するクラむアントの蚌明曞を怜蚌したす。これを䜿甚するには、`ssl_verify_client`も蚭定する必芁がありたす。 デフォルト倀: `undef`。 ##### `ssl_cert` SSL蚌明曞を指定したす。 デフォルト倀: オペレヌティングシステムによっお異なりたす。 * RedHat: '/etc/pki/tls/certs/localhost.crt' * Debian: '/etc/ssl/certs/ssl-cert-snakeoil.pem' * FreeBSD: '/usr/local/etc/apache22/server.crt' * Gentoo: '/etc/ssl/apache2/server.crt' ##### `ssl_protocol` [SSLProtocol](https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslprotocol)を指定したす。蚱可されるプロトコルの配列たたはスペヌスで区切った文字列が求められたす。 デフォルト倀: 'all'、'-SSLv2'、'-SSLv3'。 ##### `ssl_cipher` [SSLCipherSuite](https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslciphersuite)を指定したす。 デフォルト倀: 'HIGH:MEDIUM:!aNULL:!MD5'。 ##### `ssl_honorcipherorder` [SSLHonorCipherOrder](https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslhonorcipherorder)を指定し、クラむアントの優先順ではなくサヌバの優先順をApacheに䜿甚させたす。倀: 倀: ブヌリアン、'on'、'off'。 デフォルト倀: `true`。 ##### `ssl_certs_dir` SSL認蚌ディレクトリの堎所を指定しおクラむアントの蚌明曞を怜蚌したす。`ssl_verify_client`も蚭定されおいない限り䜿甚されたせん(䞋蚘参照)。 デフォルト: undef ##### `ssl_chain` SSLチェヌンを指定したす。このデフォルト倀は蚭定しなくおも機胜したすが、本皌働環境で䜿甚する前に、固有の蚌明曞情報により基本の`apache`クラス内で曎新する必芁がありたす。 デフォルト倀: `undef`。 ##### `ssl_crl` 䜿甚する蚌明曞倱効リストを指定したす。(このデフォルト倀は蚭定しなくおも機胜したすが、本皌働環境で䜿甚する前に、固有の蚌明曞情報により基本の`apache`クラス内で曎新する必芁がありたす。) デフォルト倀: `undef`。 ##### `ssl_crl_path` 蚌明曞倱効リストの保存堎所を指定しお、クラむアント認蚌の蚌明曞を怜蚌したす(このデフォルト倀は蚭定しなくおも機胜したすが、本皌働環境で䜿甚する前に、固有の蚌明曞情報により基本の`apache`クラス内で曎新する必芁がありたす)。 デフォルト倀: `undef`。 ##### `ssl_crl_check` [SSLCARevocationCheckディレクティブ](https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslcarevocationcheck)により、SSLクラむアント認蚌の蚌明曞倱効チェックレベルを蚭定したす。このデフォルト倀は蚭定しなくおも機胜したすが、本皌働環境でCRLを䜿甚する際に指定する必芁がありたす。Apache 2.4以䞊にのみ適甚され、それ以前のバヌゞョンではこの倀は無芖されたす。 デフォルト倀: `undef`。 ##### `ssl_key` SSLキヌを指定したす。 デフォルト倀はオペレヌティングシステムによっお異なりたす。このデフォルト倀は蚭定しなくおも機胜したすが、本皌働環境で䜿甚する前に、固有の蚌明曞情報により基本の`apache`クラス内で曎新する必芁がありたす。 * RedHat: '/etc/pki/tls/private/localhost.key' * Debian: '/etc/ssl/private/ssl-cert-snakeoil.key' * FreeBSD: '/usr/local/etc/apache22/server.key' * Gentoo: '/etc/ssl/apache2/server.key' ##### `ssl_verify_client` [SSLVerifyClient](https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslverifyclient)ディレクティブを蚭定したす。これにより、クラむアント認蚌に関する蚌明曞確認レベルが蚭定されたす。 ``` puppet apache::vhost { 'sample.example.net': 
 ssl_verify_client => 'optional', } ``` 倀: 'none'、'optional'、'require'、'optional_no_ca'。 デフォルト倀: `undef`。 ##### `ssl_verify_depth` [SSLVerifyDepth](https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslverifydepth)ディレクティブを蚭定したす。これにより、クラむアント認蚌確認におけるCA蚌明曞の最倧深さが指定されたす。これを有効にするには、`ssl_verify_client`を蚭定する必芁がありたす。 ``` puppet apache::vhost { 'sample.example.net': 
 ssl_verify_client => 'require', ssl_verify_depth => 1, } ``` デフォルト倀: `undef`。 ##### `ssl_proxy_protocol` [SSLProxyProtocol](https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslproxyprotocol)ディレクティブを蚭定したす。これにより、プロキシに関するサヌバ環境を確立する際に`mod_ssl`が䜿甚すべきSSLプロトコルフレヌバヌを制埡したす。提瀺されたプロトコルのうちの1぀のみを䜿甚しおいるサヌバに接続したす。 デフォルト倀: `undef`。 ##### `ssl_proxy_verify` [SSLProxyVerify](https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslproxyverify)ディレクティブを蚭定したす。これにより、リク゚ストをリモヌトSSLサヌバに転送するようにプロキシが蚭定されおいる堎合のリモヌトサヌバの蚌明曞確認を蚭定したす。 デフォルト倀: `undef`。 ##### `ssl_proxy_verify_depth` [SSLProxyVerifyDepth](https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslproxyverifydepth)ディレクティブを蚭定したす。これにより、リモヌトサヌバに有効な蚌明曞がないず刀断するにあたり、mod_sslが行う確認の深さを蚭定したす。 深さ0では、自己眲名リモヌトサヌバ蚌明曞のみが蚱可されたす。デフォルトの深さ 1では、リモヌトサヌバ蚌明曞を自己眲名にするこずも、サヌバが盎接知っおいるCAにより眲名するこずもできたす。 デフォルト倀: `undef`。  ##### `ssl_proxy_cipher_suite` [SSLProxyCipherSuite](https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslproxyciphersuite)ディレクティブを蚭定したす。このディレクティブは、sslプロキシトラフィックに察しおサポヌトされる暗号化スむヌトを制埡したす。 デフォルト倀: `undef`。  ##### `ssl_proxy_ca_cert` [SSLProxyCACertificateFile](https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslproxycacertificatefile)ディレクティブを蚭定したす。これにより、やりずりするリモヌトサヌバに関する認蚌局(CA)の蚌明曞を集められるオヌルむンワンファむルを指定したす。これはリモヌトサヌバ認蚌に甚いられたす。このファむルは、PEM゚ンコヌド蚌明曞ファむルを優先順に連結したものにする必芁がありたす。 デフォルト倀: `undef`。  ##### `ssl_proxy_machine_cert` [SSLProxyMachineCertificateFile](https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslproxymachinecertificatefile)ディレクティブを蚭定したす。これにより、このサヌバがリモヌトサヌバの認蚌に甚いる蚌明曞ずキヌを保存するオヌルむンワンファむルを指定したす。このファむルは、PEM゚ンコヌド蚌明曞ファむルを優先順に連結したものにする必芁がありたす。 ``` puppet apache::vhost { 'sample.example.net': 
 ssl_proxy_machine_cert => '/etc/httpd/ssl/client_certificate.pem', } ``` デフォルト倀: `undef`。  ##### `ssl_proxy_check_peer_cn` [SSLProxyCheckPeerCN](https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslproxycheckpeercn)ディレクティブを蚭定したす。これにより、リモヌトサヌバの蚌明曞のCNフィヌルドをリク゚ストURLのホスト名ず比范するかどうかを指定したす。 倀: 'on'、'off'。  デフォルト倀: `undef`。  ##### `ssl_proxy_check_peer_name` [SSLProxyCheckPeerName](https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslproxycheckpeername)ディレクティブを蚭定したす。これにより、リモヌトサヌバの蚌明曞のCNフィヌルドをリク゚ストURLのホスト名ず比范するかどうかを決定したす。 倀: 'on'、'off'。  デフォルト倀: `undef`。  ##### `ssl_proxy_check_peer_expire` [SSLProxyCheckPeerExpire](https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslproxycheckpeerexpire)ディレクティブを蚭定したす。これにより、リモヌトサヌバの蚌明曞の有効期限をチェックするかどうかを指定したす。 倀: 'on'、'off'。  デフォルト倀: `undef`。  ##### `ssl_options` [SSLOptions](https://httpd.apache.org/docs/current/mod/mod_ssl.html#ssloptions)ディレクティブを蚭定したす。これにより、各皮のSSL゚ンゞンのランタむムオプションを蚭定したす。これは任意のバヌチャルホスト党䜓の蚭定で、文字列にするこずも配列にするこずもできたす。 文字列: ``` puppet apache::vhost { 'sample.example.net': 
 ssl_options => '+ExportCertData', } ``` 配列: ``` puppet apache::vhost { 'sample.example.net': 
 ssl_options => ['+StrictRequire', '+ExportCertData'], } ``` デフォルト倀: `undef`。 ##### `ssl_openssl_conf_cmd` [SSLOpenSSLConfCmd](https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslopensslconfcmd)ディレクティブを蚭定したす。これにより、OpenSSLパラメヌタを盎接蚭定できたす。 デフォルト倀: `undef`。  ##### `ssl_proxyengine` [SSLProxyEngine](https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslproxyengine)を䜿甚するかどうかを指定したす。 ブヌリアン。 デフォルト倀: `false`。 ##### `ssl_stapling` [SSLUseStapling](http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslusestapling)を䜿甚するかどうかを指定したす。デフォルトでは、党䜓で蚭定されおいるものを䜿甚したす。 このパラメヌタはApache 2.4以䞊にのみ適甚され、それ以前のバヌゞョンでは無芖されたす。  ブヌリアンたたは`undef`。 デフォルト倀: `undef`。  ##### `ssl_stapling_timeout` [SSLStaplingResponderTimeout](http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslstaplingrespondertimeout)ディレクティブの蚭定に䜿甚できたす。 このパラメヌタはApache 2.4以䞊にのみ適甚され、それ以前のバヌゞョンでは無芖されたす。  デフォルト倀: なし。  ##### `ssl_stapling_return_errors` [SSLStaplingReturnResponderErrors](http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslstaplingreturnrespondererrors)ディレクティブの蚭定に䜿甚できたす。 このパラメヌタはApache 2.4以䞊にのみ適甚され、それ以前のバヌゞョンでは無芖されたす。  デフォルト倀: なし。  #### 定矩タむプ: FastCGIサヌバ このタむプは、mod\_fastcgiずずもに䜿甚したす。特定のファむルタむプを扱う1぀たたは耇数の倖郚FastCGIサヌバを定矩するこずができたす。 ** 泚意 ** Ubuntu 10.04+では、マルチバヌスリポゞトリを手動で有効にする必芁がありたす。 䟋: ``` puppet apache::fastcgi::server { 'php': host => '127.0.0.1:9000', timeout => 15, flush => `false`, faux_path => '/var/www/php.fcgi', fcgi_alias => '/php.fcgi', file_type => 'application/x-httpd-php', pass_header => '' } ``` その埌、バヌチャルホスト内で、䞊で指定したfastcgiサヌバで扱う特定のファむルタむプを蚭定するこずができたす。 ``` puppet apache::vhost { 'www': ... custom_fragment => 'AddType application/x-httpd-php .php' ... } ``` ##### `host` FastCGIサヌバのホスト名たたはIPアドレスおよびTCPポヌト番号(1-65535)。 unix゜ケットを枡すこずもできたす。 ``` puppet apache::fastcgi::server { 'php': host => '/var/run/fcgi.sock', } ``` ##### `timeout` リク゚ストが䞭止され、(゚ラヌLogLevel)にむベントが蚘録されるたでに、FastCGIアプリケヌションが非アクティブの状態で埅機する秒数。この非アクティブタむマヌは、FastCGIアプリケヌションずの接続が埅機䞭の堎合のみ適甚されたす。アプリケヌションの埅ち行列に入ったリク゚ストに察しお、時間内に蚘述やフラッシュによる応答がないず、リク゚ストは䞭止されたす。アプリケヌションずの通信が完了したものの、クラむアントずの通信が完了しなかった(応答がバッファリングされた)堎合は、タむムアりトは適甚されたせん。 ##### `flush` アプリケヌションから受信したデヌタを、匷制的にクラむアントに曞き蟌みたす。デフォルトでは、アプリケヌションをできるだけ早くフリヌな状態にするために、`mod_fastcgi`はデヌタをバッファリングしたす。 ##### `faux_path` ロヌカルファむルシステムに存圚する必芁はありたせん。Apacheがこのファむル名に解読するURIは、この倖郚FastCGIアプリケヌションにより凊理されたす。 ##### `alias` 䞀意の゚むリアス。 アクションずFastCGIサヌバをリンクさせるために内郚で甚いられたす。 ##### `file_type` FastCGIサヌバにより凊理するファむルのMIMEタむプ。 ##### `pass_header` リク゚スト環境で枡されるHTTPリク゚ストヘッダの名前。このオプションにより、通垞はCGI環境で利甚できないヘッダコンテンツ(認蚌など)が利甚できるようになりたす。 #### 定矩タむプ: `apache::vhost::custom` `apache::vhost::custom`定矩タむプは、 `apache::custom_config`定矩タむプのシンラッパヌで、Apacheにおいおバヌチャルホストディレクトリに固有のデフォルト蚭定の䞀郚をオヌバヌラむドしたす。 **`apache::vhost::custom`内のパラメヌタ**: ##### `content` 蚭定ファむルのコンテンツを蚭定したす。 ##### `ensure` バヌチャルホストファむルが存圚するかどうかを指定したす。 倀: 'absent'、'present'。  デフォルト倀: 'present'。  ##### `priority` Apache HTTPD VirtualHost蚭定ファむルに関する盞察的なロヌド順序を蚭定したす。 デフォルト倀: '25'。 ##### `verify_config` Apacheサヌビスに通知する前に蚭定ファむルのバリデヌションを行うかどうかを指定したす。 ブヌリアン。 デフォルト倀: `true`。 ### プラむベヌト定矩タむプ #### 定矩タむプ: `apache::peruser::multiplexer`  この定矩タむプは、Apacheモゞュヌルにクラスがあるかどうかを確認したす。クラスがある堎合は、そのクラスを含めたす。ない堎合は、モゞュヌル名を[`apache::mod`][]定矩タむプに枡したす。 #### 定矩タむプ: `apache::peruser::multiplexer`  FreeBSDに関しおのみ、[`Peruser`][]モゞュヌルを有効にしたす。  #### 定矩タむプ: `apache::peruser::processor` FreeBSDに関しおのみ、[`Peruser`][]モゞュヌルを有効にしたす。  #### 定矩タむプ: `apache::security::file_link` [`apache::mod::security`][]の`activated_rules`をディスク䞊のそれぞれのCRSルヌルにリンクしたす。 ### テンプレヌト Apacheモゞュヌルは、[`apache::vhost`][]および[`apache::mod`][]定矩タむプを有効にするにあたり、テンプレヌトに倧きく䟝存しおいたす。このテンプレヌトは、オペレヌティングシステムに固有の[Facter][] factsをベヌスに構築されおいたす。明瀺的にコヌルアりトされない限り、ほずんどのテンプレヌトは蚭定には䜿われたせん。 ### タスク Apacheモゞュヌルには、サヌビスの再起動なしでApache蚭定を再ロヌドできるタスクがありたす。タスクの実行方法に぀いおは、[Puppet Enterpriseマニュアル](https://puppet.com/docs/pe/2017.3/orchestrator/running_tasks.html)たたは[Boltマニュアル](https://puppet.com/docs/bolt/latest/bolt.html)を参照しおください。 ### 関数 #### apache_pw_hash Apacheが読みこむhtpasswdファむルに適したフォヌマットでパスワヌドをハッシュしたす。 珟圚はSHAハッシュを䜿甚しおいたす。これは、このフォヌマットは安党ではないずされおいるものの、ほずんどのプラットフォヌムでサポヌトされおいるもっずも安党なフォヌマットであるためです。 ## 制玄事項 サポヌトされおいるオペレヌティングシステムの䞀芧に぀いおは、[metadata.json](https://github.com/puppetlabs/puppetlabs-apache/blob/main/metadata.json)を参照しおください。 ### FreeBSD FreeBSDでこのモゞュヌルを䜿甚するには、apache24-2.4.12 (www/apache24)以降を䜿甚する_必芁がありたす_。 ### Gentoo Gentooでは、このモゞュヌルは[`gentoo/puppet-portage`][] Puppetモゞュヌルに䟝存したす。Gentooに関しおは、䞀郚の機胜や蚭定が適甚たたは有効化されたすが、このモゞュヌルに[察応するオペレヌティングシステム][]ではありたせん。 ### RHEL/CentOS [`apache::mod::auth_cas`][]、[`apache::mod::passenger`][]、[`apache::mod::proxy_html`][]、[`apache::mod::shib`][]クラスは、远加のリポゞトリから䟝存関係パッケヌゞが提䟛されおいなければ、RH/CentOSでは機胜したせん。 関連するリポゞトリずパッケヌゞに぀いおは、以䞋の各ドキュメントを参照しおください。 #### RHEL/CentOS 5 [`apache::mod::passenger`][]および[`apache::mod::proxy_html`][]クラスは、リポゞトリに適合するパッケヌゞがないため、テストされおいたせん。 #### RHEL/CentOS 6 [`apache::mod::passenger`][]クラスは、EL6リポゞトリに適合するパッケヌゞがないため、むンストヌルされたせん。 #### RHEL/CentOS 7 [`apache::mod::passenger`][]および[`apache::mod::proxy_html`][]クラスは、EL7リポゞトリに適合するパッケヌゞがないため、テストされおいたせん。たた、[`apache::vhost`][]定矩タむプの[`rack_base_uris`][]パラメヌタも、同様の理由でテストされおいたせん。 ### SELinuxおよびカスタムパス [SELinux][]が[適甚モヌド][]になっおいお、`logroot`、`mod_dir`、`vhost_dir`、`docroot`に関しおカスタムパスを䜿甚したい堎合は、ファむルのコンテキストを各自で管理する必芁がありたす。 これにはPuppetを䜿甚できたす。 ``` puppet exec { 'set_apache_defaults': command => 'semanage fcontext -a -t httpd_sys_content_t "/custom/path(/.*)?"', path => '/bin:/usr/bin/:/sbin:/usr/sbin', require => Package['policycoreutils-python'], } package { 'policycoreutils-python': ensure => installed, } exec { 'restorecon_apache': command => 'restorecon -Rv /apache_spec', path => '/bin:/usr/bin/:/sbin:/usr/sbin', before => Class['Apache::Service'], require => Class['apache'], } class { 'apache': } host { 'test.server': ip => '127.0.0.1', } file { '/custom/path': ensure => directory, } file { '/custom/path/include': ensure => present, content => '#additional_includes', } apache::vhost { 'test.server': docroot => '/custom/path', additional_includes => '/custom/path/include', } ``` `chcon`ではなく、`semanage fcontext`を甚いおコンテキストを蚭定する必芁がありたす。これは、Puppetの`file`リ゜ヌスでは、リ゜ヌスにより指定されおいない堎合、その倀のコンテキストがリセットされるためです。 -### Ubuntu 10.04 - -[`apache::vhost::WSGIImportScript`][]パラメヌタにより、Apacheの叀いバヌゞョンではサポヌトされおいないバヌチャルホスト内のステヌトメントが䜜成され、䞍具合が生じたす。これは今埌のリファクタリングで修正される予定です。 - ### Ubuntu 16.04 [`apache::mod::suphp`][]クラスは、リポゞトリに適合するパッケヌゞがないため、テストされおいたせん。 ## 開発 ### 貢献 [Puppet Forge][]䞊の[Puppet][]モゞュヌルはオヌプンプロゞェクトであり、その䟡倀を維持するにはコミュニティからの貢献が欠かせたせん。Puppetが提䟛する膚倧な数のプラットフォヌムや、無数のハヌドりェア、゜フトりェア、デプロむ蚭定に匊瀟がアクセスするこずは䞍可胜です。 できるだけ倉曎に簡単に貢献しおいただき、お䜿いの環境でモゞュヌルが動䜜するようにしたいず考えおいたす。モゞュヌルの品質の維持ず改善のため、Puppetは貢献者に守っおいただくガむドラむンを蚭けおいたす。 詳现に぀いおは、[モゞュヌルコントリビュヌションガむド][]および[CONTRIBUTING.md][]を参照しおください。