{"id":15022737,"url":"https://github.com/puppetlabs/puppetlabs-apache","last_synced_at":"2025-05-12T13:13:28.737Z","repository":{"id":1049213,"uuid":"880770","full_name":"puppetlabs/puppetlabs-apache","owner":"puppetlabs","description":"Puppet module for the Apache httpd server, maintained by Puppet, Inc. ","archived":false,"fork":false,"pushed_at":"2025-04-23T12:21:42.000Z","size":9026,"stargazers_count":362,"open_issues_count":53,"forks_count":1078,"subscribers_count":197,"default_branch":"main","last_synced_at":"2025-04-23T15:54:57.816Z","etag":null,"topics":["hacktoberfest","module","supported"],"latest_commit_sha":null,"homepage":"https://forge.puppet.com/modules/puppetlabs/apache","language":"Puppet","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/puppetlabs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2010-09-01T22:00:16.000Z","updated_at":"2025-04-23T12:21:46.000Z","dependencies_parsed_at":"2023-12-31T14:25:29.793Z","dependency_job_id":"c55b89e7-64b5-4222-a548-690fc18faddf","html_url":"https://github.com/puppetlabs/puppetlabs-apache","commit_stats":{"total_commits":2723,"total_committers":614,"mean_commits":4.43485342019544,"dds":0.9416085200146896,"last_synced_commit":"a1545b31e55c5e7444bb6d97926797c20094841b"},"previous_names":[],"tags_count":97,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fpuppetlabs-apache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fpuppetlabs-apache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fpuppetlabs-apache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fpuppetlabs-apache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/puppetlabs","download_url":"https://codeload.github.com/puppetlabs/puppetlabs-apache/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252154867,"owners_count":21702989,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","module","supported"],"created_at":"2024-09-24T19:58:19.869Z","updated_at":"2025-05-12T13:13:28.683Z","avatar_url":"https://github.com/puppetlabs.png","language":"Puppet","funding_links":[],"categories":[],"sub_categories":[],"readme":"# apache\n\n[Module description]: #module-description\n\n[Setup]: #setup\n[Beginning with Apache]: #beginning-with-apache\n\n[Usage]: #usage\n[Configuring virtual hosts]: #configuring-virtual-hosts\n[Configuring virtual hosts with SSL]: #configuring-virtual-hosts-with-ssl\n[Configuring virtual host port and address bindings]: #configuring-virtual-host-port-and-address-bindings\n[Configuring virtual hosts for apps and processors]: #configuring-virtual-hosts-for-apps-and-processors\n[Configuring IP-based virtual hosts]: #configuring-ip-based-virtual-hosts\n[Installing Apache modules]: #installing-apache-modules\n[Installing arbitrary modules]: #installing-arbitrary-modules\n[Installing specific modules]: #installing-specific-modules\n[Load balancing examples]: #load-balancing-examples\n[apache affects]: #what-the-apache-module-affects\n\n[Reference]: #reference\n\n[Limitations]: #limitations\n\n[License]: #license\n\n[Development]: #development\n\n[`AddDefaultCharset`]: https://httpd.apache.org/docs/current/mod/core.html#adddefaultcharset\n[`add_listen`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#add_listen\n[`Alias`]: https://httpd.apache.org/docs/current/mod/mod_alias.html#alias\n[`AliasMatch`]: https://httpd.apache.org/docs/current/mod/mod_alias.html#aliasmatch\n[aliased servers]: https://httpd.apache.org/docs/current/urlmapping.html\n[`AllowEncodedSlashes`]: https://httpd.apache.org/docs/current/mod/core.html#allowencodedslashes\n[`apache`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apache\n[`apache::balancer`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachebalancer\n[`apache::balancermember`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachebalancermember\n[`apache::mod`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemod\n[`apache::mod::\u003cMODULE NAME\u003e`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#public-classes\n[`apache::mod::alias`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemodalias\n[`apache::mod::auth_cas`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemodauth_cas\n[`apache::mod::auth_mellon`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemodauth_mellon\n[`apache::mod::authn_dbd`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemodauthn_dbd\n[`apache::mod::authnz_ldap`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemodauthnz_ldap\n[`apache::mod::authz_core`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemodauthz_core\n[`apache::mod::cluster`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemodcluster\n[`apache::mod::data]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemoddata\n[`apache::mod::disk_cache`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemoddisk_cache\n[`apache::mod::dumpio`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemoddumpio\n[`apache::mod::event`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemodevent\n[`apache::mod::ext_filter`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemodext_filter\n[`apache::mod::geoip`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemodgeoip\n[`apache::mod::http2`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemodhttp2\n[`apache::mod::itk`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemoditk\n[`apache::mod::jk`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemodjk\n[`apache::mod::ldap`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemodldap\n[`apache::mod::passenger`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemodpassenger\n[`apache::mod::peruser`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemodperuser\n[`apache::mod::prefork`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemodprefork\n[`apache::mod::proxy`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemodproxy\n[`apache::mod::proxy_balancer`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemodproxybalancer\n[`apache::mod::proxy_fcgi`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemodproxy_fcgi\n[`apache::mod::proxy_html`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemodproxy_html\n[`apache::mod::python`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemodpython\n[`apache::mod::security`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemodsecurity\n[`apache::mod::shib`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemodshib\n[`apache::mod::ssl`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemodssl\n[`apache::mod::status`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemodstatus\n[`apache::mod::userdir`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemoduserdir\n[`apache::mod::worker`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemodworker\n[`apache::mod::wsgi`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachemodwsgi\n[`apache::params`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#private-classes\n[`apache::version`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#private-classes\n[`apache::vhost`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachevhost\n[`apache::vhost::custom`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachevhostcustom\n[Apache HTTP Server]: https://httpd.apache.org\n[Apache modules]: https://httpd.apache.org/docs/current/mod/\n[array]: https://docs.puppet.com/puppet/latest/lang_data_array.html\n\n[audit log]: https://github.com/SpiderLabs/ModSecurity/wiki/ModSecurity-2-Data-Formats#audit-log\n\n[beaker-rspec]: https://github.com/puppetlabs/beaker-rspec\n\n[certificate revocation list]: https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslcarevocationfile\n[certificate revocation list path]: https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslcarevocationpath\n[common gateway interface]: https://httpd.apache.org/docs/current/howto/cgi.html\n[`conf_dir`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#conf_dir\n[custom error documents]: https://httpd.apache.org/docs/current/custom-error.html\n[`custom_fragment`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#custom_fragment\n\n[`default_mods`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#default_mods\n[`default_ssl_crl`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#default_ssl_crl\n[`default_ssl_crl_path`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#default_ssl_crl_path\n[`default_ssl_vhost`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#default_ssl_vhost\n[`dev_packages`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#dev_packages\n[`directories`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#directories\n[`DirectoryIndex`]: https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex\n[`docroot`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#docroot\n[`docroot_owner`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#docroot_owner\n[`docroot_group`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#docroot_group\n[`DocumentRoot`]: https://httpd.apache.org/docs/current/mod/core.html#documentroot\n\n[`EnableSendfile`]: https://httpd.apache.org/docs/current/mod/core.html#enablesendfile\n[enforcing mode]: http://selinuxproject.org/page/Guide/Mode\n[`ensure`]: https://docs.puppet.com/latest/type.html#package-attribute-ensure\n[`error_log_file`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#error_log_file\n[`error_log_syslog`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#error_log_syslog\n[`error_log_pipe`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#error_log_pipe\n[`ExpiresByType`]: https://httpd.apache.org/docs/current/mod/mod_expires.html#expiresbytype\n[exported resources]: https://puppet.com/docs/puppet/latest/lang_exported.html\n[`ExtendedStatus`]: https://httpd.apache.org/docs/current/mod/core.html#extendedstatus\n\n[Facter]: http://docs.puppet.com/facter/\n[FallbackResource]: https://httpd.apache.org/docs/current/mod/mod_dir.html#fallbackresource\n[`fallbackresource`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#fallbackresource\n[`FileETag`]: https://httpd.apache.org/docs/current/mod/core.html#fileetag\n[filter rules]: https://httpd.apache.org/docs/current/filter.html\n[`filters`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#filters\n[`ForceType`]: https://httpd.apache.org/docs/current/mod/core.html#forcetype\n\n[GeoIPScanProxyHeaders]: http://dev.maxmind.com/geoip/legacy/mod_geoip2/#Proxy-Related_Directives\n[`gentoo/puppet-portage`]: https://github.com/gentoo/puppet-portage\n\n[Hash]: https://docs.puppet.com/puppet/latest/lang_data_hash.html\n[`HttpProtocolOptions`]: http://httpd.apache.org/docs/current/mod/core.html#httpprotocoloptions\n\n[CAT Team]: https://puppetlabs.github.io/content-and-tooling-team/\n[`IncludeOptional`]: https://httpd.apache.org/docs/current/mod/core.html#includeoptional\n[`Include`]: https://httpd.apache.org/docs/current/mod/core.html#include\n[interval syntax]: https://httpd.apache.org/docs/current/mod/mod_expires.html#AltSyn\n[`ip`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#ip\n[`ip_based`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#ip_based\n[IP-based virtual hosts]: https://httpd.apache.org/docs/current/vhosts/ip-based.html\n\n[`limitreqfieldsize`]: https://httpd.apache.org/docs/current/mod/core.html#limitrequestfieldsize\n[`limitreqfields`]: http://httpd.apache.org/docs/current/mod/core.html#limitrequestfields\n\n[`lib`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#lib\n[`lib_path`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#lib_path\n[`Listen`]: https://httpd.apache.org/docs/current/bind.html\n[`ListenBackLog`]: https://httpd.apache.org/docs/current/mod/mpm_common.html#listenbacklog\n[`LoadFile`]: https://httpd.apache.org/docs/current/mod/mod_so.html#loadfile\n[`LogFormat`]: https://httpd.apache.org/docs/current/mod/mod_log_config.html#logformat\n[`logroot`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#logroot\n[Log security]: https://httpd.apache.org/docs/current/logs.html#security\n\n[`manage_docroot`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#manage_docroot\n[`manage_user`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#manage_user\n[`manage_group`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#manage_group\n[`supplementary_groups`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#supplementary_groups\n[`MaxConnectionsPerChild`]: https://httpd.apache.org/docs/current/mod/mpm_common.html#maxconnectionsperchild\n[`max_keepalive_requests`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#max_keepalive_requests\n[`MaxRequestWorkers`]: https://httpd.apache.org/docs/current/mod/mpm_common.html#maxrequestworkers\n[`MaxSpareThreads`]: https://httpd.apache.org/docs/current/mod/mpm_common.html#maxsparethreads\n[MIME `content-type`]: https://www.iana.org/assignments/media-types/media-types.xhtml\n[`MinSpareThreads`]: https://httpd.apache.org/docs/current/mod/mpm_common.html#minsparethreads\n[`mod_alias`]: https://httpd.apache.org/docs/current/mod/mod_alias.html\n[`mod_auth_cas`]: https://github.com/Jasig/mod_auth_cas\n[`mod_auth_kerb`]: http://modauthkerb.sourceforge.net/configure.html\n[`mod_auth_gssapi`]: https://github.com/modauthgssapi/mod_auth_gssapi\n[`mod_authnz_external`]: https://github.com/phokz/mod-auth-external\n[`mod_auth_dbd`]: http://httpd.apache.org/docs/current/mod/mod_authn_dbd.html\n[`mod_auth_mellon`]: https://github.com/UNINETT/mod_auth_mellon\n[`mod_authz_core`]: https://httpd.apache.org/docs/current/mod/mod_authz_core.html\n[`mod_dbd`]: http://httpd.apache.org/docs/current/mod/mod_dbd.html\n[`mod_disk_cache`]: https://httpd.apache.org/docs/2.2/mod/mod_disk_cache.html\n[`mod_dumpio`]: https://httpd.apache.org/docs/2.4/mod/mod_dumpio.html\n[`mod_env`]: http://httpd.apache.org/docs/current/mod/mod_env.html\n[`mod_expires`]: https://httpd.apache.org/docs/current/mod/mod_expires.html\n[`mod_ext_filter`]: https://httpd.apache.org/docs/current/mod/mod_ext_filter.html\n[`mod_fcgid`]: https://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html\n[`mod_geoip`]: http://dev.maxmind.com/geoip/legacy/mod_geoip2/\n[`mod_http2`]: https://httpd.apache.org/docs/current/mod/mod_http2.html\n[`mod_info`]: https://httpd.apache.org/docs/current/mod/mod_info.html\n[`mod_ldap`]: https://httpd.apache.org/docs/2.2/mod/mod_ldap.html\n[`mod_mpm_event`]: https://httpd.apache.org/docs/current/mod/event.html\n[`mod_negotiation`]: https://httpd.apache.org/docs/current/mod/mod_negotiation.html\n[`mod_pagespeed`]: https://developers.google.com/speed/pagespeed/module/?hl=en\n[`mod_passenger`]: https://www.phusionpassenger.com/library/config/apache/reference/\n[`mod_php`]: http://php.net/manual/en/book.apache.php\n[`mod_proxy`]: https://httpd.apache.org/docs/current/mod/mod_proxy.html\n[`mod_proxy_balancer`]: https://httpd.apache.org/docs/current/mod/mod_proxy_balancer.html\n[`mod_reqtimeout`]: https://httpd.apache.org/docs/current/mod/mod_reqtimeout.html\n[`mod_python`]: http://modpython.org/\n[`mod_rewrite`]: https://httpd.apache.org/docs/current/mod/mod_rewrite.html\n[`mod_security`]: https://www.modsecurity.org/\n[`mod_ssl`]: https://httpd.apache.org/docs/current/mod/mod_ssl.html\n[`mod_status`]: https://httpd.apache.org/docs/current/mod/mod_status.html\n[`mod_version`]: https://httpd.apache.org/docs/current/mod/mod_version.html\n[`mod_wsgi`]: https://modwsgi.readthedocs.org/en/latest/\n[module contribution guide]: https://docs.puppet.com/forge/contributing.html\n[`mpm_module`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#mpm_module\n[multi-processing module]: https://httpd.apache.org/docs/current/mpm.html\n\n[name-based virtual hosts]: https://httpd.apache.org/docs/current/vhosts/name-based.html\n[`no_proxy_uris`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#no_proxy_uris\n\n[open source Puppet]: https://docs.puppet.com/puppet/\n[`Options`]: https://httpd.apache.org/docs/current/mod/core.html#options\n\n[`path`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#path\n[`Peruser`]: https://www.freebsd.org/cgi/url.cgi?ports/www/apache22-peruser-mpm/pkg-descr\n[`port`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#port-3\n[`priority`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#priority\n[`proxy_dest`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#proxy_dest\n[`proxy_dest_match`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#proxy_dest_match\n[`proxy_pass`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#proxy_pass\n[`ProxyPass`]: https://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypass\n[`proxy_set`]: https://httpd.apache.org/docs/current/mod/mod_proxy.html#proxyset\n[Puppet Enterprise]: https://docs.puppet.com/pe/\n[Puppet Forge]: https://forge.puppet.com\n[Puppet]: https://puppet.com\n[Puppet module]: https://docs.puppet.com/puppet/latest/modules_fundamentals.html\n[Puppet module's code]: https://github.com/puppetlabs/puppetlabs-apache/blob/main/manifests/default_mods.pp\n[`purge_configs`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#purge_configs\n[`purge_vhost_dir`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#purge_vhost_dir\n[Python]: https://www.python.org/\n\n[Rack]: http://rack.github.io/\n[`rack_base_uri`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#rack_base_uri\n[RFC 2616]: https://www.ietf.org/rfc/rfc2616.txt\n[`RequestReadTimeout`]: https://httpd.apache.org/docs/current/mod/mod_reqtimeout.html#requestreadtimeout\n[rspec-puppet]: http://rspec-puppet.com/\n\n[`ScriptAlias`]: https://httpd.apache.org/docs/current/mod/mod_alias.html#scriptalias\n[`ScriptAliasMatch`]: https://httpd.apache.org/docs/current/mod/mod_alias.html#scriptaliasmatch\n[`scriptalias`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#scriptalias\n[SELinux]: http://selinuxproject.org/\n[`ServerAdmin`]: https://httpd.apache.org/docs/current/mod/core.html#serveradmin\n[`serveraliases`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#serveraliases\n[`ServerLimit`]: https://httpd.apache.org/docs/current/mod/mpm_common.html#serverlimit\n[`ServerName`]: https://httpd.apache.org/docs/current/mod/core.html#servername\n[`ServerRoot`]: https://httpd.apache.org/docs/current/mod/core.html#serverroot\n[`ServerTokens`]: https://httpd.apache.org/docs/current/mod/core.html#servertokens\n[`ServerSignature`]: https://httpd.apache.org/docs/current/mod/core.html#serversignature\n[Service attribute restart]: http://docs.puppet.com/latest/type.html#service-attribute-restart\n[`SSLCARevocationCheck`]: https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslcarevocationcheck\n[SSL certificate key file]: https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslcertificatekeyfile\n[SSL chain]: https://httpd.apache.org/docs/current/mod/mod_ssl.html#sslcertificatechainfile\n[SSL encryption]: https://httpd.apache.org/docs/current/ssl/index.html\n[`ssl`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#ssl\n[`ssl_cert`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#ssl_cert\n[`ssl_compression`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#ssl_compression\n[`ssl_cipher`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#ssl_compression\n[`ssl_key`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#ssl_key\n[`StartServers`]: https://httpd.apache.org/docs/current/mod/mpm_common.html#startservers\n[supported operating system]: https://forge.puppet.com/supported#puppet-supported-modules-compatibility-matrix\n\n[`ThreadLimit`]: https://httpd.apache.org/docs/current/mod/mpm_common.html#threadlimit\n[`ThreadsPerChild`]: https://httpd.apache.org/docs/current/mod/mpm_common.html#threadsperchild\n[`TimeOut`]: https://httpd.apache.org/docs/current/mod/core.html#timeout\n[template]: http://docs.puppet.com/puppet/latest/reference/lang_template.html\n[`TraceEnable`]: https://httpd.apache.org/docs/current/mod/core.html#traceenable\n\n[`UseCanonicalName`]: https://httpd.apache.org/docs/current/mod/core.html#usecanonicalname\n\n[`verify_config`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#verify_config\n[`vhost`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#apachevhost\n[`vhost_dir`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#vhost_dir\n[`virtual_docroot`]: https://forge.puppet.com/modules/puppetlabs/apache/reference#virtual_docroot\n\n[Web Server Gateway Interface]: https://www.python.org/dev/peps/pep-3333/#abstract\n[`WSGIRestrictEmbedded`]: http://modwsgi.readthedocs.io/en/develop/configuration-directives/WSGIRestrictEmbedded.html\n[`WSGIPythonPath`]: http://modwsgi.readthedocs.org/en/develop/configuration-directives/WSGIPythonPath.html\n[`WSGIPythonHome`]: http://modwsgi.readthedocs.org/en/develop/configuration-directives/WSGIPythonHome.html\n[`WSGIApplicationGroup`]: https://modwsgi.readthedocs.io/en/develop/configuration-directives/WSGIApplicationGroup.html\n[`WSGIPythonOptimize`]: https://modwsgi.readthedocs.io/en/develop/configuration-directives/WSGIPythonOptimize.html\n\n#### Table of Contents\n\n1. [Module description - What is the apache module, and what does it do?][Module description]\n2. [Setup - The basics of getting started with apache][Setup]\n    - [What the apache module affects][apache affects]\n    - [Beginning with Apache - Installation][Beginning with Apache]\n3. [Usage - The classes and defined types available for configuration][Usage]\n    - [Configuring virtual hosts - Examples to help get started][Configuring virtual hosts]\n    - [Load balancing with exported and non-exported resources][Load balancing examples]\n4. [Reference - An under-the-hood peek at what the module is doing and how][Reference]\n5. [Limitations - OS compatibility, etc.][Limitations]\n6. [License][License]\n7. [Development - Guide for contributing to the module][Development]\n    \n\u003ca id=\"module-description\"\u003e\u003c/a\u003e\n## Module description\n\n[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][].\n\n\u003ca id=\"setup\"\u003e\u003c/a\u003e\n## Setup\n\n\u003ca id=\"apache-affects\"\u003e\u003c/a\u003e\n### What the apache module affects:\n\n- Configuration files and directories (created and written to)\n  - **WARNING**: Configurations *not* managed by Puppet will be purged.\n- Package/service/configuration files for Apache\n- Apache modules\n- Virtual hosts\n- Listened-to ports\n- `/etc/make.conf` on FreeBSD and Gentoo\n\nOn 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.\n\n\u003e **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.\n\u003e\n\u003eTo 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.\n\n\u003ca id=\"beginning-with-apache\"\u003e\u003c/a\u003e\n### Beginning with Apache\n\nTo have Puppet install Apache with the default parameters, declare the [`apache`][] class:\n\n``` puppet\nclass { 'apache': }\n```\n\nWhen you declare this class with the default options, the module:\n\n- Installs the appropriate Apache software package and [required Apache modules][`default_mods`] for your operating system.\n- Places the required configuration files in a directory, with the [default location][`conf_dir`] Depends on operating system.\n- Configures the server with a default virtual host and standard port (80) and address ('\\*') bindings.\n- Creates a document root directory Depends on operating system, typically `/var/www`.\n- Starts the Apache service.\n\nApache 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.\n\nFor 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:\n\n``` puppet\nclass { 'apache':\n  default_vhost =\u003e false,\n}\n```\n\n\u003e **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.\n\n\u003ca id=\"usage\"\u003e\u003c/a\u003e\n## Usage\n\n\u003ca id=\"configuring-virtual-hosts\"\u003e\u003c/a\u003e\n### Configuring virtual hosts\n\nThe 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`.\n\n\nTo configure basic [name-based virtual hosts][], specify the [`port`][] and [`docroot`][] parameters in the [`apache::vhost`][] defined type:\n\n``` puppet\napache::vhost { 'vhost.example.com':\n  port    =\u003e 80,\n  docroot =\u003e '/var/www/vhost',\n}\n```\n\nSee the [`apache::vhost`][] defined type's reference for a list of all virtual host parameters.\n\n\u003e **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.\n\nTo configure user and group ownership for `docroot`, use the [`docroot_owner`][] and [`docroot_group`][] parameters:\n\n``` puppet\napache::vhost { 'user.example.com':\n  port          =\u003e 80,\n  docroot       =\u003e '/var/www/user',\n  docroot_owner =\u003e 'www-data',\n  docroot_group =\u003e 'www-data',\n}\n```\n\n#### Configuring virtual hosts with SSL\n\nTo 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:\n\n``` puppet\napache::vhost { 'ssl.example.com':\n  port    =\u003e 443,\n  docroot =\u003e '/var/www/ssl',\n  ssl     =\u003e true,\n}\n```\n\nTo 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:\n\n``` puppet\napache::vhost { 'cert.example.com':\n  port     =\u003e 443,\n  docroot  =\u003e '/var/www/cert',\n  ssl      =\u003e true,\n  ssl_cert =\u003e '/etc/ssl/fourth.example.com.cert',\n  ssl_key  =\u003e '/etc/ssl/fourth.example.com.key',\n}\n```\n\nTo configure a mix of SSL and unencrypted virtual hosts at the same domain, declare them with separate [`apache::vhost`][] defined types:\n\n``` puppet\n# The non-ssl virtual host\napache::vhost { 'mix.example.com non-ssl':\n  servername =\u003e 'mix.example.com',\n  port       =\u003e 80,\n  docroot    =\u003e '/var/www/mix',\n}\n\n# The SSL virtual host at the same domain\napache::vhost { 'mix.example.com ssl':\n  servername =\u003e 'mix.example.com',\n  port       =\u003e 443,\n  docroot    =\u003e '/var/www/mix',\n  ssl        =\u003e true,\n}\n```\n\nTo 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:\n\n``` puppet\napache::vhost { 'redirect.example.com non-ssl':\n  servername      =\u003e 'redirect.example.com',\n  port            =\u003e 80,\n  docroot         =\u003e '/var/www/redirect',\n  redirect_status =\u003e 'permanent',\n  redirect_dest   =\u003e 'https://redirect.example.com/'\n}\n\napache::vhost { 'redirect.example.com ssl':\n  servername =\u003e 'redirect.example.com',\n  port       =\u003e 443,\n  docroot    =\u003e '/var/www/redirect',\n  ssl        =\u003e true,\n}\n```\n\n#### Configuring virtual host port and address bindings\n\nVirtual hosts listen on all IP addresses ('\\*') by default. To configure the virtual host to listen on a specific IP address, use the [`ip`][] parameter:\n\n``` puppet\napache::vhost { 'ip.example.com':\n  ip      =\u003e '127.0.0.1',\n  port    =\u003e 80,\n  docroot =\u003e '/var/www/ip',\n}\n```\n\nYou can also configure more than one IP address per virtual host by using an array of IP addresses for the [`ip`][] parameter:\n\n``` puppet\napache::vhost { 'ip.example.com':\n  ip      =\u003e ['127.0.0.1','169.254.1.1'],\n  port    =\u003e 80,\n  docroot =\u003e '/var/www/ip',\n}\n```\n\nYou can configure multiple ports per virtual host by using an array of ports for the [`port`][] parameter:\n\n``` puppet\napache::vhost { 'ip.example.com':\n  ip      =\u003e ['127.0.0.1'],\n  port    =\u003e [80, 8080]\n  docroot =\u003e '/var/www/ip',\n}\n```\n\nTo configure a virtual host with [aliased servers][], refer to the aliases using the [`serveraliases`][] parameter:\n\n``` puppet\napache::vhost { 'aliases.example.com':\n  serveraliases =\u003e [\n    'aliases.example.org',\n    'aliases.example.net',\n  ],\n  port          =\u003e 80,\n  docroot       =\u003e '/var/www/aliases',\n}\n```\n\nTo 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:\n\n``` puppet\napache::vhost { 'subdomain.loc':\n  vhost_name      =\u003e '*',\n  port            =\u003e 80,\n  virtual_docroot =\u003e '/var/www/%-2+',\n  docroot         =\u003e '/var/www',\n  serveraliases   =\u003e ['*.loc',],\n}\n```\n\nTo configure a virtual host with [filter rules][], pass the filter directives as an [array][] using the [`filters`][] parameter:\n\n``` puppet\napache::vhost { 'subdomain.loc':\n  port    =\u003e 80,\n  filters =\u003e [\n    'FilterDeclare  COMPRESS',\n    'FilterProvider COMPRESS DEFLATE resp=Content-Type $text/html',\n    'FilterChain    COMPRESS',\n    'FilterProtocol COMPRESS DEFLATE change=yes;byteranges=no',\n  ],\n  docroot =\u003e '/var/www/html',\n}\n```\n\n#### Configuring virtual hosts for apps and processors\n\nTo configure a virtual host to use the [Web Server Gateway Interface][] (WSGI) for [Python][] applications, use the `wsgi` set of parameters:\n\n``` puppet\napache::vhost { 'wsgi.example.com':\n  port                        =\u003e 80,\n  docroot                     =\u003e '/var/www/pythonapp',\n  wsgi_application_group      =\u003e '%{GLOBAL}',\n  wsgi_daemon_process         =\u003e 'wsgi',\n  wsgi_daemon_process_options =\u003e {\n    processes    =\u003e 2,\n    threads      =\u003e 15,\n    display-name =\u003e '%{GROUP}',\n  },\n  wsgi_import_script          =\u003e '/var/www/demo.wsgi',\n  wsgi_import_script_options  =\u003e {\n    process-group     =\u003e 'wsgi',\n    application-group =\u003e '%{GLOBAL}',\n  },\n  wsgi_process_group          =\u003e 'wsgi',\n  wsgi_script_aliases         =\u003e { '/' =\u003e '/var/www/demo.wsgi' },\n}\n```\n\nAs of Apache 2.2.16, Apache supports [FallbackResource][], a simple replacement for common RewriteRules. You can set a FallbackResource using the [`fallbackresource`][] parameter:\n\n``` puppet\napache::vhost { 'wordpress.example.com':\n  port             =\u003e 80,\n  docroot          =\u003e '/var/www/wordpress',\n  fallbackresource =\u003e '/index.php',\n}\n```\n\n\u003e **Note**: The `fallbackresource` parameter only supports the 'disabled' value since Apache 2.2.24.\n\nTo configure a virtual host with a designated directory for [Common Gateway Interface][] (CGI) files, use the [`scriptalias`][] parameter to define the `cgi-bin` path:\n\n``` puppet\napache::vhost { 'cgi.example.com':\n  port        =\u003e 80,\n  docroot     =\u003e '/var/www/cgi',\n  scriptalias =\u003e '/usr/lib/cgi-bin',\n}\n```\n\nTo configure a virtual host for [Rack][], use the [`rack_base_uri`][] parameter:\n\n``` puppet\napache::vhost { 'rack.example.com':\n  port           =\u003e 80,\n  docroot        =\u003e '/var/www/rack',\n  rack_base_uri =\u003e ['/rackapp1', '/rackapp2'],\n}\n```\n\n#### Configuring IP-based virtual hosts\n\nYou 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:\n\n``` puppet\napache::listen { '80': }\n\napache::listen { '81': }\n```\n\nConfigure the IP-based virtual hosts with the [`ip_based`][] parameter:\n\n``` puppet\napache::vhost { 'first.example.com':\n  ip       =\u003e '10.0.0.10',\n  docroot  =\u003e '/var/www/first',\n  ip_based =\u003e true,\n}\n\napache::vhost { 'second.example.com':\n  ip       =\u003e '10.0.0.11',\n  docroot  =\u003e '/var/www/second',\n  ip_based =\u003e true,\n}\n```\n\nYou can also configure a mix of IP- and [name-based virtual hosts][] in any combination of [SSL][SSL encryption] and unencrypted configurations.\n\nIn 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:\n\n``` puppet\napache::vhost { 'The first IP-based virtual host, non-ssl':\n  servername =\u003e 'first.example.com',\n  ip         =\u003e '10.0.0.10',\n  port       =\u003e 80,\n  ip_based   =\u003e true,\n  docroot    =\u003e '/var/www/first',\n}\n\napache::vhost { 'The first IP-based vhost, ssl':\n  servername =\u003e 'first.example.com',\n  ip         =\u003e '10.0.0.10',\n  port       =\u003e 443,\n  ip_based   =\u003e true,\n  docroot    =\u003e '/var/www/first-ssl',\n  ssl        =\u003e true,\n}\n```\n\nNext, we add two name-based virtual hosts listening on a second IP address (10.0.0.20):\n\n``` puppet\napache::vhost { 'second.example.com':\n  ip      =\u003e '10.0.0.20',\n  port    =\u003e 80,\n  docroot =\u003e '/var/www/second',\n}\n\napache::vhost { 'third.example.com':\n  ip      =\u003e '10.0.0.20',\n  port    =\u003e 80,\n  docroot =\u003e '/var/www/third',\n}\n```\n\nTo 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`:\n\n``` puppet\napache::vhost { 'fourth.example.com':\n  port       =\u003e 80,\n  docroot    =\u003e '/var/www/fourth',\n  add_listen =\u003e false,\n}\n\napache::vhost { 'fifth.example.com':\n  port       =\u003e 80,\n  docroot    =\u003e '/var/www/fifth',\n  add_listen =\u003e false,\n}\n```\n\n### Installing Apache modules\n\nThere are two ways to install [Apache modules][] using the Puppet apache module:\n\n- Use the [`apache::mod::\u003cMODULE NAME\u003e`][] classes to [install specific Apache modules with parameters][Installing specific modules].\n- Use the [`apache::mod`][] defined type to [install arbitrary Apache modules][Installing arbitrary modules].\n\n#### Installing specific modules\n\nThe 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::\u003cMODULE NAME\u003e`][] class references.\n\nFor example, you can install the `mod_ssl` Apache module with default settings by declaring the [`apache::mod::ssl`][] class:\n\n``` puppet\nclass { 'apache::mod::ssl': }\n```\n\n[`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:\n\n``` puppet\nclass { 'apache::mod::ssl':\n  ssl_compression =\u003e true,\n}\n```\n\nYou can pass the SSL Ciphers to override the default ciphers.\n```puppet\nclass { 'apache::mod::ssl':\n  ssl_cipher =\u003e 'PROFILE=SYSTEM',\n}\n```\n\nYou can also pass the different [`ssl_cipher`][] for different SSL protocols. This allows you to fine-tune the ciphers based on the specific SSL/TLS protocol version being used. \n```puppet\nclass { 'apache::mod::ssl':\n  ssl_cipher =\u003e {\n    'TLSv1.1' =\u003e 'RSA:!EXP:!NULL:+HIGH:+MEDIUM'\n  },\n}\n```\n\nNote that some modules have prerequisites, which are documented in their references under [`apache::mod::\u003cMODULE NAME\u003e`][].\n\n#### Installing arbitrary modules\n\nYou 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.\n\nFor example, to install the [`mod_authnz_external`][] Apache module, declare the defined type with the 'mod_authnz_external' name:\n\n``` puppet\napache::mod { 'mod_authnz_external': }\n```\n\nThere are several optional parameters you can specify when defining Apache modules this way. See the [defined type's reference][`apache::mod`] for details.\n\n\u003ca id=\"load-balancing-examples\"\u003e\u003c/a\u003e \n### Load balancing examples\n\nApache 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.\n\nTo enable load balancing with [exported resources][], export the [`apache::balancermember`][] defined type from the load balancer member server:\n\n``` puppet\n@@apache::balancermember { \"${::fqdn}-puppet00\":\n  balancer_cluster =\u003e 'puppet00',\n  url              =\u003e \"ajp://${::fqdn}:8009\",\n  options          =\u003e ['ping=5', 'disablereuse=on', 'retry=5', 'ttl=120'],\n}\n```\n\nThen, on the proxy server, create the load balancing group:\n\n``` puppet\napache::balancer { 'puppet00': }\n```\n\nTo enable load balancing without exporting resources, declare the following on the proxy server:\n\n``` puppet\napache::balancer { 'puppet00': }\n\napache::balancermember { \"${::fqdn}-puppet00\":\n  balancer_cluster =\u003e 'puppet00',\n  url              =\u003e \"ajp://${::fqdn}:8009\",\n  options          =\u003e ['ping=5', 'disablereuse=on', 'retry=5', 'ttl=120'],\n}\n```\n\nThen declare the `apache::balancer` and `apache::balancermember` defined types on the proxy server.\n\nTo 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`:\n\n``` puppet\napache::balancer { 'puppet01':\n  proxy_set =\u003e {\n    'stickysession' =\u003e 'JSESSIONID',\n    'lbmethod'      =\u003e 'bytraffic',\n  },\n}\n```\n\nLoad balancing scheduler algorithms (`lbmethod`) are listed [in mod_proxy_balancer documentation](https://httpd.apache.org/docs/current/mod/mod_proxy_balancer.html).\n\n\u003ca id=\"reference\"\u003e\u003c/a\u003e \n## Reference\n\nFor information on classes, types and functions see the [REFERENCE.md](https://github.com/puppetlabs/puppetlabs-apache/blob/main/REFERENCE.md)\n\n### Templates\n\nThe 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.\n\n### Tasks\n\nThe 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.\n\n\u003ca id=\"limitations\"\u003e\u003c/a\u003e\n## Limitations\n\nFor an extensive list of supported operating systems, see [metadata.json](https://github.com/puppetlabs/puppetlabs-apache/blob/main/metadata.json)\n\n### FreeBSD\n\nIn order to use this module on FreeBSD, you _must_ use apache24-2.4.12 (www/apache24) or newer.\n\n### Gentoo\n\nOn 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.\n\n### RHEL/CentOS\n\nThe [`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.\n\nSee their respective documentation below for related repositories and packages.\n\n#### RHEL/CentOS 5\n\nThe [`apache::mod::passenger`][] and [`apache::mod::proxy_html`][] classes are untested because repositories are missing compatible packages.\n\n#### RHEL/CentOS 6\n\nThe [`apache::mod::passenger`][] class is not installing, because the EL6 repository is missing compatible packages.\n\n#### RHEL/CentOS 7\n\nThe [`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_uri`][] parameter.\n\n### SELinux and custom paths\n\nIf [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.\n\nYou can do this with Puppet:\n\n``` puppet\nexec { 'set_apache_defaults':\n  command =\u003e 'semanage fcontext -a -t httpd_sys_content_t \"/custom/path(/.*)?\"',\n  path    =\u003e '/bin:/usr/bin/:/sbin:/usr/sbin',\n  require =\u003e Package['policycoreutils-python'],\n}\n\npackage { 'policycoreutils-python':\n  ensure =\u003e installed,\n}\n\nexec { 'restorecon_apache':\n  command =\u003e 'restorecon -Rv /apache_spec',\n  path    =\u003e '/bin:/usr/bin/:/sbin:/usr/sbin',\n  before  =\u003e Class['Apache::Service'],\n  require =\u003e Class['apache'],\n}\n\nclass { 'apache': }\n\nhost { 'test.server':\n  ip =\u003e '127.0.0.1',\n}\n\nfile { '/custom/path':\n  ensure =\u003e directory,\n}\n\nfile { '/custom/path/include':\n  ensure  =\u003e present,\n  content =\u003e '#additional_includes',\n}\n\napache::vhost { 'test.server':\n  docroot             =\u003e '/custom/path',\n  additional_includes =\u003e '/custom/path/include',\n}\n```\n\n**NOTE:** On RHEL 8, the SELinux packages contained in `policycoreutils-python` have been replaced by the `policycoreutils-python-utils` package.\nSee [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.\n\nYou 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.\n\n\u003ca id=\"development\"\u003e\u003c/a\u003e \n## Development\n\n### Testing\n\nTo run the unit tests, install the necessary gems:\n\n```\nbundle install\n```\n\nAnd then execute the command:\n\n```\nbundle exec rake parallel_spec\n```\n\nTo check the code coverage, run:\n\n```\nCOVERAGE=yes bundle exec rake parallel_spec\n```\n\n\n\nAcceptance tests for this module leverage [puppet_litmus](https://github.com/puppetlabs/puppet_litmus).\nTo run the acceptance tests follow the instructions [here](https://puppetlabs.github.io/litmus/Running-acceptance-tests.html). You can also find a tutorial and walkthrough of using Litmus and the PDK on [YouTube](https://www.youtube.com/watch?v=FYfR7ZEGHoE).\n\n\u003ca id=\"license\"\u003e\u003c/a\u003e \n## License\n\nThis codebase is licensed under the Apache2.0 licensing, however due to the nature of the codebase the open source dependencies may also use a combination of [AGPL](https://opensource.org/license/agpl-v3/), [BSD-2](https://opensource.org/license/bsd-2-clause/), [BSD-3](https://opensource.org/license/bsd-3-clause/), [GPL2.0](https://opensource.org/license/gpl-2-0/), [LGPL](https://opensource.org/license/lgpl-3-0/), [MIT](https://opensource.org/license/mit/) and [MPL](https://opensource.org/license/mpl-2-0/) Licensing.\n\n### Development Support\nIf you run into an issue with this module, or if you would like to request a feature, please [file a ticket](https://github.com/puppetlabs/puppetlabs-apache/issues).\nEvery 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).\n\nIf you have problems getting this module up and running, please [contact Support](http://puppetlabs.com/services/customer-support).\n\nIf you submit a change to this module, be sure to regenerate the reference documentation as follows:\n\n```bash\npuppet strings generate --format markdown --out REFERENCE.md\n```\n\n### Apache MOD Test \u0026 Support Lifecycle\n#### Adding Support for a new Apache MOD\nSupport for new [Apache Modules] can be added under the [`apache::mod`] namespace.\nAcceptance tests should be added for each new [Apache Module][Apache Modules] added.\nIdeally, 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.\nThis could be for one or more of the following reasons:\n- Package not available in default repositories of distro\n- Package dependencies not available in default repositories of distro\n- Package (and/or its dependencies) are only available in a specific version of an OS\n\nIn these cases, it is possible to exclude a module from a test platform using a specific tag, defined above the class declaration:\n```puppet\n# @note Unsupported platforms: OS: ver, ver; OS: ver, ver, ver; OS: all\nclass apache::mod::foobar {\n...\n}\n```\nFor example:\n```puppet\n# @note Unsupported platforms: RedHat: 5, 6; Ubuntu: 14.04; SLES: all; Scientific: 11 SP1\nclass apache::mod::actions {\n...\n}\n```\nPlease be aware of the following format guidelines for the tag:\n- All OS/Version declarations must be preceded with `@note Unsupported platforms:`\n- The tag must be declared ABOVE the class declaration (i.e. not as footer at the bottom of the file)\n- Each OS/Version declaration must be separated by semicolons (`;`)\n- Each version must be separated by a comma (`,`)\n- Versions CANNOT be declared in ranges (e.g. `RedHat:5-7`), they should be explicitly declared (e.g. `RedHat:5,6,7`)\n- However, to declare all versions of an OS as unsupported, use the word `all` (e.g. `SLES:all`)\n- OSs with word characters as part of their versions are acceptable (e.g. `Scientific: 11 SP1, 11 SP2, 12, 13`)\n- Spaces are permitted between OS/Version declarations and version numbers within a declaration\n- Refer to the `operatingsystem_support` values in the `metadata.json` to find the acceptable OS name and version syntax:\n  - E.g. `OracleLinux` OR `oraclelinux`, not: `Oracle` or `OraLinux`\n  - E.g. `RedHat` OR `redhat`, not: `Red Hat Enterprise Linux`, `RHEL`, or `Red Hat`\n\nIf 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.\nThis will not halt the execution of other tests.  \n\nOnce 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:\n```ruby\ndescribe 'auth_oidc', if: mod_supported_on_platform('apache::mod::auth_openidc') do\n```\nThe `mod_supported_on_platform` helper method takes the [Apache Module][Apache Modules] class definition as defined in the manifests under `manifest/mod`.\n\nThis functionality can be disabled by setting the `DISABLE_MOD_TEST_EXCLUSION` environment variable.\nWhen set, all exclusions will be ignored.\n#### Test Support Lifecycle\nThe puppetlabs-apache module supports a large number of compatible platforms and [Apache Modules][Apache modules].\nAs a result, Apache Module tests can fail because a package or package dependency has been removed from a Linux distribution repository.\nThe [CAT Team][CAT Team] will try to resolve these issues and keep instructions updated, but due to limited resources this won’t always be possible.\nIn these cases, we will exclude test(s) from certain platforms.\nAs always, we welcome help from our community members, and the CAT(Content \u0026 Tooling) team is here to assist and answer questions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpuppetlabs%2Fpuppetlabs-apache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpuppetlabs%2Fpuppetlabs-apache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpuppetlabs%2Fpuppetlabs-apache/lists"}