| <body md-src-pos="0..104443"> | |
| <h1 md-src-pos="0..7">apache</h1> | |
| <h4 md-src-pos="9..30">Table of Contents</h4> | |
| <ol md-src-pos="32..3180"><li md-src-pos="32..85"> | |
| <a href="#overview" md-src-pos="35..85">Overview - What is the apache module?</a> | |
| </li><li md-src-pos="86..157"> | |
| <a href="#module-description" md-src-pos="89..157">Module Description - What does the module do?</a> | |
| </li><li md-src-pos="158..385"> | |
| <a href="#setup" md-src-pos="161..220">Setup - The basics of getting started with apache</a> | |
| <ul md-src-pos="224..385"><li md-src-pos="224..289"> | |
| <a href="#beginning-with-apache" md-src-pos="227..289">Beginning with apache - Installation</a> | |
| </li><li md-src-pos="293..385"> | |
| <a href="#configure-a-virtual-host" md-src-pos="296..385">Configure a virtual host - Basic options for getting started</a> | |
| </li></ul> | |
| </li><li md-src-pos="386..2557"> | |
| <a href="#usage" md-src-pos="389..464">Usage - The classes and defined types available for configuration</a> | |
| <ul md-src-pos="468..2557"><li md-src-pos="468..2168"> | |
| <a href="#classes-and-defined-types" md-src-pos="471..526">Classes and Defined Types</a> | |
| <ul md-src-pos="533..2168"><li md-src-pos="533..567"> | |
| <a href="#class-apache" md-src-pos="537..567">Class: apache</a> | |
| </li><li md-src-pos="574..650"> | |
| <a href="#defined-type-apachecustom_config" md-src-pos="578..650">Defined Type: apache::custom_config</a> | |
| </li><li md-src-pos="657..717"> | |
| <a href="#class-apachedefault_mods" md-src-pos="661..717">Class: apache::default_mods</a> | |
| </li><li md-src-pos="724..780"> | |
| <a href="#defined-type-apachemod" md-src-pos="728..780">Defined Type: apache::mod</a> | |
| </li><li md-src-pos="787..840"> | |
| <a href="#classes-apachemodname" md-src-pos="791..840">Classes: apache::mod::*</a> | |
| </li><li md-src-pos="847..901"> | |
| <a href="#class-apachemodalias" md-src-pos="851..901">Class: apache::mod::alias</a> | |
| </li><li md-src-pos="908..962"> | |
| <a href="#class-apachemodevent" md-src-pos="912..962">Class: apache::mod::event</a> | |
| </li><li md-src-pos="969..1023"> | |
| <a href="#class-apachemodgeoip" md-src-pos="973..1023">Class: apache::mod::geoip</a> | |
| </li><li md-src-pos="1030..1082"> | |
| <a href="#class-apachemodinfo" md-src-pos="1034..1082">Class: apache::mod::info</a> | |
| </li><li md-src-pos="1089..1151"> | |
| <a href="#class-apachemodpagespeed" md-src-pos="1093..1151">Class: apache::mod::pagespeed</a> | |
| </li><li md-src-pos="1158..1208"> | |
| <a href="#class-apachemodphp" md-src-pos="1162..1208">Class: apache::mod::php</a> | |
| </li><li md-src-pos="1215..1265"> | |
| <a href="#class-apachemodssl" md-src-pos="1219..1265">Class: apache::mod::ssl</a> | |
| </li><li md-src-pos="1272..1328"> | |
| <a href="#class-apachemodstatus" md-src-pos="1276..1328">Class: apache::mod::status</a> | |
| </li><li md-src-pos="1335..1393"> | |
| <a href="#class-apachemodexpires" md-src-pos="1339..1393">Class: apache::mod::expires</a> | |
| </li><li md-src-pos="1400..1452"> | |
| <a href="#class-apachemodwsgi" md-src-pos="1404..1452">Class: apache::mod::wsgi</a> | |
| </li><li md-src-pos="1459..1513"> | |
| <a href="#class-apachemodfcgid" md-src-pos="1463..1513">Class: apache::mod::fcgid</a> | |
| </li><li md-src-pos="1520..1586"> | |
| <a href="#class-apachemodnegotiation" md-src-pos="1524..1586">Class: apache::mod::negotiation</a> | |
| </li><li md-src-pos="1593..1651"> | |
| <a href="#class-apachemoddeflate" md-src-pos="1597..1651">Class: apache::mod::deflate</a> | |
| </li><li md-src-pos="1658..1722"> | |
| <a href="#class-apachemodreqtimeout" md-src-pos="1662..1722">Class: apache::mod::reqtimeout</a> | |
| </li><li md-src-pos="1729..1783"> | |
| <a href="#class-modsecurity" md-src-pos="1733..1783">Class: apache::mod::security</a> | |
| </li><li md-src-pos="1790..1848"> | |
| <a href="#class-apachemodversion" md-src-pos="1794..1848">Class: apache::mod::version</a> | |
| </li><li md-src-pos="1855..1915"> | |
| <a href="#defined-type-apachevhost" md-src-pos="1859..1915">Defined Type: apache::vhost</a> | |
| </li><li md-src-pos="1922..2010"> | |
| <a href="#parameter-directories-for-apachevhost" md-src-pos="1926..2010"> | |
| Parameter: <code md-src-pos="1938..1951">directories</code> | |
| for apache::vhost</a> | |
| </li><li md-src-pos="2017..2088"> | |
| <a href="#ssl-parameters-for-apachevhost" md-src-pos="2021..2088">SSL parameters for apache::vhost</a> | |
| </li><li md-src-pos="2095..2168"> | |
| <a href="#defined-type-fastcgi-server" md-src-pos="2099..2168">Defined Type: apache::fastcgi::server</a> | |
| </li></ul> | |
| </li><li md-src-pos="2172..2269"> | |
| <a href="#virtual-host-examples" md-src-pos="2175..2269">Virtual Host Examples - Demonstrations of some configuration options</a> | |
| </li><li md-src-pos="2273..2557"> | |
| <a href="#load-balancing" md-src-pos="2276..2309">Load Balancing</a> | |
| <ul md-src-pos="2316..2557"><li md-src-pos="2316..2382"> | |
| <a href="#defined-type-apachebalancer" md-src-pos="2320..2382">Defined Type: apache::balancer</a> | |
| </li><li md-src-pos="2389..2467"> | |
| <a href="#defined-type-apachebalancermember" md-src-pos="2393..2467">Defined Type: apache::balancermember</a> | |
| </li><li md-src-pos="2474..2557"> | |
| <a href="#examples" md-src-pos="2478..2557">Examples - Load balancing with exported and non-exported resources</a> | |
| </li></ul> | |
| </li></ul> | |
| </li><li md-src-pos="2558..2943"> | |
| <a href="#reference" md-src-pos="2561..2645">Reference - An under-the-hood peek at what the module is doing and how</a> | |
| <ul md-src-pos="2649..2943"><li md-src-pos="2649..2761"> | |
| <a href="#classes" md-src-pos="2652..2671">Classes</a> | |
| <ul md-src-pos="2678..2761"><li md-src-pos="2678..2715"> | |
| <a href="#public-classes" md-src-pos="2682..2715">Public Classes</a> | |
| </li><li md-src-pos="2722..2761"> | |
| <a href="#private-classes" md-src-pos="2726..2761">Private Classes</a> | |
| </li></ul> | |
| </li><li md-src-pos="2765..2913"> | |
| <a href="#defined-types" md-src-pos="2768..2799">Defined Types</a> | |
| <ul md-src-pos="2806..2913"><li md-src-pos="2806..2855"> | |
| <a href="#public-defined-types" md-src-pos="2810..2855">Public Defined Types</a> | |
| </li><li md-src-pos="2862..2913"> | |
| <a href="#private-defined-types" md-src-pos="2866..2913">Private Defined Types</a> | |
| </li></ul> | |
| </li><li md-src-pos="2917..2943"> | |
| <a href="#templates" md-src-pos="2920..2943">Templates</a> | |
| </li></ul> | |
| </li><li md-src-pos="2944..2999"> | |
| <a href="#limitations" md-src-pos="2947..2999">Limitations - OS compatibility, etc.</a> | |
| </li><li md-src-pos="3000..3180"> | |
| <a href="#development" md-src-pos="3003..3069">Development - Guide for contributing to the module</a> | |
| <ul md-src-pos="3073..3180"><li md-src-pos="3073..3126"> | |
| <a href="#contributing" md-src-pos="3076..3126">Contributing to the apache module</a> | |
| </li><li md-src-pos="3130..3180"> | |
| <a href="#running-tests" md-src-pos="3133..3180">Running tests - A quick guide</a> | |
| </li></ul> | |
| </li></ol> | |
| <h2 md-src-pos="3182..3192">Overview</h2> | |
| <p md-src-pos="3194..3291">The apache module allows you to set up virtual hosts and manage web services with minimal effort.</p> | |
| <h2 md-src-pos="3293..3313">Module Description</h2> | |
| <p md-src-pos="3315..3612">Apache is a widely-used web server, and this module provides a simplified way of creating configurations to manage your infrastructure. This includes the ability to configure and manage a range of different virtual host setups, as well as a streamlined way to install and configure Apache modules.</p> | |
| <h2 md-src-pos="3614..3621">Setup</h2> | |
| <p md-src-pos="3623..3647"> | |
| <strong md-src-pos="3623..3647">What apache affects:</strong> | |
| </p> | |
| <ul md-src-pos="3649..3992"><li md-src-pos="3649..3794"> | |
| configuration files and directories (created and written to)<ul md-src-pos="3714..3794"><li md-src-pos="3714..3794"> | |
| <strong md-src-pos="3718..3729">WARNING</strong> | |
| : Configurations that are <em md-src-pos="3755..3760">not</em> | |
| managed by Puppet will be purged.</li></ul> | |
| </li><li md-src-pos="3795..3843">package/service/configuration files for Apache</li><li md-src-pos="3844..3860">Apache modules</li><li md-src-pos="3861..3876">virtual hosts</li><li md-src-pos="3877..3896">listened-to ports</li><li md-src-pos="3897..3937"> | |
| <code md-src-pos="3899..3915">/etc/make.conf</code> | |
| on FreeBSD and Gentoo</li><li md-src-pos="3938..3992">depends on module 'gentoo/puppet-portage' for Gentoo</li></ul> | |
| <h3 md-src-pos="3994..4018">Beginning with Apache</h3> | |
| <p md-src-pos="4020..4065">To install Apache with the default parameters</p> | |
| <pre><code class="language-puppet" md-src-pos="4067..4105"> class { 'apache': } | |
| </code></pre> | |
| <p md-src-pos="4107..4398">The defaults are determined by your operating system (e.g. Debian systems have one set of defaults, and RedHat systems have another, as do FreeBSD and Gentoo systems). These defaults work well in a testing environment, but are not suggested for production. To establish customized parameters</p> | |
| <pre><code class="language-puppet" md-src-pos="4400..4513"> class { 'apache': | |
| default_mods => false, | |
| default_confd_files => false, | |
| } | |
| </code></pre> | |
| <h3 md-src-pos="4515..4542">Configure a virtual host</h3> | |
| <p md-src-pos="4544..4697"> | |
| Declaring the <code md-src-pos="4558..4566">apache</code> | |
| class creates a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving <code md-src-pos="4678..4696">$apache::docroot</code> | |
| .</p> | |
| <pre><code class="language-puppet" md-src-pos="4699..4736"> class { 'apache': } | |
| </code></pre> | |
| <p md-src-pos="4738..4788">To configure a very basic, name-based virtual host</p> | |
| <pre><code class="language-puppet" md-src-pos="4790..4908"> apache::vhost { 'first.example.com': | |
| port => '80', | |
| docroot => '/var/www/first', | |
| } | |
| </code></pre> | |
| <p md-src-pos="4910..5112"> | |
| <em md-src-pos="4910..4917">Note:</em> | |
| The default priority is 15. If nothing matches this priority, the alphabetically first name-based vhost is used. This is also true if you pass a higher priority and no names match anything else.</p> | |
| <p md-src-pos="5114..5206">A slightly more complicated example, changes the docroot owner/group from the default 'root'</p> | |
| <pre><code class="language-puppet" md-src-pos="5208..5404"> apache::vhost { 'second.example.com': | |
| port => '80', | |
| docroot => '/var/www/second', | |
| docroot_owner => 'third', | |
| docroot_group => 'third', | |
| } | |
| </code></pre> | |
| <p md-src-pos="5406..5468">To set up a virtual host with SSL and default SSL certificates</p> | |
| <pre><code class="language-puppet" md-src-pos="5470..5608"> apache::vhost { 'ssl.example.com': | |
| port => '443', | |
| docroot => '/var/www/ssl', | |
| ssl => true, | |
| } | |
| </code></pre> | |
| <p md-src-pos="5610..5673">To set up a virtual host with SSL and specific SSL certificates</p> | |
| <pre><code class="language-puppet" md-src-pos="5675..5929"> apache::vhost { 'fourth.example.com': | |
| port => '443', | |
| docroot => '/var/www/fourth', | |
| ssl => true, | |
| ssl_cert => '/etc/ssl/fourth.example.com.cert', | |
| ssl_key => '/etc/ssl/fourth.example.com.key', | |
| } | |
| </code></pre> | |
| <p md-src-pos="5931..6005">Virtual hosts listen on '*' by default. To listen on a specific IP address</p> | |
| <pre><code class="language-puppet" md-src-pos="6007..6163"> apache::vhost { 'subdomain.example.com': | |
| ip => '127.0.0.1', | |
| port => '80', | |
| docroot => '/var/www/subdomain', | |
| } | |
| </code></pre> | |
| <p md-src-pos="6165..6327"> | |
| To set up a virtual host with a wildcard alias for the subdomain mapped to a same-named directory, for example: <code md-src-pos="6277..6301">http://example.com.loc</code> | |
| to <code md-src-pos="6305..6327">/var/www/example.com</code> | |
| </p> | |
| <pre><code class="language-puppet" md-src-pos="6329..6567"> apache::vhost { 'subdomain.loc': | |
| vhost_name => '*', | |
| port => '80', | |
| virtual_docroot => '/var/www/%-2+', | |
| docroot => '/var/www', | |
| serveraliases => ['*.loc',], | |
| } | |
| </code></pre> | |
| <p md-src-pos="6569..6604">To set up a virtual host with suPHP</p> | |
| <pre><code class="language-puppet" md-src-pos="6606..7035"> 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' }, | |
| } | |
| } | |
| </code></pre> | |
| <p md-src-pos="7037..7071">To set up a virtual host with WSGI</p> | |
| <pre><code class="language-puppet" md-src-pos="7073..7755"> 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' }, | |
| } | |
| </code></pre> | |
| <p md-src-pos="7757..7937"> | |
| Starting in Apache 2.2.16, HTTPD supports <a href="https://httpd.apache.org/docs/current/mod/mod_dir.html#fallbackresource" md-src-pos="7799..7890">FallbackResource</a> | |
| , a simple replacement for common RewriteRules.</p> | |
| <pre><code class="language-puppet" md-src-pos="7939..8132"> apache::vhost { 'wordpress.example.com': | |
| port => '80', | |
| docroot => '/var/www/wordpress', | |
| fallbackresource => '/index.php', | |
| } | |
| </code></pre> | |
| <p md-src-pos="8134..8233">Please note that the 'disabled' argument to FallbackResource is only supported since Apache 2.2.24.</p> | |
| <p md-src-pos="8235..8380"> | |
| See a list of all <a href="#defined-type-apachevhost" md-src-pos="8253..8305">virtual host parameters</a> | |
| . See an extensive list of <a href="#virtual-host-examples" md-src-pos="8332..8379">virtual host examples</a> | |
| .</p> | |
| <h2 md-src-pos="8382..8389">Usage</h2> | |
| <h3 md-src-pos="8391..8419">Classes and Defined Types</h3> | |
| <p md-src-pos="8421..8654">This module modifies Apache configuration files and directories and purges any configuration not managed by Puppet. Configuration of Apache should be managed by Puppet, as non-Puppet configuration files can cause unexpected failures.</p> | |
| <p md-src-pos="8656..8997"> | |
| It is possible to temporarily disable full Puppet management by setting the <a href="#purge_configs" md-src-pos="8732..8765"> | |
| <code md-src-pos="8733..8748">purge_configs</code> | |
| </a> | |
| parameter within the base <code md-src-pos="8792..8800">apache</code> | |
| class to 'false'. This option should only be used as a temporary means of saving and relocating customized configurations. See the <a href="#purge_configs" md-src-pos="8932..8975"> | |
| <code md-src-pos="8933..8948">purge_configs</code> | |
| parameter</a> | |
| for more information.</p> | |
| <h4 md-src-pos="8999..9018"> | |
| Class: <code md-src-pos="9010..9018">apache</code> | |
| </h4> | |
| <p md-src-pos="9020..9113"> | |
| The apache module's primary class, <code md-src-pos="9055..9063">apache</code> | |
| , guides the basic setup of Apache on your system.</p> | |
| <p md-src-pos="9115..9303"> | |
| You can establish a default vhost in this class, the <code md-src-pos="9168..9175">vhost</code> | |
| class, or both. You can add additional vhost configurations for specific virtual hosts using a declaration of the <code md-src-pos="9290..9297">vhost</code> | |
| type.</p> | |
| <p md-src-pos="9305..9336"> | |
| <strong md-src-pos="9305..9336"> | |
| Parameters within <code md-src-pos="9325..9333">apache</code> | |
| :</strong> | |
| </p> | |
| <h5 md-src-pos="9338..9366"> | |
| <code md-src-pos="9343..9366">allow_encoded_slashes</code> | |
| </h5> | |
| <p md-src-pos="9368..9757"> | |
| This sets the server default for the <a href="http://httpd.apache.org/docs/current/mod/core.html#allowencodedslashes" md-src-pos="9405..9512"> | |
| <code md-src-pos="9406..9427">AllowEncodedSlashes</code> | |
| declaration</a> | |
| which modifies the responses to URLs with <code md-src-pos="9555..9558"></code> | |
| and <code md-src-pos="9563..9566">/</code> | |
| characters. The default is undefined, which omits the declaration from the server configuration and select the Apache default setting of <code md-src-pos="9704..9709">Off</code> | |
| . Allowed values are: <code md-src-pos="9731..9735">on</code> | |
| , <code md-src-pos="9737..9742">off</code> | |
| or <code md-src-pos="9746..9756">nodecode</code> | |
| .</p> | |
| <h5 md-src-pos="9759..9780"> | |
| <code md-src-pos="9764..9780">apache_version</code> | |
| </h5> | |
| <p md-src-pos="9782..10040"> | |
| Configures the behavior of the module templates, package names, and default mods by setting the Apache version. Default is determined by the class <code md-src-pos="9929..9946">apache::version</code> | |
| using the OS family and release. It should not be configured manually without special reason.</p> | |
| <h5 md-src-pos="10042..10057"> | |
| <code md-src-pos="10047..10057">conf_dir</code> | |
| </h5> | |
| <p md-src-pos="10059..10287">Changes the location of the configuration directory the main configuration file is placed in. Defaults to '/etc/httpd/conf' on RedHat, '/etc/apache2' on Debian, '/usr/local/etc/apache22' on FreeBSD, and '/etc/apache2' on Gentoo.</p> | |
| <h5 md-src-pos="10289..10305"> | |
| <code md-src-pos="10294..10305">confd_dir</code> | |
| </h5> | |
| <p md-src-pos="10307..10554">Changes the location of the configuration directory your custom configuration files are placed in. Defaults to '/etc/httpd/conf' on RedHat, '/etc/apache2/conf.d' on Debian, '/usr/local/etc/apache22' on FreeBSD, and '/etc/apache2/conf.d' on Gentoo.</p> | |
| <h5 md-src-pos="10556..10576"> | |
| <code md-src-pos="10561..10576">conf_template</code> | |
| </h5> | |
| <p md-src-pos="10578..10682">Overrides the template used for the main apache configuration file. Defaults to 'apache/httpd.conf.erb'.</p> | |
| <p md-src-pos="10684..10858"> | |
| <em md-src-pos="10684..10691">Note:</em> | |
| Using this parameter is potentially risky, as the module has been built for a minimal configuration file with the configuration primarily coming from conf.d/ entries.</p> | |
| <h5 md-src-pos="10860..10882"> | |
| <code md-src-pos="10865..10882">default_charset</code> | |
| </h5> | |
| <p md-src-pos="10884..11000"> | |
| If defined, the value will be set as <code md-src-pos="10921..10940">AddDefaultCharset</code> | |
| in the main configuration file. It is undefined by default.</p> | |
| <h5 md-src-pos="11002..11028"> | |
| <code md-src-pos="11007..11028">default_confd_files</code> | |
| </h5> | |
| <p md-src-pos="11030..11246"> | |
| Generates default set of include-able Apache configuration files under <code md-src-pos="11102..11124">${apache::confd_dir}</code> | |
| directory. These configuration files correspond to what is usually installed with the Apache package on a given platform.</p> | |
| <h5 md-src-pos="11248..11267"> | |
| <code md-src-pos="11253..11267">default_mods</code> | |
| </h5> | |
| <p md-src-pos="11269..11383">Sets up Apache with default settings based on your OS. Valid values are 'true', 'false', or an array of mod names.</p> | |
| <p md-src-pos="11385..11532"> | |
| Defaults to 'true', which includes the default <a href="https://github.com/puppetlabs/puppetlabs-apache/blob/master/manifests/default_mods.pp" md-src-pos="11432..11531">HTTPD mods</a> | |
| .</p> | |
| <p md-src-pos="11534..11647">If false, it only includes the mods required to make HTTPD work, and any other mods can be declared on their own.</p> | |
| <p md-src-pos="11649..11714">If an array, the apache module includes the array of mods listed.</p> | |
| <h5 md-src-pos="11716..11737"> | |
| <code md-src-pos="11721..11737">default_ssl_ca</code> | |
| </h5> | |
| <p md-src-pos="11739..11942">The default certificate authority, which is automatically set to 'undef'. This default works out of the box but must be updated with your specific certificate information before being used in production.</p> | |
| <h5 md-src-pos="11944..11967"> | |
| <code md-src-pos="11949..11967">default_ssl_cert</code> | |
| </h5> | |
| <p md-src-pos="11969..12384">The default SSL certification, which is automatically set based on your operating system ('/etc/pki/tls/certs/localhost.crt' for RedHat, '/etc/ssl/certs/ssl-cert-snakeoil.pem' for Debian, '/usr/local/etc/apache22/server.crt' for FreeBSD, and '/etc/ssl/apache2/server.crt' for Gentoo). This default works out of the box but must be updated with your specific certificate information before being used in production.</p> | |
| <h5 md-src-pos="12386..12410"> | |
| <code md-src-pos="12391..12410">default_ssl_chain</code> | |
| </h5> | |
| <p md-src-pos="12412..12603">The default SSL chain, which is automatically set to 'undef'. This default works out of the box but must be updated with your specific certificate information before being used in production.</p> | |
| <h5 md-src-pos="12605..12627"> | |
| <code md-src-pos="12610..12627">default_ssl_crl</code> | |
| </h5> | |
| <p md-src-pos="12629..12845">The default certificate revocation list to use, which is automatically set to 'undef'. This default works out of the box but must be updated with your specific certificate information before being used in production.</p> | |
| <h5 md-src-pos="12847..12874"> | |
| <code md-src-pos="12852..12874">default_ssl_crl_path</code> | |
| </h5> | |
| <p md-src-pos="12876..13090">The default certificate revocation list path, which is automatically set to 'undef'. This default works out of the box but must be updated with your specific certificate information before being used in production.</p> | |
| <h5 md-src-pos="13092..13120"> | |
| <code md-src-pos="13097..13120">default_ssl_crl_check</code> | |
| </h5> | |
| <p md-src-pos="13122..13498"> | |
| Sets the default certificate revocation check level via the <a href="http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslcarevocationcheck" md-src-pos="13182..13290">SSLCARevocationCheck directive</a> | |
| , which is automatically set to 'undef'. This default works out of the box but must be specified when using CRLs in production. Only applicable to Apache 2.4 or higher, the value is ignored on older versions.</p> | |
| <h5 md-src-pos="13500..13522"> | |
| <code md-src-pos="13505..13522">default_ssl_key</code> | |
| </h5> | |
| <p md-src-pos="13524..13932">The default SSL key, which is automatically set based on your operating system ('/etc/pki/tls/private/localhost.key' for RedHat, '/etc/ssl/private/ssl-cert-snakeoil.key' for Debian, '/usr/local/etc/apache22/server.key' for FreeBSD, and '/etc/ssl/apache2/server.key' for Gentoo). This default works out of the box but must be updated with your specific certificate information before being used in production.</p> | |
| <h5 md-src-pos="13934..13958"> | |
| <code md-src-pos="13939..13958">default_ssl_vhost</code> | |
| </h5> | |
| <p md-src-pos="13960..14063">Sets up a default SSL virtual host. Defaults to 'false'. If set to 'true', sets up the following vhost:</p> | |
| <pre><code class="language-puppet" md-src-pos="14065..14346"> apache::vhost { 'default-ssl': | |
| port => 443, | |
| ssl => true, | |
| docroot => $docroot, | |
| scriptalias => $scriptalias, | |
| serveradmin => $serveradmin, | |
| access_log_file => "ssl_${access_log_file}", | |
| } | |
| </code></pre> | |
| <p md-src-pos="14348..14389">SSL vhosts only respond to HTTPS queries.</p> | |
| <h5 md-src-pos="14391..14410"> | |
| <code md-src-pos="14396..14410">default_type</code> | |
| </h5> | |
| <p md-src-pos="14412..14657">(Apache httpd 2.2 only) MIME content-type that will be sent if the server cannot determine a type in any other way. This directive has been deprecated in Apache httpd 2.4, and only exists there for backwards compatibility of configuration files.</p> | |
| <h5 md-src-pos="14659..14679"> | |
| <code md-src-pos="14664..14679">default_vhost</code> | |
| </h5> | |
| <p md-src-pos="14681..14812"> | |
| Sets up a default virtual host. Defaults to 'true', set to 'false' to set up <a href="#configure-a-virtual-host" md-src-pos="14758..14811">customized virtual hosts</a> | |
| .</p> | |
| <h5 md-src-pos="14814..14828"> | |
| <code md-src-pos="14819..14828">docroot</code> | |
| </h5> | |
| <p md-src-pos="14830..15094"> | |
| Changes the location of the default <a href="https://httpd.apache.org/docs/current/mod/core.html#documentroot" md-src-pos="14866..14946">Documentroot</a> | |
| . Defaults to '/var/www/html' on RedHat, '/var/www' on Debian, '/usr/local/www/apache22/data' on FreeBSD, and '/var/www/localhost/htdocs' on Gentoo.</p> | |
| <h5 md-src-pos="15096..15118"> | |
| <code md-src-pos="15101..15118">error_documents</code> | |
| </h5> | |
| <p md-src-pos="15120..15172">Enables custom error documents. Defaults to 'false'.</p> | |
| <h5 md-src-pos="15174..15186"> | |
| <code md-src-pos="15179..15186">group</code> | |
| </h5> | |
| <p md-src-pos="15188..15617"> | |
| Changes the group that Apache will answer requests as. The parent process will continue to be run as root, but resource accesses by child processes will be done under this group. By default, puppet will attempt to manage this group as a resource under <code md-src-pos="15440..15450">::apache</code> | |
| . If this is not what you want, set <a href="#manage_group" md-src-pos="15486..15517"> | |
| <code md-src-pos="15487..15501">manage_group</code> | |
| </a> | |
| to 'false'. Defaults to the OS-specific default user for apache, as detected in <code md-src-pos="15598..15616">::apache::params</code> | |
| .</p> | |
| <h5 md-src-pos="15619..15635"> | |
| <code md-src-pos="15624..15635">httpd_dir</code> | |
| </h5> | |
| <p md-src-pos="15637..16012">Changes the base location of the configuration directories used for the apache service. This is useful for specially repackaged HTTPD builds, but might have unintended consequences when used in combination with the default distribution packages. Defaults to '/etc/httpd' on RedHat, '/etc/apache2' on Debian, '/usr/local/etc/apache22' on FreeBSD, and '/etc/apache2' on Gentoo.</p> | |
| <h5 md-src-pos="16014..16030"> | |
| <code md-src-pos="16019..16030">keepalive</code> | |
| </h5> | |
| <p md-src-pos="16032..16063">Enables persistent connections.</p> | |
| <h5 md-src-pos="16065..16089"> | |
| <code md-src-pos="16070..16089">keepalive_timeout</code> | |
| </h5> | |
| <p md-src-pos="16091..16201">Sets the amount of time the server waits for subsequent requests on a persistent connection. Defaults to '15'.</p> | |
| <h5 md-src-pos="16203..16232"> | |
| <code md-src-pos="16208..16232">max_keepalive_requests</code> | |
| </h5> | |
| <p md-src-pos="16234..16338">Sets the limit of the number of requests allowed per connection when KeepAlive is on. Defaults to '100'.</p> | |
| <h5 md-src-pos="16340..16355"> | |
| <code md-src-pos="16345..16355">lib_path</code> | |
| </h5> | |
| <p md-src-pos="16357..16478">Specifies the location where apache module files are stored. It should not be configured manually without special reason.</p> | |
| <h5 md-src-pos="16480..16500"> | |
| <code md-src-pos="16485..16500">loadfile_name</code> | |
| </h5> | |
| <p md-src-pos="16502..16625">Sets the file name for the module loadfile. Should be in the format *.load. This can be used to set the module load order.</p> | |
| <h5 md-src-pos="16627..16643"> | |
| <code md-src-pos="16632..16643">log_level</code> | |
| </h5> | |
| <p md-src-pos="16645..16800">Changes the verbosity level of the error log. Defaults to 'warn'. Valid values are 'emerg', 'alert', 'crit', 'error', 'warn', 'notice', 'info', or 'debug'.</p> | |
| <h5 md-src-pos="16802..16820"> | |
| <code md-src-pos="16807..16820">log_formats</code> | |
| </h5> | |
| <p md-src-pos="16822..16950"> | |
| Define additional <a href="https://httpd.apache.org/docs/current/mod/mod_log_config.html#logformat" md-src-pos="16840..16925">LogFormats</a> | |
| . This is done in a Hash:</p> | |
| <pre><code class="language-puppet" md-src-pos="16952..17033"> $log_formats = { vhost_common => '%v %h %l %u %t \"%r\" %>s %b' } | |
| </code></pre> | |
| <h5 md-src-pos="17035..17049"> | |
| <code md-src-pos="17040..17049">logroot</code> | |
| </h5> | |
| <p md-src-pos="17051..17264">Changes the directory where Apache log files for the virtual host are placed. Defaults to '/var/log/httpd' on RedHat, '/var/log/apache2' on Debian, '/var/log/apache22' on FreeBSD, and '/var/log/apache2' on Gentoo.</p> | |
| <h5 md-src-pos="17266..17285"> | |
| <code md-src-pos="17271..17285">logroot_mode</code> | |
| </h5> | |
| <p md-src-pos="17287..17568"> | |
| Overrides the mode the default logroot directory is set to ($::apache::logroot). Defaults to undef. Do NOT give people write access to the directory the logs are stored | |
| in without being aware of the consequences; see <a href="http://httpd.apache.org/docs/2.4/logs.html#security" md-src-pos="17504..17555">http://httpd.apache.org/docs/2.4/logs.html#security</a> | |
| for details.</p> | |
| <h5 md-src-pos="17570..17589"> | |
| <code md-src-pos="17575..17589">manage_group</code> | |
| </h5> | |
| <p md-src-pos="17591..17878">Setting this to 'false' stops the group resource from being created. This is for when you have a group, created from another Puppet module, you want to use to run Apache. Without this parameter, attempting to use a previously established group would result in a duplicate resource error.</p> | |
| <h5 md-src-pos="17880..17898"> | |
| <code md-src-pos="17885..17898">manage_user</code> | |
| </h5> | |
| <p md-src-pos="17900..18194">Setting this to 'false' stops the user resource from being created. 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.</p> | |
| <h5 md-src-pos="18196..18210"> | |
| <code md-src-pos="18201..18210">mod_dir</code> | |
| </h5> | |
| <p md-src-pos="18212..18491">Changes the location of the configuration directory your Apache modules configuration files are placed in. Defaults to '/etc/httpd/conf.d' for RedHat, '/etc/apache2/mods-available' for Debian, '/usr/local/etc/apache22/Modules' for FreeBSD, and '/etc/apache2/modules.d' on Gentoo.</p> | |
| <h5 md-src-pos="18493..18510"> | |
| <code md-src-pos="18498..18510">mpm_module</code> | |
| </h5> | |
| <p md-src-pos="18512..18825">Determines which MPM is loaded and configured for the HTTPD process. Valid values are 'event', 'itk', 'peruser', 'prefork', 'worker', or 'false'. Defaults to 'prefork' on RedHat, FreeBSD and Gentoo, and 'worker' on Debian. Must be set to 'false' to explicitly declare the following classes with custom parameters:</p> | |
| <ul md-src-pos="18827..18944"><li md-src-pos="18827..18849"> | |
| <code md-src-pos="18829..18849">apache::mod::event</code> | |
| </li><li md-src-pos="18850..18870"> | |
| <code md-src-pos="18852..18870">apache::mod::itk</code> | |
| </li><li md-src-pos="18871..18895"> | |
| <code md-src-pos="18873..18895">apache::mod::peruser</code> | |
| </li><li md-src-pos="18896..18920"> | |
| <code md-src-pos="18898..18920">apache::mod::prefork</code> | |
| </li><li md-src-pos="18921..18944"> | |
| <code md-src-pos="18923..18944">apache::mod::worker</code> | |
| </li></ul> | |
| <p md-src-pos="18946..19140"> | |
| <em md-src-pos="18946..18953">Note:</em> | |
| Switching between different MPMs on FreeBSD is possible but quite difficult. Before changing <code md-src-pos="19047..19060">$mpm_module</code> | |
| you must uninstall all packages that depend on your currently-installed Apache.</p> | |
| <h5 md-src-pos="19142..19163"> | |
| <code md-src-pos="19147..19163">package_ensure</code> | |
| </h5> | |
| <p md-src-pos="19165..19262">Allows control over the package ensure attribute. Can be 'present','absent', or a version string.</p> | |
| <h5 md-src-pos="19264..19281"> | |
| <code md-src-pos="19269..19281">ports_file</code> | |
| </h5> | |
| <p md-src-pos="19283..19387"> | |
| Changes the name of the file containing Apache ports configuration. Default is <code md-src-pos="19362..19386">${conf_dir}/ports.conf</code> | |
| .</p> | |
| <h5 md-src-pos="19389..19409"> | |
| <code md-src-pos="19394..19409">purge_configs</code> | |
| </h5> | |
| <p md-src-pos="19411..19701">Removes all other Apache configs and vhosts, defaults to 'true'. Setting this to 'false' is a stopgap measure to allow the apache module to coexist with existing or otherwise-managed configuration. It is recommended that you move your configuration entirely to resources within this module.</p> | |
| <h5 md-src-pos="19703..19729"> | |
| <code md-src-pos="19708..19729">purge_vhost_configs</code> | |
| </h5> | |
| <p md-src-pos="19731..20057"> | |
| If <code md-src-pos="19734..19745">vhost_dir</code> | |
| != <code md-src-pos="19749..19760">confd_dir</code> | |
| , this controls the removal of any configurations that are not managed by Puppet within <code md-src-pos="19848..19859">vhost_dir</code> | |
| . It defaults to the value of <code md-src-pos="19889..19904">purge_configs</code> | |
| . Setting this to false is a stopgap measure to allow the apache module to coexist with existing or otherwise unmanaged configurations within <code md-src-pos="20046..20057">vhost_dir</code> | |
| </p> | |
| <h5 md-src-pos="20059..20074"> | |
| <code md-src-pos="20064..20074">sendfile</code> | |
| </h5> | |
| <p md-src-pos="20076..20159">Makes Apache use the Linux kernel sendfile to serve static files. Defaults to 'On'.</p> | |
| <h5 md-src-pos="20161..20179"> | |
| <code md-src-pos="20166..20179">serveradmin</code> | |
| </h5> | |
| <p md-src-pos="20181..20241">Sets the server administrator. Defaults to 'root@localhost'.</p> | |
| <h5 md-src-pos="20243..20260"> | |
| <code md-src-pos="20248..20260">servername</code> | |
| </h5> | |
| <p md-src-pos="20262..20322"> | |
| Sets the server name. Defaults to <code md-src-pos="20296..20302">fqdn</code> | |
| provided by Facter.</p> | |
| <h5 md-src-pos="20324..20342"> | |
| <code md-src-pos="20329..20342">server_root</code> | |
| </h5> | |
| <p md-src-pos="20344..20509">Sets the root directory in which the server resides. Defaults to '/etc/httpd' on RedHat, '/etc/apache2' on Debian, '/usr/local' on FreeBSD, and '/var/www' on Gentoo.</p> | |
| <h5 md-src-pos="20511..20534"> | |
| <code md-src-pos="20516..20534">server_signature</code> | |
| </h5> | |
| <p md-src-pos="20536..20731"> | |
| Configures a trailing footer line under server-generated documents. More information about <a href="http://httpd.apache.org/docs/current/mod/core.html#serversignature" md-src-pos="20627..20712">ServerSignature</a> | |
| . Defaults to 'On'.</p> | |
| <h5 md-src-pos="20733..20753"> | |
| <code md-src-pos="20738..20753">server_tokens</code> | |
| </h5> | |
| <p md-src-pos="20755..20973"> | |
| Controls how much information Apache sends to the browser about itself and the operating system. More information about <a href="http://httpd.apache.org/docs/current/mod/core.html#servertokens" md-src-pos="20875..20954">ServerTokens</a> | |
| . Defaults to 'OS'.</p> | |
| <h5 md-src-pos="20975..20996"> | |
| <code md-src-pos="20980..20996">service_enable</code> | |
| </h5> | |
| <p md-src-pos="20998..21093">Determines whether the HTTPD service is enabled when the machine is booted. Defaults to 'true'.</p> | |
| <h5 md-src-pos="21095..21116"> | |
| <code md-src-pos="21100..21116">service_ensure</code> | |
| </h5> | |
| <p md-src-pos="21118..21452">Determines whether the service should be running. Valid values are 'true', 'false', 'running', or 'stopped' when Puppet should manage the service. Any other value sets ensure to 'false' for the Apache service, which is useful when you want to let the service be managed by some other application like Pacemaker. Defaults to 'running'.</p> | |
| <h5 md-src-pos="21454..21473"> | |
| <code md-src-pos="21459..21473">service_name</code> | |
| </h5> | |
| <p md-src-pos="21475..21600">Name of the Apache service to run. Defaults to: 'httpd' on RedHat, 'apache2' on Debian and Gentoo, and 'apache22' on FreeBSD.</p> | |
| <h5 md-src-pos="21602..21623"> | |
| <code md-src-pos="21607..21623">service_manage</code> | |
| </h5> | |
| <p md-src-pos="21625..21710">Determines whether the HTTPD service state is managed by Puppet . Defaults to 'true'.</p> | |
| <h5 md-src-pos="21712..21734"> | |
| <code md-src-pos="21717..21734">service_restart</code> | |
| </h5> | |
| <p md-src-pos="21736..21869">Determines whether the HTTPD service restart command should be anything other than the default managed by Puppet. Defaults to undef.</p> | |
| <h5 md-src-pos="21872..21891"> | |
| <code md-src-pos="21877..21891">trace_enable</code> | |
| </h5> | |
| <p md-src-pos="21893..22066"> | |
| Controls how TRACE requests per RFC 2616 are handled. More information about <a href="http://httpd.apache.org/docs/current/mod/core.html#traceenable" md-src-pos="21970..22047">TraceEnable</a> | |
| . Defaults to 'On'.</p> | |
| <h5 md-src-pos="22068..22084"> | |
| <code md-src-pos="22073..22084">vhost_dir</code> | |
| </h5> | |
| <p md-src-pos="22086..22358">Changes the location of the configuration directory your virtual host configuration files are placed in. Defaults to 'etc/httpd/conf.d' on RedHat, '/etc/apache2/sites-available' on Debian, '/usr/local/etc/apache22/Vhosts' on FreeBSD, and '/etc/apache2/vhosts.d' on Gentoo.</p> | |
| <h5 md-src-pos="22360..22371"> | |
| <code md-src-pos="22365..22371">user</code> | |
| </h5> | |
| <p md-src-pos="22373..22796"> | |
| Changes the user that Apache will answer requests as. The parent process will continue to be run as root, but resource accesses by child processes will be done under this user. By default, puppet will attept to manage this user as a resource under <code md-src-pos="22621..22631">::apache</code> | |
| . If this is not what you want, set <a href="#manage_user" md-src-pos="22667..22696"> | |
| <code md-src-pos="22668..22681">manage_user</code> | |
| </a> | |
| to 'false'. Defaults to the OS-specific default user for apache, as detected in <code md-src-pos="22777..22795">::apache::params</code> | |
| .</p> | |
| <h5 md-src-pos="22798..22816"> | |
| <code md-src-pos="22803..22816">apache_name</code> | |
| </h5> | |
| <p md-src-pos="22818..23045"> | |
| The name of the Apache package to install. This is automatically detected in <code md-src-pos="22895..22913">::apache::params</code> | |
| . You might need to override this if you are using a non-standard Apache package, such as those from Red Hat's software collections.</p> | |
| <h4 md-src-pos="23047..23088"> | |
| Defined Type: <code md-src-pos="23065..23088">apache::custom_config</code> | |
| </h4> | |
| <p md-src-pos="23090..23318"> | |
| Allows you to create custom configs for Apache. The configuration files are only added to the Apache confd dir if the file is valid. An error is raised during the Puppet run if the file is invalid and <code md-src-pos="23291..23307">$verify_config</code> | |
| is <code md-src-pos="23311..23317">true</code> | |
| .</p> | |
| <pre><code class="language-puppet" md-src-pos="23320..23404"> apache::custom_config { 'test': | |
| content => '# Test', | |
| } | |
| </code></pre> | |
| <p md-src-pos="23406..23452"> | |
| <strong md-src-pos="23406..23452"> | |
| Parameters within <code md-src-pos="23426..23449">apache::custom_config</code> | |
| :</strong> | |
| </p> | |
| <h5 md-src-pos="23454..23467"> | |
| <code md-src-pos="23459..23467">ensure</code> | |
| </h5> | |
| <p md-src-pos="23469..23593">Specify whether the configuration file is present or absent. Defaults to 'present'. Valid values are 'present' and 'absent'.</p> | |
| <h5 md-src-pos="23595..23609"> | |
| <code md-src-pos="23600..23609">confdir</code> | |
| </h5> | |
| <p md-src-pos="23611..23696"> | |
| The directory to place the configuration file in. Defaults to <code md-src-pos="23673..23695">$::apache::confd_dir</code> | |
| .</p> | |
| <h5 md-src-pos="23698..23712"> | |
| <code md-src-pos="23703..23712">content</code> | |
| </h5> | |
| <p md-src-pos="23714..23807"> | |
| The content of the configuration file. Only one of <code md-src-pos="23765..23775">$content</code> | |
| and <code md-src-pos="23780..23789">$source</code> | |
| can be specified.</p> | |
| <h5 md-src-pos="23809..23824"> | |
| <code md-src-pos="23814..23824">priority</code> | |
| </h5> | |
| <p md-src-pos="23826..23902">The priority of the configuration file, used for ordering. Defaults to '25'.</p> | |
| <p md-src-pos="23904..23968"> | |
| Pass priority <code md-src-pos="23918..23925">false</code> | |
| to omit the priority prefix in file names.</p> | |
| <h5 md-src-pos="23970..23983"> | |
| <code md-src-pos="23975..23983">source</code> | |
| </h5> | |
| <p md-src-pos="23985..24077"> | |
| The source of the configuration file. Only one of <code md-src-pos="24035..24045">$content</code> | |
| and <code md-src-pos="24050..24059">$source</code> | |
| can be specified.</p> | |
| <h5 md-src-pos="24079..24100"> | |
| <code md-src-pos="24084..24100">verify_command</code> | |
| </h5> | |
| <p md-src-pos="24102..24448"> | |
| The command to use to verify the configuration file. It should use a fully qualified command. Defaults to '/usr/sbin/apachectl -t'. The <code md-src-pos="24238..24255">$verify_command</code> | |
| is only used if <code md-src-pos="24272..24288">$verify_config</code> | |
| is <code md-src-pos="24292..24298">true</code> | |
| . If the <code md-src-pos="24307..24324">$verify_command</code> | |
| fails, the configuration file is deleted, the Apache service is not notified, and an error is raised during the Puppet run.</p> | |
| <h5 md-src-pos="24450..24470"> | |
| <code md-src-pos="24455..24470">verify_config</code> | |
| </h5> | |
| <p md-src-pos="24472..24600"> | |
| Boolean to specify whether the configuration file should be validated before the Apache service is notified. Defaults to <code md-src-pos="24593..24599">true</code> | |
| .</p> | |
| <h4 md-src-pos="24602..24635"> | |
| Class: <code md-src-pos="24613..24635">apache::default_mods</code> | |
| </h4> | |
| <p md-src-pos="24637..24702">Installs default Apache modules based on what OS you are running.</p> | |
| <pre><code class="language-puppet" md-src-pos="24704..24755"> class { 'apache::default_mods': } | |
| </code></pre> | |
| <h4 md-src-pos="24757..24788"> | |
| Defined Type: <code md-src-pos="24775..24788">apache::mod</code> | |
| </h4> | |
| <p md-src-pos="24790..24992"> | |
| Used to enable arbitrary Apache HTTPD modules for which there is no specific <code md-src-pos="24867..24888">apache::mod::[name]</code> | |
| class. The <code md-src-pos="24900..24913">apache::mod</code> | |
| defined type also installs the required packages to enable the module, if any.</p> | |
| <pre><code class="language-puppet" md-src-pos="24994..25066"> apache::mod { 'rewrite': } | |
| apache::mod { 'ldap': } | |
| </code></pre> | |
| <h4 md-src-pos="25068..25102"> | |
| Classes: <code md-src-pos="25081..25102">apache::mod::[name]</code> | |
| </h4> | |
| <p md-src-pos="25104..25205"> | |
| There are many <code md-src-pos="25119..25140">apache::mod::[name]</code> | |
| classes within this module that can be declared using <code md-src-pos="25195..25204">include</code> | |
| :</p> | |
| <ul md-src-pos="25207..26484"><li md-src-pos="25207..25218"> | |
| <code md-src-pos="25209..25218">actions</code> | |
| </li><li md-src-pos="25219..25285"> | |
| <code md-src-pos="25221..25228">alias</code> | |
| (see <a href="#class-apachemodalias" md-src-pos="25233..25278"> | |
| <code md-src-pos="25234..25254">apache::mod::alias</code> | |
| </a> | |
| below)</li><li md-src-pos="25286..25300"> | |
| <code md-src-pos="25288..25300">auth_basic</code> | |
| </li><li md-src-pos="25301..25377"> | |
| <code md-src-pos="25303..25313">auth_cas</code> | |
| * (see <a href="#class-apachemodauthcas" md-src-pos="25320..25370"> | |
| <code md-src-pos="25321..25344">apache::mod::auth_cas</code> | |
| </a> | |
| below)</li><li md-src-pos="25378..25391"> | |
| <code md-src-pos="25380..25391">auth_kerb</code> | |
| </li><li md-src-pos="25392..25406"> | |
| <code md-src-pos="25394..25406">authn_file</code> | |
| </li><li md-src-pos="25407..25423"> | |
| <code md-src-pos="25409..25422">authnz_ldap</code> | |
| *</li><li md-src-pos="25424..25441"> | |
| <code md-src-pos="25426..25441">authz_default</code> | |
| </li><li md-src-pos="25442..25456"> | |
| <code md-src-pos="25444..25456">authz_user</code> | |
| </li><li md-src-pos="25457..25470"> | |
| <code md-src-pos="25459..25470">autoindex</code> | |
| </li><li md-src-pos="25471..25480"> | |
| <code md-src-pos="25473..25480">cache</code> | |
| </li><li md-src-pos="25481..25488"> | |
| <code md-src-pos="25483..25488">cgi</code> | |
| </li><li md-src-pos="25489..25497"> | |
| <code md-src-pos="25491..25497">cgid</code> | |
| </li><li md-src-pos="25498..25505"> | |
| <code md-src-pos="25500..25505">dav</code> | |
| </li><li md-src-pos="25506..25516"> | |
| <code md-src-pos="25508..25516">dav_fs</code> | |
| </li><li md-src-pos="25517..25529"> | |
| <code md-src-pos="25519..25528">dav_svn</code> | |
| *</li><li md-src-pos="25530..25541"> | |
| <code md-src-pos="25532..25541">deflate</code> | |
| </li><li md-src-pos="25542..25549"> | |
| <code md-src-pos="25544..25549">dev</code> | |
| </li><li md-src-pos="25550..25558"> | |
| <code md-src-pos="25552..25557">dir</code> | |
| *</li><li md-src-pos="25559..25573"> | |
| <code md-src-pos="25561..25573">disk_cache</code> | |
| </li><li md-src-pos="25574..25640"> | |
| <code md-src-pos="25576..25583">event</code> | |
| (see <a href="#class-apachemodevent" md-src-pos="25588..25633"> | |
| <code md-src-pos="25589..25609">apache::mod::event</code> | |
| </a> | |
| below)</li><li md-src-pos="25641..25652"> | |
| <code md-src-pos="25643..25652">expires</code> | |
| </li><li md-src-pos="25653..25664"> | |
| <code md-src-pos="25655..25664">fastcgi</code> | |
| </li><li md-src-pos="25665..25674"> | |
| <code md-src-pos="25667..25674">fcgid</code> | |
| </li><li md-src-pos="25675..25685"> | |
| <code md-src-pos="25677..25685">filter</code> | |
| </li><li md-src-pos="25686..25697"> | |
| <code md-src-pos="25688..25697">headers</code> | |
| </li><li md-src-pos="25698..25709"> | |
| <code md-src-pos="25700..25709">include</code> | |
| </li><li md-src-pos="25710..25719"> | |
| <code md-src-pos="25712..25718">info</code> | |
| *</li><li md-src-pos="25720..25727"> | |
| <code md-src-pos="25722..25727">itk</code> | |
| </li><li md-src-pos="25728..25736"> | |
| <code md-src-pos="25730..25736">ldap</code> | |
| </li><li md-src-pos="25737..25745"> | |
| <code md-src-pos="25739..25745">mime</code> | |
| </li><li md-src-pos="25746..25761"> | |
| <code md-src-pos="25748..25760">mime_magic</code> | |
| *</li><li md-src-pos="25762..25777"> | |
| <code md-src-pos="25764..25777">negotiation</code> | |
| </li><li md-src-pos="25778..25786"> | |
| <code md-src-pos="25780..25785">nss</code> | |
| *</li><li md-src-pos="25787..25866"> | |
| <code md-src-pos="25789..25800">pagespeed</code> | |
| (see <a href="#class-apachemodpagespeed" md-src-pos="25806..25859"> | |
| <code md-src-pos="25807..25831">apache::mod::pagespeed</code> | |
| </a> | |
| below)</li><li md-src-pos="25867..25881"> | |
| <code md-src-pos="25869..25880">passenger</code> | |
| *</li><li md-src-pos="25882..25890"> | |
| <code md-src-pos="25884..25890">perl</code> | |
| </li><li md-src-pos="25891..25902"> | |
| <code md-src-pos="25893..25902">peruser</code> | |
| </li><li md-src-pos="25903..25966"> | |
| <code md-src-pos="25905..25910">php</code> | |
| (requires <a href="#mpm_module" md-src-pos="25921..25948"> | |
| <code md-src-pos="25922..25934">mpm_module</code> | |
| </a> | |
| set to <code md-src-pos="25956..25965">prefork</code> | |
| )</li><li md-src-pos="25967..25979"> | |
| <code md-src-pos="25969..25978">prefork</code> | |
| *</li><li md-src-pos="25980..25990"> | |
| <code md-src-pos="25982..25989">proxy</code> | |
| *</li><li md-src-pos="25991..26004"> | |
| <code md-src-pos="25993..26004">proxy_ajp</code> | |
| </li><li md-src-pos="26005..26023"> | |
| <code md-src-pos="26007..26023">proxy_balancer</code> | |
| </li><li md-src-pos="26024..26038"> | |
| <code md-src-pos="26026..26038">proxy_html</code> | |
| </li><li md-src-pos="26039..26053"> | |
| <code md-src-pos="26041..26053">proxy_http</code> | |
| </li><li md-src-pos="26054..26064"> | |
| <code md-src-pos="26056..26064">python</code> | |
| </li><li md-src-pos="26065..26079"> | |
| <code md-src-pos="26067..26079">reqtimeout</code> | |
| </li><li md-src-pos="26080..26093"> | |
| <code md-src-pos="26082..26092">remoteip</code> | |
| *</li><li md-src-pos="26094..26105"> | |
| <code md-src-pos="26096..26105">rewrite</code> | |
| </li><li md-src-pos="26106..26115"> | |
| <code md-src-pos="26108..26114">rpaf</code> | |
| *</li><li md-src-pos="26116..26128"> | |
| <code md-src-pos="26118..26128">setenvif</code> | |
| </li><li md-src-pos="26129..26141"> | |
| <code md-src-pos="26131..26141">security</code> | |
| </li><li md-src-pos="26142..26207"> | |
| <code md-src-pos="26144..26150">shib</code> | |
| * (see <a href="#class-apachemodshib" md-src-pos="26157..26200"> | |
| <code md-src-pos="26158..26177">apache::mod::shib</code> | |
| </a> | |
| below)</li><li md-src-pos="26208..26219"> | |
| <code md-src-pos="26210..26219">speling</code> | |
| </li><li md-src-pos="26220..26282"> | |
| <code md-src-pos="26222..26227">ssl</code> | |
| * (see <a href="#class-apachemodssl" md-src-pos="26234..26275"> | |
| <code md-src-pos="26235..26253">apache::mod::ssl</code> | |
| </a> | |
| below)</li><li md-src-pos="26283..26354"> | |
| <code md-src-pos="26285..26293">status</code> | |
| * (see <a href="#class-apachemodstatus" md-src-pos="26300..26347"> | |
| <code md-src-pos="26301..26322">apache::mod::status</code> | |
| </a> | |
| below)</li><li md-src-pos="26355..26364"> | |
| <code md-src-pos="26357..26364">suphp</code> | |
| </li><li md-src-pos="26365..26377"> | |
| <code md-src-pos="26367..26376">userdir</code> | |
| *</li><li md-src-pos="26378..26393"> | |
| <code md-src-pos="26380..26393">vhost_alias</code> | |
| </li><li md-src-pos="26394..26405"> | |
| <code md-src-pos="26396..26404">worker</code> | |
| *</li><li md-src-pos="26406..26470"> | |
| <code md-src-pos="26408..26414">wsgi</code> | |
| (see <a href="#class-apachemodwsgi" md-src-pos="26420..26463"> | |
| <code md-src-pos="26421..26440">apache::mod::wsgi</code> | |
| </a> | |
| below)</li><li md-src-pos="26471..26484"> | |
| <code md-src-pos="26473..26484">xsendfile</code> | |
| </li></ul> | |
| <p md-src-pos="26486..26729">Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module's configuration. Most of the time, these parameters do not require any configuration or attention.</p> | |
| <p md-src-pos="26731..26986">The modules mentioned above, and other Apache modules that have templates, cause template files to be dropped along with the mod install. The module will not work without the template. Any module without a template installs the package but drops no files.</p> | |
| <h3 md-src-pos="26988..27018"> | |
| Class: <code md-src-pos="26998..27018">apache::mod::alias</code> | |
| </h3> | |
| <p md-src-pos="27020..27058">Installs and manages the alias module.</p> | |
| <p md-src-pos="27060..27174"> | |
| Full Documentation for alias is available from <a href="https://httpd.apache.org/docs/current/mod/mod_alias.html" md-src-pos="27107..27173">Apache</a> | |
| .</p> | |
| <p md-src-pos="27176..27229">To disable directory listing for the icons directory:</p> | |
| <pre><code class="language-puppet" md-src-pos="27230..27308"> class { 'apache::mod::alias': | |
| icons_options => 'None', | |
| } | |
| </code></pre> | |
| <h4 md-src-pos="27310..27342"> | |
| Class: <code md-src-pos="27322..27342">apache::mod::event</code> | |
| </h4> | |
| <p md-src-pos="27344..27382">Installs and manages mpm_event module.</p> | |
| <p md-src-pos="27384..27498"> | |
| Full Documentation for mpm_event is available from <a href="https://httpd.apache.org/docs/current/mod/event.html" md-src-pos="27435..27497">Apache</a> | |
| .</p> | |
| <p md-src-pos="27500..27536">To configure the event thread limit:</p> | |
| <pre><code class="language-puppet" md-src-pos="27538..27618"> class {'apache::mod::event': | |
| $threadlimit => '128', | |
| } | |
| </code></pre> | |
| <h4 md-src-pos="27620..27654"> | |
| Class: <code md-src-pos="27631..27654">apache::mod::auth_cas</code> | |
| </h4> | |
| <p md-src-pos="27656..27758"> | |
| Installs and manages mod_auth_cas. The parameters <code md-src-pos="27706..27721">cas_login_url</code> | |
| and <code md-src-pos="27726..27744">cas_validate_url</code> | |
| are required.</p> | |
| <p md-src-pos="27760..27860"> | |
| Full documentation on mod_auth_cas is available from <a href="https://github.com/Jasig/mod_auth_cas" md-src-pos="27813..27859">JASIG</a> | |
| .</p> | |
| <h4 md-src-pos="27862..27893"> | |
| Class: <code md-src-pos="27873..27893">apache::mod::geoip</code> | |
| </h4> | |
| <p md-src-pos="27895..27926">Installs and manages mod_geoip.</p> | |
| <p md-src-pos="27928..28037"> | |
| Full documentation on mod_geoip is available from <a href="http://dev.maxmind.com/geoip/legacy/mod_geoip2/" md-src-pos="27978..28036">MaxMind</a> | |
| .</p> | |
| <p md-src-pos="28039..28070">These are the default settings:</p> | |
| <pre><code class="language-puppet" md-src-pos="28072..28240"> class {'apache::mod::geoip': | |
| $enable => false, | |
| $db_file => '/usr/share/GeoIP/GeoIP.dat', | |
| $flag => 'Standard', | |
| $output => 'All', | |
| } | |
| </code></pre> | |
| <p md-src-pos="28242..28317"> | |
| The parameter <code md-src-pos="28256..28265">db_file</code> | |
| can be a single directory or a hash of directories.</p> | |
| <h4 md-src-pos="28319..28349"> | |
| Class: <code md-src-pos="28330..28349">apache::mod::info</code> | |
| </h4> | |
| <p md-src-pos="28351..28449">Installs and manages mod_info which provides a comprehensive overview of the server configuration.</p> | |
| <p md-src-pos="28451..28567"> | |
| Full documentation for mod_info is available from <a href="https://httpd.apache.org/docs/current/mod/mod_info.html" md-src-pos="28501..28566">Apache</a> | |
| .</p> | |
| <p md-src-pos="28569..28600">These are the default settings:</p> | |
| <pre><code class="language-puppet" md-src-pos="28602..28732"> $allow_from = ['127.0.0.1','::1'], | |
| $apache_version = $::apache::apache_version, | |
| $restrict_access = true, | |
| </code></pre> | |
| <p md-src-pos="28734..28813">To set the addresses that are allowed to access /server-info add the following:</p> | |
| <pre><code class="language-puppet" md-src-pos="28815..28949"> class {'apache::mod::info': | |
| allow_from => [ | |
| '10.10.36', | |
| '10.10.38', | |
| '127.0.0.1', | |
| ], | |
| } | |
| </code></pre> | |
| <p md-src-pos="28951..29004">To disable the access restrictions add the following:</p> | |
| <pre><code class="language-puppet" md-src-pos="29006..29083"> class {'apache::mod::info': | |
| restrict_access => false, | |
| } | |
| </code></pre> | |
| <p md-src-pos="29085..29289">It is not recommended to leave this set to false though it can be very useful for testing. For this reason, you can insert this setting in your normal code to temporarily disable the restrictions like so:</p> | |
| <pre><code class="language-puppet" md-src-pos="29291..29488"> class {'apache::mod::info': | |
| restrict_access => false, # false disables the block below | |
| allow_from => [ | |
| '10.10.36', | |
| '10.10.38', | |
| '127.0.0.1', | |
| ], | |
| } | |
| </code></pre> | |
| <h4 md-src-pos="29490..29525"> | |
| Class: <code md-src-pos="29501..29525">apache::mod::pagespeed</code> | |
| </h4> | |
| <p md-src-pos="29527..29644">Installs and manages mod_pagespeed, which is a Google module that rewrites web pages to reduce latency and bandwidth.</p> | |
| <p md-src-pos="29646..30012"> | |
| This module does <em md-src-pos="29663..29668">not</em> | |
| manage the software repositories needed to automatically install the | |
| mod-pagespeed-stable package. The module does however require that the package be installed, | |
| or be installable using the system's default package provider. You should ensure that this | |
| pre-requisite is met or declaring <code md-src-pos="29957..29981">apache::mod::pagespeed</code> | |
| causes the Puppet run to fail.</p> | |
| <p md-src-pos="30014..30037">These are the defaults:</p> | |
| <pre><code class="language-puppet" md-src-pos="30039..31614"> class { 'apache::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 => { } | |
| } | |
| </code></pre> | |
| <p md-src-pos="31616..31705"> | |
| Full documentation for mod_pagespeed is available from <a href="http://modpagespeed.com" md-src-pos="31671..31704">Google</a> | |
| .</p> | |
| <h4 md-src-pos="31707..31736"> | |
| Class: <code md-src-pos="31718..31736">apache::mod::php</code> | |
| </h4> | |
| <p md-src-pos="31738..31801">Installs and configures mod_php. The defaults are OS-dependant.</p> | |
| <p md-src-pos="31803..31831">Overriding the package name:</p> | |
| <pre><code class="language-puppet" md-src-pos="31832..31983"> class {'::apache::mod::php': | |
| package_name => "php54-php", | |
| path => "${::apache::params::lib_path}/libphp54-php5.so", | |
| } | |
| </code></pre> | |
| <p md-src-pos="31985..32022">Overriding the default configuartion:</p> | |
| <pre><code class="language-puppet" md-src-pos="32023..32125"> class {'::apache::mod::php': | |
| source => 'puppet:///modules/apache/my_php.conf', | |
| } | |
| </code></pre> | |
| <p md-src-pos="32127..32129">or</p> | |
| <pre><code class="language-puppet" md-src-pos="32130..32217"> class {'::apache::mod::php': | |
| template => 'apache/php.conf.erb', | |
| } | |
| </code></pre> | |
| <p md-src-pos="32219..32221">or</p> | |
| <pre><code class="language-puppet" md-src-pos="32223..32341"> class {'::apache::mod::php': | |
| content => ' | |
| AddHandler php5-script .php | |
| AddType text/html .php', | |
| } | |
| </code></pre> | |
| <h4 md-src-pos="32342..32372"> | |
| Class: <code md-src-pos="32353..32372">apache::mod::shib</code> | |
| </h4> | |
| <p md-src-pos="32374..32878"> | |
| Installs the <a href="http://shibboleth.net/" md-src-pos="32387..32423">Shibboleth</a> | |
| module for Apache which allows the use of SAML2 Single-Sign-On (SSO) authentication by Shibboleth Identity Providers and Shibboleth Federations. This class only installs and configures the Apache components of a Shibboleth Service Provider (a web application that consumes Shibboleth SSO identities). The Shibboleth configuration can be managed manually, with Puppet, or using a <a href="https://github.com/aethylred/puppet-shibboleth" md-src-pos="32803..32877">Shibboleth Puppet Module</a> | |
| .</p> | |
| <p md-src-pos="32880..32972"> | |
| Defining this class enables the Shibboleth specific parameters in <code md-src-pos="32946..32961">apache::vhost</code> | |
| instances.</p> | |
| <h4 md-src-pos="32974..33003"> | |
| Class: <code md-src-pos="32985..33003">apache::mod::ssl</code> | |
| </h4> | |
| <p md-src-pos="33005..33097">Installs Apache SSL capabilities and uses the ssl.conf.erb template. These are the defaults:</p> | |
| <pre><code class="language-puppet" md-src-pos="33099..33572"> class { 'apache::mod::ssl': | |
| ssl_compression => false, | |
| ssl_cryptodevice => 'builtin', | |
| ssl_options => [ 'StdEnvVars' ], | |
| ssl_cipher => 'HIGH:MEDIUM:!aNULL:!MD5', | |
| ssl_honorcipherorder => 'On', | |
| ssl_protocol => [ 'all', '-SSLv2', '-SSLv3' ], | |
| ssl_pass_phrase_dialog => 'builtin', | |
| ssl_random_seed_bytes => '512', | |
| ssl_sessioncachetimeout => '300', | |
| } | |
| </code></pre> | |
| <p md-src-pos="33574..33741"> | |
| To <em md-src-pos="33577..33582">use</em> | |
| SSL with a virtual host, you must either set the<code md-src-pos="33631..33650">default_ssl_vhost</code> | |
| parameter in <code md-src-pos="33664..33674">::apache</code> | |
| to 'true' or set the <code md-src-pos="33696..33701">ssl</code> | |
| parameter in <code md-src-pos="33715..33730">apache::vhost</code> | |
| to 'true'.</p> | |
| <h4 md-src-pos="33743..33775"> | |
| Class: <code md-src-pos="33754..33775">apache::mod::status</code> | |
| </h4> | |
| <p md-src-pos="33777..33866">Installs Apache mod_status and uses the status.conf.erb template. These are the defaults:</p> | |
| <pre><code class="language-puppet" md-src-pos="33868..34045"> class { 'apache::mod::status': | |
| allow_from => ['127.0.0.1','::1'], | |
| extended_status => 'On', | |
| status_path => '/server-status', | |
| ){ | |
| } | |
| </code></pre> | |
| <h4 md-src-pos="34047..34080"> | |
| Class: <code md-src-pos="34058..34080">apache::mod::expires</code> | |
| </h4> | |
| <p md-src-pos="34082..34173">Installs Apache mod_expires and uses the expires.conf.erb template. These are the defaults:</p> | |
| <pre><code class="language-puppet" md-src-pos="34175..34328"> class { 'apache::mod::expires': | |
| expires_active => true, | |
| expires_default => undef, | |
| expires_by_type => undef, | |
| ){ | |
| } | |
| </code></pre> | |
| <p md-src-pos="34330..34420"> | |
| <code md-src-pos="34330..34347">expires_by_type</code> | |
| is an array of Hashes, describing a set of types and their expire times:</p> | |
| <pre><code class="language-puppet" md-src-pos="34422..34599"> class { 'apache::mod::expires': | |
| expires_by_type => [ | |
| { 'text/json' => 'access plus 1 month' }, | |
| { 'text/html' => 'access plus 1 year' }, | |
| ] | |
| } | |
| </code></pre> | |
| <h4 md-src-pos="34601..34631"> | |
| Class: <code md-src-pos="34612..34631">apache::mod::wsgi</code> | |
| </h4> | |
| <p md-src-pos="34633..34721"> | |
| Enables Python support in the WSGI module. To use, simply <code md-src-pos="34691..34720">include 'apache::mod::wsgi'</code> | |
| .</p> | |
| <p md-src-pos="34723..34827">For customized parameters, which tell Apache how Python is currently configured on the operating system,</p> | |
| <pre><code class="language-puppet" md-src-pos="34829..35039"> class { 'apache::mod::wsgi': | |
| wsgi_socket_prefix => "\${APACHE_RUN_DIR}WSGI", | |
| wsgi_python_home => '/path/to/venv', | |
| wsgi_python_path => '/path/to/venv/site-packages', | |
| } | |
| </code></pre> | |
| <p md-src-pos="35041..35250">To specify an alternate mod_wsgi package name to install and the name of the module .so it provides, | |
| (e.g. a "python27-mod_wsgi" package that provides "python27-mod_wsgi.so" in the default module directory):</p> | |
| <pre><code class="language-puppet" md-src-pos="35252..35563"> class { 'apache::mod::wsgi': | |
| wsgi_socket_prefix => "\${APACHE_RUN_DIR}WSGI", | |
| wsgi_python_home => '/path/to/venv', | |
| wsgi_python_path => '/path/to/venv/site-packages', | |
| package_name => 'python27-mod_wsgi', | |
| mod_path => 'python27-mod_wsgi.so', | |
| } | |
| </code></pre> | |
| <p md-src-pos="35565..35700"> | |
| If <code md-src-pos="35568..35580">mod_path</code> | |
| does not contain "/", it will be prefixed by the default module path | |
| for your OS; otherwise, it will be used literally.</p> | |
| <p md-src-pos="35702..35775"> | |
| More information about <a href="http://modwsgi.readthedocs.org/en/latest/" md-src-pos="35725..35774">WSGI</a> | |
| .</p> | |
| <h4 md-src-pos="35777..35808"> | |
| Class: <code md-src-pos="35788..35808">apache::mod::fcgid</code> | |
| </h4> | |
| <p md-src-pos="35810..35844">Installs and configures mod_fcgid.</p> | |
| <p md-src-pos="35846..35969">The class makes no effort to list all available options, but rather uses an options hash to allow for ultimate flexibility:</p> | |
| <pre><code class="language-puppet" md-src-pos="35971..36196"> class { 'apache::mod::fcgid': | |
| options => { | |
| 'FcgidIPCDir' => '/var/run/fcgidsock', | |
| 'SharememPath' => '/var/run/fcgid_shm', | |
| 'AddHandler' => 'fcgid-script .fcgi', | |
| }, | |
| } | |
| </code></pre> | |
| <p md-src-pos="36198..36324"> | |
| For a full list op options, see the <a href="https://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html" md-src-pos="36234..36323">official mod_fcgid documentation</a> | |
| .</p> | |
| <p md-src-pos="36326..36471">It is also possible to set the FcgidWrapper per directory per vhost. You must ensure the fcgid module is loaded because there is no auto loading.</p> | |
| <pre><code class="language-puppet" md-src-pos="36473..36754"> include apache::mod::fcgid | |
| apache::vhost { 'example.org': | |
| docroot => '/var/www/html', | |
| directories => { | |
| path => '/var/www/html', | |
| fcgiwrapper => { | |
| command => '/usr/local/bin/fcgiwrapper', | |
| } | |
| }, | |
| } | |
| </code></pre> | |
| <p md-src-pos="36756..36878"> | |
| See <a href="https://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html#fcgidwrapper" md-src-pos="36760..36856">FcgidWrapper documentation</a> | |
| for more information.</p> | |
| <h4 md-src-pos="36880..36917"> | |
| Class: <code md-src-pos="36891..36917">apache::mod::negotiation</code> | |
| </h4> | |
| <p md-src-pos="36919..37054">Installs and configures mod_negotiation. If there are not provided any | |
| parameter, default apache mod_negotiation configuration is done.</p> | |
| <pre><code class="language-puppet" md-src-pos="37056..37237"> class { '::apache::mod::negotiation': | |
| force_language_priority => 'Prefer', | |
| language_priority => [ 'es', 'en', 'ca', 'cs', 'da', 'de', 'el', 'eo' ], | |
| } | |
| </code></pre> | |
| <p md-src-pos="37239..37288"> | |
| <strong md-src-pos="37239..37288"> | |
| Parameters within <code md-src-pos="37259..37285">apache::mod::negotiation</code> | |
| :</strong> | |
| </p> | |
| <h5 md-src-pos="37290..37320"> | |
| <code md-src-pos="37295..37320">force_language_priority</code> | |
| </h5> | |
| <p md-src-pos="37322..37407"> | |
| A string that sets the <code md-src-pos="37345..37368">ForceLanguagePriority</code> | |
| option. Defaults to <code md-src-pos="37389..37406">Prefer Fallback</code> | |
| .</p> | |
| <h5 md-src-pos="37409..37433"> | |
| <code md-src-pos="37414..37433">language_priority</code> | |
| </h5> | |
| <p md-src-pos="37435..37508"> | |
| An array of languages to set the <code md-src-pos="37468..37486">LanguagePriority</code> | |
| option of the module.</p> | |
| <h4 md-src-pos="37510..37543"> | |
| Class: <code md-src-pos="37521..37543">apache::mod::deflate</code> | |
| </h4> | |
| <p md-src-pos="37545..37648">Installs and configures mod_deflate. If no parameters are provided, a default configuration is applied.</p> | |
| <pre><code class="language-puppet" md-src-pos="37650..37822"> class { '::apache::mod::deflate': | |
| types => [ 'text/html', 'text/css' ], | |
| notes => { | |
| 'Input' => 'instream', | |
| 'Ratio' => 'ratio', | |
| }, | |
| } | |
| </code></pre> | |
| <h5 md-src-pos="37824..37836"> | |
| <code md-src-pos="37829..37836">types</code> | |
| </h5> | |
| <p md-src-pos="37838..37876">An array of mime types to be deflated.</p> | |
| <h5 md-src-pos="37878..37890"> | |
| <code md-src-pos="37883..37890">notes</code> | |
| </h5> | |
| <p md-src-pos="37892..37972">A hash where the key represents the type and the value represents the note name.</p> | |
| <h4 md-src-pos="37975..38011"> | |
| Class: <code md-src-pos="37986..38011">apache::mod::reqtimeout</code> | |
| </h4> | |
| <p md-src-pos="38013..38113">Installs and configures mod_reqtimeout. Defaults to recommended apache | |
| mod_reqtimeout configuration.</p> | |
| <pre><code class="language-puppet" md-src-pos="38115..38240"> class { '::apache::mod::reqtimeout': | |
| timeouts => ['header=20-40,MinRate=500', 'body=20,MinRate=500'], | |
| } | |
| </code></pre> | |
| <h4 md-src-pos="38242..38275"> | |
| Class: <code md-src-pos="38253..38275">apache::mod::version</code> | |
| </h4> | |
| <p md-src-pos="38277..38437">This wrapper around mod_version warns on Debian and Ubuntu systems with Apache httpd 2.4 | |
| about loading mod_version, as on these platforms it's already built-in.</p> | |
| <pre><code class="language-puppet" md-src-pos="38439..38487"> include '::apache::mod::version' | |
| </code></pre> | |
| <h5 md-src-pos="38489..38504"> | |
| <code md-src-pos="38494..38504">timeouts</code> | |
| </h5> | |
| <p md-src-pos="38506..38636"> | |
| A string or an array that sets the <code md-src-pos="38541..38561">RequestReadTimeout</code> | |
| option. Defaults to | |
| <code md-src-pos="38582..38635">['header=20-40,MinRate=500', 'body=20,MinRate=500']</code> | |
| .</p> | |
| <h4 md-src-pos="38639..38673"> | |
| Class: <code md-src-pos="38650..38673">apache::mod::security</code> | |
| </h4> | |
| <p md-src-pos="38675..38760">Installs and configures mod_security. Defaults to enabled and running on all | |
| vhosts.</p> | |
| <pre><code class="language-puppet" md-src-pos="38762..38811"> include '::apache::mod::security' | |
| </code></pre> | |
| <h5 md-src-pos="38813..38831"> | |
| <code md-src-pos="38818..38831">crs_package</code> | |
| </h5> | |
| <p md-src-pos="38833..38880">Name of package to install containing crs rules</p> | |
| <h5 md-src-pos="38882..38899"> | |
| <code md-src-pos="38887..38899">modsec_dir</code> | |
| </h5> | |
| <p md-src-pos="38901..38977">Directory to install the modsec configuration and activated rules links into</p> | |
| <h5 md-src-pos="38979..39001"> | |
| <code md-src-pos="38984..39001">activated_rules</code> | |
| </h5> | |
| <p md-src-pos="39003..39102">Array of rules from the modsec_crs_path to activate by symlinking to | |
| ${modsec_dir}/activated_rules.</p> | |
| <h5 md-src-pos="39104..39126"> | |
| <code md-src-pos="39109..39126">allowed_methods</code> | |
| </h5> | |
| <p md-src-pos="39128..39164">HTTP methods allowed by mod_security</p> | |
| <h5 md-src-pos="39166..39186"> | |
| <code md-src-pos="39171..39186">content_types</code> | |
| </h5> | |
| <p md-src-pos="39188..39225">Content-types allowed by mod_security</p> | |
| <h5 md-src-pos="39227..39255"> | |
| <code md-src-pos="39232..39255">restricted_extensions</code> | |
| </h5> | |
| <p md-src-pos="39257..39294">Extensions prohibited by mod_security</p> | |
| <h5 md-src-pos="39296..39321"> | |
| <code md-src-pos="39301..39321">restricted_headers</code> | |
| </h5> | |
| <p md-src-pos="39323..39357">Headers restricted by mod_security</p> | |
| <h4 md-src-pos="39360..39393"> | |
| Defined Type: <code md-src-pos="39378..39393">apache::vhost</code> | |
| </h4> | |
| <p md-src-pos="39395..39639"> | |
| The Apache module allows a lot of flexibility in the setup and configuration of virtual hosts. This flexibility is due, in part, to <code md-src-pos="39527..39534">vhost</code> | |
| being a defined resource type, which allows it to be evaluated multiple times with different parameters.</p> | |
| <p md-src-pos="39641..39972"> | |
| The <code md-src-pos="39645..39652">vhost</code> | |
| defined type allows you to have specialized configurations for virtual hosts that have requirements outside the defaults. You can set up a default vhost within the base <code md-src-pos="39822..39832">::apache</code> | |
| class, as well as set a customized vhost as default. Your customized vhost (priority 10) will be privileged over the base class vhost (15).</p> | |
| <p md-src-pos="39974..40359"> | |
| The <code md-src-pos="39978..39985">vhost</code> | |
| defined type uses <code md-src-pos="40004..40022">concat::fragment</code> | |
| to build the configuration file, so if you want to inject custom fragments for pieces of the configuration not supported by default by the defined type, you can add a custom fragment. For the <code md-src-pos="40216..40223">order</code> | |
| parameter for the custom fragment, the <code md-src-pos="40263..40270">vhost</code> | |
| defined type uses multiples of 10, so any order that isn't a multiple of 10 should work.</p> | |
| <pre><code class="language-puppet" md-src-pos="40361..40638"> apache::vhost { "example.com": | |
| docroot => '/var/www/html', | |
| priority => '25', | |
| } | |
| concat::fragment { "example.com-my_custom_fragment": | |
| target => '25-example.com.conf', | |
| order => 11, | |
| content => '# my custom comment', | |
| } | |
| </code></pre> | |
| <p md-src-pos="40640..40802"> | |
| If you have a series of specific configurations and do not want a base <code md-src-pos="40711..40721">::apache</code> | |
| class default vhost, make sure to set the base class <code md-src-pos="40775..40790">default_vhost</code> | |
| to 'false'.</p> | |
| <pre><code class="language-puppet" md-src-pos="40804..40875"> class { 'apache': | |
| default_vhost => false, | |
| } | |
| </code></pre> | |
| <p md-src-pos="40877..40915"> | |
| <strong md-src-pos="40877..40915"> | |
| Parameters within <code md-src-pos="40897..40912">apache::vhost</code> | |
| :</strong> | |
| </p> | |
| <h5 md-src-pos="40917..40934"> | |
| <code md-src-pos="40922..40934">access_log</code> | |
| </h5> | |
| <p md-src-pos="40936..41099"> | |
| Specifies whether <code md-src-pos="40954..40968">*_access.log</code> | |
| directives (<code md-src-pos="40981..40989">*_file</code> | |
| ,<code md-src-pos="40990..40998">*_pipe</code> | |
| , or <code md-src-pos="41003..41013">*_syslog</code> | |
| ) should be configured. Setting the value to 'false' chooses none. Defaults to 'true'.</p> | |
| <h5 md-src-pos="41101..41123"> | |
| <code md-src-pos="41106..41123">access_log_file</code> | |
| </h5> | |
| <p md-src-pos="41125..41316"> | |
| Sets the <code md-src-pos="41134..41148">*_access.log</code> | |
| filename that is placed in <code md-src-pos="41176..41186">$logroot</code> | |
| . Given a vhost, example.com, it defaults to 'example.com_ssl.log' for SSL vhosts and 'example.com_access.log' for non-SSL vhosts.</p> | |
| <h5 md-src-pos="41318..41340"> | |
| <code md-src-pos="41323..41340">access_log_pipe</code> | |
| </h5> | |
| <p md-src-pos="41342..41411">Specifies a pipe to send access log messages to. Defaults to 'undef'.</p> | |
| <h5 md-src-pos="41413..41437"> | |
| <code md-src-pos="41418..41437">access_log_syslog</code> | |
| </h5> | |
| <p md-src-pos="41439..41500">Sends all access log messages to syslog. Defaults to 'undef'.</p> | |
| <h5 md-src-pos="41502..41526"> | |
| <code md-src-pos="41507..41526">access_log_format</code> | |
| </h5> | |
| <p md-src-pos="41528..41730"> | |
| Specifies the use of either a LogFormat nickname or a custom format string for the access log. Defaults to 'combined'. See <a href="http://httpd.apache.org/docs/current/mod/mod_log_config.html" md-src-pos="41651..41729">these examples</a> | |
| .</p> | |
| <h5 md-src-pos="41732..41757"> | |
| <code md-src-pos="41737..41757">access_log_env_var</code> | |
| </h5> | |
| <p md-src-pos="41759..41857">Specifies that only requests with particular environment variables be logged. Defaults to 'undef'.</p> | |
| <h5 md-src-pos="41859..41885"> | |
| <code md-src-pos="41864..41885">add_default_charset</code> | |
| </h5> | |
| <p md-src-pos="41887..42075"> | |
| Sets <a href="http://httpd.apache.org/docs/current/mod/core.html#adddefaultcharset" md-src-pos="41892..41981">AddDefaultCharset</a> | |
| , a default value for the media charset, which is added to text/plain and text/html responses.</p> | |
| <h5 md-src-pos="42077..42094"> | |
| <code md-src-pos="42082..42094">add_listen</code> | |
| </h5> | |
| <p md-src-pos="42096..42181">Determines whether the vhost creates a Listen statement. The default value is 'true'.</p> | |
| <p md-src-pos="42183..42398"> | |
| Setting <code md-src-pos="42191..42203">add_listen</code> | |
| to 'false' stops the vhost from creating a Listen statement, and this is important when you combine vhosts that are not passed an <code md-src-pos="42334..42338">ip</code> | |
| parameter with vhosts that <em md-src-pos="42366..42371">are</em> | |
| passed the <code md-src-pos="42383..42387">ip</code> | |
| parameter.</p> | |
| <h5 md-src-pos="42400..42428"> | |
| <code md-src-pos="42405..42428">use_optional_includes</code> | |
| </h5> | |
| <p md-src-pos="42430..42556"> | |
| Specifies if for apache > 2.4 it should use IncludeOptional instead of Include for <code md-src-pos="42513..42534">additional_includes</code> | |
| . Defaults to 'false'.</p> | |
| <h5 md-src-pos="42558..42584"> | |
| <code md-src-pos="42563..42584">additional_includes</code> | |
| </h5> | |
| <p md-src-pos="42586..42786">Specifies paths to additional static, vhost-specific Apache configuration files. Useful for implementing a unique, custom configuration not supported by this module. Can be an array. Defaults to '[]'.</p> | |
| <h5 md-src-pos="42788..42802"> | |
| <code md-src-pos="42793..42802">aliases</code> | |
| </h5> | |
| <p md-src-pos="42804..43046"> | |
| Passes a list of hashes to the vhost to create Alias, AliasMatch, ScriptAlias or ScriptAliasMatch directives as per the <a href="http://httpd.apache.org/docs/current/mod/mod_alias.html" md-src-pos="42924..43006">mod_alias documentation</a> | |
| . These hashes are formatted as follows:</p> | |
| <pre><code class="language-puppet" md-src-pos="43048..43552">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', | |
| }, | |
| ], | |
| </code></pre> | |
| <p md-src-pos="43554..44069"> | |
| For <code md-src-pos="43558..43565">alias</code> | |
| , <code md-src-pos="43567..43579">aliasmatch</code> | |
| , <code md-src-pos="43581..43594">scriptalias</code> | |
| and <code md-src-pos="43599..43617">scriptaliasmatch</code> | |
| to work, each needs a corresponding context, such as <code md-src-pos="43671..43703"><Directory /path/to/directory></code> | |
| or <code md-src-pos="43707..43739"><Location /some/location/here></code> | |
| . The directives are created in the order specified in the <code md-src-pos="43798..43807">aliases</code> | |
| parameter. As described in the <a href="http://httpd.apache.org/docs/current/mod/mod_alias.html" md-src-pos="43839..43923"> | |
| <code md-src-pos="43840..43851">mod_alias</code> | |
| documentation</a> | |
| , more specific <code md-src-pos="43939..43946">alias</code> | |
| , <code md-src-pos="43948..43960">aliasmatch</code> | |
| , <code md-src-pos="43962..43975">scriptalias</code> | |
| or <code md-src-pos="43979..43997">scriptaliasmatch</code> | |
| parameters should come before the more general ones to avoid shadowing.</p> | |
| <p md-src-pos="44071..44516"> | |
| <em md-src-pos="44071..44077">Note</em> | |
| : Using the <code md-src-pos="44089..44098">aliases</code> | |
| parameter is preferred over the <code md-src-pos="44131..44146">scriptaliases</code> | |
| parameter since here the order of the various alias directives among each other can be controlled precisely. Defining ScriptAliases using the <code md-src-pos="44289..44304">scriptaliases</code> | |
| parameter means <em md-src-pos="44321..44326">all</em> | |
| ScriptAlias directives will come after <em md-src-pos="44366..44371">all</em> | |
| Alias directives, which can lead to Alias directives shadowing ScriptAlias directives. This is often problematic, for example in case of Nagios.</p> | |
| <p md-src-pos="44518..44795"> | |
| <em md-src-pos="44518..44525">Note:</em> | |
| If <code md-src-pos="44529..44553">apache::mod::passenger</code> | |
| is loaded and <code md-src-pos="44568..44602">PassengerHighPerformance => true</code> | |
| is set, then Alias might have issues honoring the <code md-src-pos="44653..44678">PassengerEnabled => off</code> | |
| statement. See <a href="http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html" md-src-pos="44694..44782">this article</a> | |
| for details.</p> | |
| <h5 md-src-pos="44797..44825"> | |
| <code md-src-pos="44802..44825">allow_encoded_slashes</code> | |
| </h5> | |
| <p md-src-pos="44827..45244"> | |
| This sets the <a href="http://httpd.apache.org/docs/current/mod/core.html#allowencodedslashes" md-src-pos="44841..44948"> | |
| <code md-src-pos="44842..44863">AllowEncodedSlashes</code> | |
| declaration</a> | |
| for the vhost, overriding the server default. This modifies the vhost responses to URLs with <code md-src-pos="45042..45045"></code> | |
| and <code md-src-pos="45050..45053">/</code> | |
| characters. The default is undefined, which omits the declaration from the server configuration and select the Apache default setting of <code md-src-pos="45191..45196">Off</code> | |
| . Allowed values are: <code md-src-pos="45218..45222">on</code> | |
| , <code md-src-pos="45224..45229">off</code> | |
| or <code md-src-pos="45233..45243">nodecode</code> | |
| .</p> | |
| <h5 md-src-pos="45246..45258"> | |
| <code md-src-pos="45251..45258">block</code> | |
| </h5> | |
| <p md-src-pos="45260..45445">Specifies the list of things Apache blocks access to. The default is an empty set, '[]'. Currently, the only option is 'scm', which blocks web access to .svn, .git and .bzr directories.</p> | |
| <h5 md-src-pos="45447..45469"> | |
| <code md-src-pos="45452..45469">custom_fragment</code> | |
| </h5> | |
| <p md-src-pos="45471..45594">Passes a string of custom configuration directives to be placed at the end of the vhost configuration. Defaults to 'undef'.</p> | |
| <h5 md-src-pos="45596..45616"> | |
| <code md-src-pos="45601..45616">default_vhost</code> | |
| </h5> | |
| <p md-src-pos="45618..45766"> | |
| Sets a given <code md-src-pos="45631..45646">apache::vhost</code> | |
| as the default to serve requests that do not match any other <code md-src-pos="45708..45723">apache::vhost</code> | |
| definitions. The default value is 'false'.</p> | |
| <h5 md-src-pos="45768..45786"> | |
| <code md-src-pos="45773..45786">directories</code> | |
| </h5> | |
| <p md-src-pos="45788..45860"> | |
| See the <a href="#parameter-directories-for-apachevhost" md-src-pos="45796..45859"> | |
| <code md-src-pos="45797..45810">directories</code> | |
| section</a> | |
| .</p> | |
| <h5 md-src-pos="45862..45883"> | |
| <code md-src-pos="45867..45883">directoryindex</code> | |
| </h5> | |
| <p md-src-pos="45885..46156"> | |
| Sets the list of resources to look for when a client requests an index of the directory by specifying a '/' at the end of the directory name. <a href="http://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex" md-src-pos="46027..46113">DirectoryIndex</a> | |
| has more information. Defaults to 'undef'.</p> | |
| <h5 md-src-pos="46158..46172"> | |
| <code md-src-pos="46163..46172">docroot</code> | |
| </h5> | |
| <p md-src-pos="46174..46344"> | |
| Provides the | |
| <a href="http://httpd.apache.org/docs/current/mod/core.html#documentroot" md-src-pos="46187..46266">DocumentRoot</a> | |
| directive, which identifies the directory Apache serves files from. Required.</p> | |
| <h5 md-src-pos="46346..46366"> | |
| <code md-src-pos="46351..46366">docroot_group</code> | |
| </h5> | |
| <p md-src-pos="46368..46431">Sets group access to the docroot directory. Defaults to 'root'.</p> | |
| <h5 md-src-pos="46433..46453"> | |
| <code md-src-pos="46438..46453">docroot_owner</code> | |
| </h5> | |
| <p md-src-pos="46455..46528">Sets individual user access to the docroot directory. Defaults to 'root'.</p> | |
| <h5 md-src-pos="46530..46549"> | |
| <code md-src-pos="46535..46549">docroot_mode</code> | |
| </h5> | |
| <p md-src-pos="46551..46621">Sets access permissions of the docroot directory. Defaults to 'undef'.</p> | |
| <h5 md-src-pos="46623..46644"> | |
| <code md-src-pos="46628..46644">manage_docroot</code> | |
| </h5> | |
| <p md-src-pos="46646..46712">Whether to manage to docroot directory at all. Defaults to 'true'.</p> | |
| <h5 md-src-pos="46714..46730"> | |
| <code md-src-pos="46719..46730">error_log</code> | |
| </h5> | |
| <p md-src-pos="46732..46816"> | |
| Specifies whether <code md-src-pos="46750..46763">*_error.log</code> | |
| directives should be configured. Defaults to 'true'.</p> | |
| <h5 md-src-pos="46818..46839"> | |
| <code md-src-pos="46823..46839">error_log_file</code> | |
| </h5> | |
| <p md-src-pos="46841..47015"> | |
| Points to the <code md-src-pos="46855..46868">*_error.log</code> | |
| file. Given a vhost, example.com, it defaults to 'example.com_ssl_error.log' for SSL vhosts and 'example.com_access_error.log' for non-SSL vhosts.</p> | |
| <h5 md-src-pos="47017..47038"> | |
| <code md-src-pos="47022..47038">error_log_pipe</code> | |
| </h5> | |
| <p md-src-pos="47040..47108">Specifies a pipe to send error log messages to. Defaults to 'undef'.</p> | |
| <h5 md-src-pos="47110..47133"> | |
| <code md-src-pos="47115..47133">error_log_syslog</code> | |
| </h5> | |
| <p md-src-pos="47135..47195">Sends all error log messages to syslog. Defaults to 'undef'.</p> | |
| <h5 md-src-pos="47197..47219"> | |
| <code md-src-pos="47202..47219">error_documents</code> | |
| </h5> | |
| <p md-src-pos="47221..47406"> | |
| A list of hashes which can be used to override the <a href="https://httpd.apache.org/docs/current/mod/core.html#errordocument" md-src-pos="47272..47354">ErrorDocument</a> | |
| settings for this vhost. Defaults to '[]'. Example:</p> | |
| <pre><code class="language-puppet" md-src-pos="47408..47658"> apache::vhost { 'sample.example.net': | |
| error_documents => [ | |
| { 'error_code' => '503', 'document' => '/service-unavail' }, | |
| { 'error_code' => '407', 'document' => 'https://example.com/proxy/login' }, | |
| ], | |
| } | |
| </code></pre> | |
| <h5 md-src-pos="47660..47673"> | |
| <code md-src-pos="47665..47673">ensure</code> | |
| </h5> | |
| <p md-src-pos="47675..47747">Specifies if the vhost file is present or absent. Defaults to 'present'.</p> | |
| <h5 md-src-pos="47749..47772"> | |
| <code md-src-pos="47754..47772">fallbackresource</code> | |
| </h5> | |
| <p md-src-pos="47774..48108"> | |
| Sets the <a href="http://httpd.apache.org/docs/current/mod/mod_dir.html#fallbackresource" md-src-pos="47783..47873">FallbackResource</a> | |
| directive, which specifies an action to take for any URL that doesn't map to anything in your filesystem and would otherwise return 'HTTP 404 (Not Found)'. Valid values must either begin with a / or be 'disabled'. Defaults to 'undef'.</p> | |
| <h5 md-src-pos="48110..48124"> | |
| <code md-src-pos="48115..48124">headers</code> | |
| </h5> | |
| <p md-src-pos="48126..48322"> | |
| Adds lines to replace, merge, or remove response headers. See <a href="http://httpd.apache.org/docs/current/mod/mod_headers.html#header" md-src-pos="48188..48262">Header</a> | |
| for more information. Can be an array. Defaults to 'undef'.</p> | |
| <h5 md-src-pos="48324..48333"> | |
| <code md-src-pos="48329..48333">ip</code> | |
| </h5> | |
| <p md-src-pos="48335..48407">Sets the IP address the vhost listens on. Defaults to listen on all IPs.</p> | |
| <h5 md-src-pos="48409..48424"> | |
| <code md-src-pos="48414..48424">ip_based</code> | |
| </h5> | |
| <p md-src-pos="48426..48665"> | |
| Enables an <a href="http://httpd.apache.org/docs/current/vhosts/ip-based.html" md-src-pos="48437..48506">IP-based</a> | |
| vhost. This parameter inhibits the creation of a NameVirtualHost directive, since those are used to funnel requests to name-based vhosts. Defaults to 'false'.</p> | |
| <h5 md-src-pos="48667..48677"> | |
| <code md-src-pos="48672..48677">itk</code> | |
| </h5> | |
| <p md-src-pos="48679..48746"> | |
| Configures <a href="http://mpm-itk.sesse.net/" md-src-pos="48690..48722">ITK</a> | |
| in a hash. Keys can be:</p> | |
| <ul md-src-pos="48748..48915"><li md-src-pos="48748..48762">user + group</li><li md-src-pos="48763..48783"> | |
| <code md-src-pos="48765..48783">assignuseridexpr</code> | |
| </li><li md-src-pos="48784..48805"> | |
| <code md-src-pos="48786..48805">assigngroupidexpr</code> | |
| </li><li md-src-pos="48806..48824"> | |
| <code md-src-pos="48808..48824">maxclientvhost</code> | |
| </li><li md-src-pos="48825..48833"> | |
| <code md-src-pos="48827..48833">nice</code> | |
| </li><li md-src-pos="48834..48874"> | |
| <code md-src-pos="48836..48851">limituidrange</code> | |
| (Linux 3.5.0 or newer)</li><li md-src-pos="48875..48915"> | |
| <code md-src-pos="48877..48892">limitgidrange</code> | |
| (Linux 3.5.0 or newer)</li></ul> | |
| <p md-src-pos="48917..48944">Usage typically looks like:</p> | |
| <pre><code class="language-puppet" md-src-pos="48946..49133"> apache::vhost { 'sample.example.net': | |
| docroot => '/path/to/directory', | |
| itk => { | |
| user => 'someuser', | |
| group => 'somegroup', | |
| }, | |
| } | |
| </code></pre> | |
| <h5 md-src-pos="49135..49149"> | |
| <code md-src-pos="49140..49149">logroot</code> | |
| </h5> | |
| <p md-src-pos="49151..49252"> | |
| Specifies the location of the virtual host's logfiles. Defaults to '/var/log//'.</p> | |
| <h5 md-src-pos="49254..49276"> | |
| <code md-src-pos="49259..49276">$logroot_ensure</code> | |
| </h5> | |
| <p md-src-pos="49278..49398">Determines whether or not to remove the logroot directory for a virtual host. Valid values are 'directory', or 'absent'.</p> | |
| <h5 md-src-pos="49400..49419"> | |
| <code md-src-pos="49405..49419">logroot_mode</code> | |
| </h5> | |
| <p md-src-pos="49421..49673"> | |
| Overrides the mode the logroot directory is set to. Defaults to undef. Do NOT give people write access to the directory the logs are stored | |
| in without being aware of the consequences; see <a href="http://httpd.apache.org/docs/2.4/logs.html#security" md-src-pos="49609..49660">http://httpd.apache.org/docs/2.4/logs.html#security</a> | |
| for details.</p> | |
| <h5 md-src-pos="49675..49691"> | |
| <code md-src-pos="49680..49691">log_level</code> | |
| </h5> | |
| <p md-src-pos="49693..49922">Specifies the verbosity of the error log. Defaults to 'warn' for the global server configuration and can be overridden on a per-vhost basis. Valid values are 'emerg', 'alert', 'crit', 'error', 'warn', 'notice', 'info' or 'debug'.</p> | |
| <h6 md-src-pos="49924..49949"> | |
| <code md-src-pos="49930..49949">modsec_body_limit</code> | |
| </h6> | |
| <p md-src-pos="49951..50040">Configures the maximum request body size (in bytes) ModSecurity will accept for buffering</p> | |
| <h6 md-src-pos="50042..50070"> | |
| <code md-src-pos="50048..50070">modsec_disable_vhost</code> | |
| </h6> | |
| <p md-src-pos="50072..50237">Boolean. Only valid if apache::mod::security is included. Used to disable mod_security on an individual vhost. Only relevant if apache::mod::security is included.</p> | |
| <h6 md-src-pos="50239..50265"> | |
| <code md-src-pos="50245..50265">modsec_disable_ids</code> | |
| </h6> | |
| <p md-src-pos="50267..50389">Array of mod_security IDs to remove from the vhost. Also takes a hash allowing removal of an ID from a specific location.</p> | |
| <pre><code class="language-puppet" md-src-pos="50391..50498"> apache::vhost { 'sample.example.net': | |
| modsec_disable_ids => [ 90015, 90016 ], | |
| } | |
| </code></pre> | |
| <pre><code class="language-puppet" md-src-pos="50500..50627"> apache::vhost { 'sample.example.net': | |
| modsec_disable_ids => { '/location1' => [ 90015, 90016 ] }, | |
| } | |
| </code></pre> | |
| <h6 md-src-pos="50629..50655"> | |
| <code md-src-pos="50635..50655">modsec_disable_ips</code> | |
| </h6> | |
| <p md-src-pos="50657..50712">Array of IPs to exclude from mod_security rule matching</p> | |
| <h5 md-src-pos="50714..50734"> | |
| <code md-src-pos="50719..50734">no_proxy_uris</code> | |
| </h5> | |
| <p md-src-pos="50736..50860"> | |
| Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with <a href="#proxy_dest" md-src-pos="50832..50859"> | |
| <code md-src-pos="50833..50845">proxy_dest</code> | |
| </a> | |
| .</p> | |
| <h5 md-src-pos="50862..50888"> | |
| <code md-src-pos="50867..50888">no_proxy_uris_match</code> | |
| </h5> | |
| <p md-src-pos="50890..50969"> | |
| This directive is equivalent to <code md-src-pos="50922..50937">no_proxy_uris</code> | |
| , but takes regular expressions.</p> | |
| <h5 md-src-pos="50971..50997"> | |
| <code md-src-pos="50976..50997">proxy_preserve_host</code> | |
| </h5> | |
| <p md-src-pos="50999..51253"> | |
| Sets the <a href="http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypreservehost" md-src-pos="51008..51108">ProxyPreserveHost Directive</a> | |
| . true Enables the Host: line from an incoming request to be proxied to the host instead of hostname . false sets this option to off (default).</p> | |
| <h5 md-src-pos="51255..51282"> | |
| <code md-src-pos="51260..51282">proxy_error_override</code> | |
| </h5> | |
| <p md-src-pos="51284..51515"> | |
| Sets the <a href="http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxyerroroverride" md-src-pos="51293..51395">ProxyErrorOverride Directive</a> | |
| . This directive controls whether apache should override error pages for proxied content. This option is off by default.</p> | |
| <h5 md-src-pos="51517..51531"> | |
| <code md-src-pos="51522..51531">options</code> | |
| </h5> | |
| <p md-src-pos="51533..51723"> | |
| Sets the <a href="http://httpd.apache.org/docs/current/mod/core.html#options" md-src-pos="51542..51611">Options</a> | |
| for the specified virtual host. Defaults to '['Indexes','FollowSymLinks','MultiViews']', as demonstrated below:</p> | |
| <pre><code class="language-puppet" md-src-pos="51725..51850"> apache::vhost { 'site.name.fdqn': | |
| … | |
| options => ['Indexes','FollowSymLinks','MultiViews'], | |
| } | |
| </code></pre> | |
| <p md-src-pos="51852..52033"> | |
| <em md-src-pos="51852..51859">Note:</em> | |
| If you use <a href="#parameter-directories-for-apachevhost" md-src-pos="51871..51926"> | |
| <code md-src-pos="51872..51885">directories</code> | |
| </a> | |
| , 'Options', 'Override', and 'DirectoryIndex' are ignored because they are parameters within <code md-src-pos="52019..52032">directories</code> | |
| .</p> | |
| <h5 md-src-pos="52035..52050"> | |
| <code md-src-pos="52040..52050">override</code> | |
| </h5> | |
| <p md-src-pos="52052..52237"> | |
| Sets the overrides for the specified virtual host. Accepts an array of <a href="http://httpd.apache.org/docs/current/mod/core.html#allowoverride" md-src-pos="52123..52204">AllowOverride</a> | |
| arguments. Defaults to '[none]'.</p> | |
| <h5 md-src-pos="52239..52264"> | |
| <code md-src-pos="52244..52264">passenger_app_root</code> | |
| </h5> | |
| <p md-src-pos="52266..52463"> | |
| Sets <a href="https://www.phusionpassenger.com/documentation/Users%20guide%20Apache.html#PassengerAppRoot" md-src-pos="52271..52379">PassengerRoot</a> | |
| , the location of the Passenger application root if different from the DocumentRoot.</p> | |
| <h5 md-src-pos="52465..52489"> | |
| <code md-src-pos="52470..52489">passenger_app_env</code> | |
| </h5> | |
| <p md-src-pos="52491..52719"> | |
| Sets <a href="https://www.phusionpassenger.com/documentation/Users%20guide%20Apache.html#PassengerAppEnv" md-src-pos="52496..52605">PassengerAppEnv</a> | |
| , the environment for the Passenger application. If not specifies, defaults to the global setting or 'production'.</p> | |
| <h5 md-src-pos="52721..52742"> | |
| <code md-src-pos="52726..52742">passenger_ruby</code> | |
| </h5> | |
| <p md-src-pos="52744..52925"> | |
| Sets <a href="https://www.phusionpassenger.com/documentation/Users%20guide%20Apache.html#PassengerRuby" md-src-pos="52749..52854">PassengerRuby</a> | |
| on this virtual host, the Ruby interpreter to use for the application.</p> | |
| <h5 md-src-pos="52927..52957"> | |
| <code md-src-pos="52932..52957">passenger_min_instances</code> | |
| </h5> | |
| <p md-src-pos="52959..53138"> | |
| Sets <a href="https://www.phusionpassenger.com/documentation/Users%20guide%20Apache.html#PassengerMinInstances" md-src-pos="52964..53085">PassengerMinInstances</a> | |
| , the minimum number of application processes to run.</p> | |
| <h5 md-src-pos="53140..53170"> | |
| <code md-src-pos="53145..53170">passenger_start_timeout</code> | |
| </h5> | |
| <p md-src-pos="53172..53355"> | |
| Sets <a href="https://www.phusionpassenger.com/documentation/Users%20guide%20Apache.html#_passengerstarttimeout_lt_seconds_gt" md-src-pos="53177..53313">PassengerStartTimeout</a> | |
| , the timeout for the application startup.</p> | |
| <h5 md-src-pos="53357..53383"> | |
| <code md-src-pos="53362..53383">passenger_pre_start</code> | |
| </h5> | |
| <p md-src-pos="53385..53560"> | |
| Sets <a href="https://www.phusionpassenger.com/documentation/Users%20guide%20Apache.html#PassengerPreStart" md-src-pos="53390..53503">PassengerPreStart</a> | |
| , the URL of the application if pre-starting is required.</p> | |
| <h5 md-src-pos="53562..53587"> | |
| <code md-src-pos="53567..53587">php_flags & values</code> | |
| </h5> | |
| <p md-src-pos="53589..53784"> | |
| Allows per-vhost setting <a href="http://php.net/manual/en/configuration.changes.php" md-src-pos="53614..53695"> | |
| <code md-src-pos="53615..53626">php_value</code> | |
| s or <code md-src-pos="53631..53641">php_flag</code> | |
| s</a> | |
| . These flags or values can be overwritten by a user or an application. Defaults to '[]'.</p> | |
| <h5 md-src-pos="53786..53817"> | |
| <code md-src-pos="53791..53817">php_admin_flags & values</code> | |
| </h5> | |
| <p md-src-pos="53819..54029"> | |
| Allows per-vhost setting <a href="http://php.net/manual/en/configuration.changes.php" md-src-pos="53844..53937"> | |
| <code md-src-pos="53845..53862">php_admin_value</code> | |
| s or <code md-src-pos="53867..53883">php_admin_flag</code> | |
| s</a> | |
| . These flags or values cannot be overwritten by a user or an application. Defaults to '[]'.</p> | |
| <h5 md-src-pos="54031..54042"> | |
| <code md-src-pos="54036..54042">port</code> | |
| </h5> | |
| <p md-src-pos="54044..54246">Sets the port the host is configured on. The module's defaults ensure the host listens on port 80 for non-SSL vhosts and port 443 for SSL vhosts. The host only listens on the port set in this parameter.</p> | |
| <h5 md-src-pos="54248..54263"> | |
| <code md-src-pos="54253..54263">priority</code> | |
| </h5> | |
| <p md-src-pos="54265..54361">Sets the relative load-order for Apache HTTPD VirtualHost configuration files. Defaults to '25'.</p> | |
| <p md-src-pos="54363..54552">If nothing matches the priority, the first name-based vhost is used. Likewise, passing a higher priority causes the alphabetically first name-based vhost to be used if no other names match.</p> | |
| <p md-src-pos="54554..54722"> | |
| <em md-src-pos="54554..54561">Note:</em> | |
| You should not need to use this parameter. However, if you do use it, be aware that the <code md-src-pos="54650..54665">default_vhost</code> | |
| parameter for <code md-src-pos="54680..54695">apache::vhost</code> | |
| passes a priority of '15'.</p> | |
| <p md-src-pos="54724..54788"> | |
| Pass priority <code md-src-pos="54738..54745">false</code> | |
| to omit the priority prefix in file names.</p> | |
| <h5 md-src-pos="54790..54807"> | |
| <code md-src-pos="54795..54807">proxy_dest</code> | |
| </h5> | |
| <p md-src-pos="54809..54962"> | |
| Specifies the destination address of a <a href="http://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypass" md-src-pos="54848..54926">ProxyPass</a> | |
| configuration. Defaults to 'undef'.</p> | |
| <h5 md-src-pos="54964..54981"> | |
| <code md-src-pos="54969..54981">proxy_pass</code> | |
| </h5> | |
| <p md-src-pos="54983..55187"> | |
| Specifies an array of <code md-src-pos="55005..55018">path => URI</code> | |
| for a <a href="http://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypass" md-src-pos="55025..55103">ProxyPass</a> | |
| configuration. Defaults to 'undef'. Optionally parameters can be added as an array.</p> | |
| <pre><code class="language-puppet" md-src-pos="55189..55937">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']}, | |
| ], | |
| } | |
| </code></pre> | |
| <p md-src-pos="55939..56337"> | |
| <code md-src-pos="55939..55953">reverse_urls</code> | |
| is optional and can be an array or a string. It is useful when used with <code md-src-pos="56027..56047">mod_proxy_balancer</code> | |
| . | |
| <code md-src-pos="56049..56057">params</code> | |
| is an optional parameter. It allows to provide the ProxyPass key=value parameters (Connection settings). | |
| <code md-src-pos="56163..56171">setenv</code> | |
| is optional and is an array to set environment variables for the proxy directive, for details see http://httpd.apache.org/docs/current/mod/mod_proxy.html#envsettings</p> | |
| <h5 md-src-pos="56339..56362"> | |
| <code md-src-pos="56344..56362">proxy_dest_match</code> | |
| </h5> | |
| <p md-src-pos="56364..56544"> | |
| This directive is equivalent to proxy_dest, but takes regular expressions, see <a href="http://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypassmatch" md-src-pos="56443..56531">ProxyPassMatch</a> | |
| for details.</p> | |
| <h5 md-src-pos="56546..56577"> | |
| <code md-src-pos="56551..56577">proxy_dest_reverse_match</code> | |
| </h5> | |
| <p md-src-pos="56579..56762"> | |
| Allows you to pass a ProxyPassReverse if <code md-src-pos="56620..56638">proxy_dest_match</code> | |
| is specified. See <a href="http://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypassreverse" md-src-pos="56657..56749">ProxyPassReverse</a> | |
| for details.</p> | |
| <h5 md-src-pos="56764..56787"> | |
| <code md-src-pos="56769..56787">proxy_pass_match</code> | |
| </h5> | |
| <p md-src-pos="56789..56969"> | |
| This directive is equivalent to proxy_pass, but takes regular expressions, see <a href="http://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypassmatch" md-src-pos="56868..56956">ProxyPassMatch</a> | |
| for details.</p> | |
| <h5 md-src-pos="56971..56992"> | |
| <code md-src-pos="56976..56992">rack_base_uris</code> | |
| </h5> | |
| <p md-src-pos="56994..57285"> | |
| Specifies the resource identifiers for a rack configuration. The file paths specified are listed as rack application roots for <a href="http://www.modrails.com/documentation/Users%20guide%20Apache.html#_railsbaseuri_and_rackbaseuri" md-src-pos="57121..57237">Phusion Passenger</a> | |
| in the _rack.erb template. Defaults to 'undef'.</p> | |
| <h5 md-src-pos="57287..57307"> | |
| <code md-src-pos="57292..57307">redirect_dest</code> | |
| </h5> | |
| <p md-src-pos="57309..57367">Specifies the address to redirect to. Defaults to 'undef'.</p> | |
| <h5 md-src-pos="57369..57391"> | |
| <code md-src-pos="57374..57391">redirect_source</code> | |
| </h5> | |
| <p md-src-pos="57393..57616"> | |
| Specifies the source URIs that redirect to the destination specified in <code md-src-pos="57465..57480">redirect_dest</code> | |
| . If more than one item for redirect is supplied, the source and destination must be the same length, and the items are order-dependent.</p> | |
| <pre><code class="language-puppet" md-src-pos="57618..57820"> apache::vhost { 'site.name.fdqn': | |
| … | |
| redirect_source => ['/images','/downloads'], | |
| redirect_dest => ['http://img.example.com/','http://downloads.example.com/'], | |
| } | |
| </code></pre> | |
| <h5 md-src-pos="57822..57844"> | |
| <code md-src-pos="57827..57844">redirect_status</code> | |
| </h5> | |
| <p md-src-pos="57846..57914">Specifies the status to append to the redirect. Defaults to 'undef'.</p> | |
| <pre><code class="language-puppet" md-src-pos="57916..58028"> apache::vhost { 'site.name.fdqn': | |
| … | |
| redirect_status => ['temp','permanent'], | |
| } | |
| </code></pre> | |
| <h5 md-src-pos="58030..58105"> | |
| <code md-src-pos="58035..58057">redirectmatch_regexp</code> | |
| & <code md-src-pos="58060..58082">redirectmatch_status</code> | |
| & <code md-src-pos="58085..58105">redirectmatch_dest</code> | |
| </h5> | |
| <p md-src-pos="58107..58259">Determines which server status should be raised for a given regular expression and where to forward the user to. Entered as arrays. Defaults to 'undef'.</p> | |
| <pre><code class="language-puppet" md-src-pos="58261..58520"> 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'], | |
| } | |
| </code></pre> | |
| <h5 md-src-pos="58522..58544"> | |
| <code md-src-pos="58527..58544">request_headers</code> | |
| </h5> | |
| <p md-src-pos="58546..58769"> | |
| Modifies collected <a href="http://httpd.apache.org/docs/current/mod/mod_headers.html#requestheader" md-src-pos="58565..58655">request headers</a> | |
| in various ways, including adding additional request headers, removing request headers, etc. Defaults to 'undef'.</p> | |
| <pre><code class="language-puppet" md-src-pos="58771..58937"> apache::vhost { 'site.name.fdqn': | |
| … | |
| request_headers => [ | |
| 'append MirrorID "mirror 12"', | |
| 'unset MirrorID', | |
| ], | |
| } | |
| </code></pre> | |
| <h5 md-src-pos="58939..58954"> | |
| <code md-src-pos="58944..58954">rewrites</code> | |
| </h5> | |
| <p md-src-pos="58956..59139">Creates URL rewrite rules. Expects an array of hashes, and the hash keys can be any of 'comment', 'rewrite_base', 'rewrite_cond', 'rewrite_rule' or 'rewrite_map'. Defaults to 'undef'.</p> | |
| <p md-src-pos="59141..59232">For example, you can specify that anyone trying to access index.html is served welcome.html</p> | |
| <pre><code class="language-puppet" md-src-pos="59234..59372"> apache::vhost { 'site.name.fdqn': | |
| … | |
| rewrites => [ { rewrite_rule => ['^index\.html$ welcome.html'] } ] | |
| } | |
| </code></pre> | |
| <p md-src-pos="59374..59535">The parameter allows rewrite conditions that, when true, execute the associated rule. For instance, if you wanted to rewrite URLs only if the visitor is using IE</p> | |
| <pre><code class="language-puppet" md-src-pos="59537..59807"> apache::vhost { 'site.name.fdqn': | |
| … | |
| rewrites => [ | |
| { | |
| comment => 'redirect IE', | |
| rewrite_cond => ['%{HTTP_USER_AGENT} ^MSIE'], | |
| rewrite_rule => ['^index\.html$ welcome.html'], | |
| }, | |
| ], | |
| } | |
| </code></pre> | |
| <p md-src-pos="59809..59955">You can also apply multiple conditions. For instance, rewrite index.html to welcome.html only when the browser is Lynx or Mozilla (version 1 or 2)</p> | |
| <pre><code class="language-puppet" md-src-pos="59957..60278"> 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'], | |
| }, | |
| ], | |
| } | |
| </code></pre> | |
| <p md-src-pos="60280..60330">Multiple rewrites and conditions are also possible</p> | |
| <pre><code class="language-puppet" md-src-pos="60332..61218"> 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]'], | |
| }, | |
| ], | |
| } | |
| </code></pre> | |
| <p md-src-pos="61220..61393"> | |
| Refer to the <a href="http://httpd.apache.org/docs/current/mod/mod_rewrite.html" md-src-pos="61233..61321"> | |
| <code md-src-pos="61234..61247">mod_rewrite</code> | |
| documentation</a> | |
| for more details on what is possible with rewrite rules and conditions.</p> | |
| <h5 md-src-pos="61395..61413"> | |
| <code md-src-pos="61400..61413">scriptalias</code> | |
| </h5> | |
| <p md-src-pos="61415..61537">Defines a directory of CGI scripts to be aliased to the path '/cgi-bin', for example: '/usr/scripts'. Defaults to 'undef'.</p> | |
| <h5 md-src-pos="61539..61559"> | |
| <code md-src-pos="61544..61559">scriptaliases</code> | |
| </h5> | |
| <p md-src-pos="61561..61635"> | |
| <em md-src-pos="61561..61567">Note</em> | |
| : This parameter is deprecated in favour of the <code md-src-pos="61615..61624">aliases</code> | |
| parameter.</p> | |
| <p md-src-pos="61637..61871"> | |
| Passes an array of hashes to the vhost to create either ScriptAlias or ScriptAliasMatch statements as per the <a href="http://httpd.apache.org/docs/current/mod/mod_alias.html" md-src-pos="61747..61831"> | |
| <code md-src-pos="61748..61759">mod_alias</code> | |
| documentation</a> | |
| . These hashes are formatted as follows:</p> | |
| <pre><code class="language-puppet" md-src-pos="61873..62301"> 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', | |
| }, | |
| ] | |
| </code></pre> | |
| <p md-src-pos="62303..62518"> | |
| The ScriptAlias and ScriptAliasMatch directives are created in the order specified. As with <a href="#aliases" md-src-pos="62395..62427">Alias and AliasMatch</a> | |
| directives, more specific aliases should come before more general ones to avoid shadowing.</p> | |
| <h5 md-src-pos="62520..62538"> | |
| <code md-src-pos="62525..62538">serveradmin</code> | |
| </h5> | |
| <p md-src-pos="62540..62644">Specifies the email address Apache displays when it renders one of its error pages. Defaults to 'undef'.</p> | |
| <h5 md-src-pos="62646..62666"> | |
| <code md-src-pos="62651..62666">serveraliases</code> | |
| </h5> | |
| <p md-src-pos="62668..62787"> | |
| Sets the <a href="http://httpd.apache.org/docs/current/mod/core.html#serveralias" md-src-pos="62677..62756">ServerAliases</a> | |
| of the site. Defaults to '[]'.</p> | |
| <h5 md-src-pos="62789..62806"> | |
| <code md-src-pos="62794..62806">servername</code> | |
| </h5> | |
| <p md-src-pos="62808..62932">Sets the servername corresponding to the hostname you connect to the virtual host at. Defaults to the title of the resource.</p> | |
| <h5 md-src-pos="62934..62947"> | |
| <code md-src-pos="62939..62947">setenv</code> | |
| </h5> | |
| <p md-src-pos="62949..63021">Used by HTTPD to set environment variables for vhosts. Defaults to '[]'.</p> | |
| <p md-src-pos="63023..63031">Example:</p> | |
| <pre><code class="language-puppet" md-src-pos="63033..63137"> apache::vhost { 'setenv.example.com': | |
| setenv => ['SPECIAL_PATH /foo/bin'], | |
| } | |
| </code></pre> | |
| <h5 md-src-pos="63139..63154"> | |
| <code md-src-pos="63144..63154">setenvif</code> | |
| </h5> | |
| <p md-src-pos="63156..63242">Used by HTTPD to conditionally set environment variables for vhosts. Defaults to '[]'.</p> | |
| <h5 md-src-pos="63244..63305"> | |
| <code md-src-pos="63249..63267">suphp_addhandler</code> | |
| , <code md-src-pos="63269..63287">suphp_configpath</code> | |
| , & <code md-src-pos="63291..63305">suphp_engine</code> | |
| </h5> | |
| <p md-src-pos="63307..63402"> | |
| Set up a virtual host with <a href="http://suphp.org/DocumentationView.html?file=apache/CONFIG" md-src-pos="63334..63401">suPHP</a> | |
| .</p> | |
| <p md-src-pos="63404..63511"> | |
| <code md-src-pos="63404..63422">suphp_addhandler</code> | |
| defaults to 'php5-script' on RedHat and FreeBSD, and 'x-httpd-php' on Debian and Gentoo.</p> | |
| <p md-src-pos="63513..63620"> | |
| <code md-src-pos="63513..63531">suphp_configpath</code> | |
| defaults to 'undef' on RedHat and FreeBSD, and '/etc/php5/apache2' on Debian and Gentoo.</p> | |
| <p md-src-pos="63622..63683"> | |
| <code md-src-pos="63622..63636">suphp_engine</code> | |
| allows values 'on' or 'off'. Defaults to 'off'</p> | |
| <p md-src-pos="63685..63720">To set up a virtual host with suPHP</p> | |
| <pre><code class="language-puppet" md-src-pos="63722..64151"> 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' }, | |
| } | |
| } | |
| </code></pre> | |
| <h5 md-src-pos="64153..64170"> | |
| <code md-src-pos="64158..64170">vhost_name</code> | |
| </h5> | |
| <p md-src-pos="64172..64440">Enables name-based virtual hosting. If no IP is passed to the virtual host, but the vhost is assigned a port, then the vhost name is 'vhost_name:port'. If the virtual host has no assigned IP or port, the vhost name is set to the title of the resource. Defaults to '*'.</p> | |
| <h5 md-src-pos="64442..64464"> | |
| <code md-src-pos="64447..64464">virtual_docroot</code> | |
| </h5> | |
| <p md-src-pos="64466..64654"> | |
| Sets up a virtual host with a wildcard alias subdomain mapped to a directory with the same name. For example, '<a href="http://example.com" md-src-pos="64577..64595">http://example.com</a> | |
| ' would map to '/var/www/example.com'. Defaults to 'false'.</p> | |
| <pre><code class="language-puppet" md-src-pos="64656..64894"> apache::vhost { 'subdomain.loc': | |
| vhost_name => '*', | |
| port => '80', | |
| virtual_docroot' => '/var/www/%-2+', | |
| docroot => '/var/www', | |
| serveraliases => ['*.loc',], | |
| } | |
| </code></pre> | |
| <h5 md-src-pos="64896..65027"> | |
| <code md-src-pos="64901..64922">wsgi_daemon_process</code> | |
| , <code md-src-pos="64924..64953">wsgi_daemon_process_options</code> | |
| , <code md-src-pos="64955..64975">wsgi_process_group</code> | |
| , <code md-src-pos="64977..64998">wsgi_script_aliases</code> | |
| , & <code md-src-pos="65002..65027">wsgi_pass_authorization</code> | |
| </h5> | |
| <p md-src-pos="65029..65099"> | |
| Set up a virtual host with <a href="https://code.google.com/p/modwsgi/" md-src-pos="65056..65098">WSGI</a> | |
| .</p> | |
| <p md-src-pos="65101..65312"> | |
| <code md-src-pos="65101..65122">wsgi_daemon_process</code> | |
| sets the name of the WSGI daemon. It is a hash, accepting <a href="http://modwsgi.readthedocs.org/en/latest/configuration-directives/WSGIDaemonProcess.html" md-src-pos="65181..65283">these keys</a> | |
| , and it defaults to 'undef'.</p> | |
| <p md-src-pos="65314..65380"> | |
| <code md-src-pos="65314..65343">wsgi_daemon_process_options</code> | |
| is optional and defaults to 'undef'.</p> | |
| <p md-src-pos="65382..65470"> | |
| <code md-src-pos="65382..65402">wsgi_process_group</code> | |
| sets the group ID the virtual host runs under. Defaults to 'undef'.</p> | |
| <p md-src-pos="65472..65570"> | |
| <code md-src-pos="65472..65493">wsgi_script_aliases</code> | |
| requires a hash of web paths to filesystem .wsgi paths. Defaults to 'undef'.</p> | |
| <p md-src-pos="65572..65874"> | |
| <code md-src-pos="65572..65597">wsgi_pass_authorization</code> | |
| the WSGI application handles authorisation instead of Apache when set to 'On'. For more information see [here] (<a href="http://modwsgi.readthedocs.org/en/latest/configuration-directives/WSGIPassAuthorization.html" md-src-pos="65710..65802">http://modwsgi.readthedocs.org/en/latest/configuration-directives/WSGIPassAuthorization.html</a> | |
| ). Defaults to 'undef' where apache sets the defaults setting to 'Off'.</p> | |
| <p md-src-pos="65876..65957"> | |
| <code md-src-pos="65876..65898">wsgi_chunked_request</code> | |
| enables support for chunked requests. Defaults to 'undef'.</p> | |
| <p md-src-pos="65959..65993">To set up a virtual host with WSGI</p> | |
| <pre><code class="language-puppet" md-src-pos="65995..66509"> 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', | |
| } | |
| </code></pre> | |
| <h4 md-src-pos="66511..66558"> | |
| Parameter <code md-src-pos="66525..66538">directories</code> | |
| for <code md-src-pos="66543..66558">apache::vhost</code> | |
| </h4> | |
| <p md-src-pos="66560..66983"> | |
| The <code md-src-pos="66564..66577">directories</code> | |
| parameter within the <code md-src-pos="66599..66614">apache::vhost</code> | |
| class passes an array of hashes to the vhost to create <a href="http://httpd.apache.org/docs/current/mod/core.html#directory" md-src-pos="66670..66743">Directory</a> | |
| , <a href="http://httpd.apache.org/docs/current/mod/core.html#files" md-src-pos="66745..66809">File</a> | |
| , and <a href="http://httpd.apache.org/docs/current/mod/core.html#location" md-src-pos="66815..66886">Location</a> | |
| directive blocks. These blocks take the form, '< Directory /path/to/directory>...< /Directory>'.</p> | |
| <p md-src-pos="66985..67300"> | |
| The <code md-src-pos="66989..66995">path</code> | |
| key sets the path for the directory, files, and location blocks. Its value must be a path for the 'directory', 'files', and 'location' providers, or a regex for the 'directorymatch', 'filesmatch', or 'locationmatch' providers. Each hash passed to <code md-src-pos="67243..67256">directories</code> | |
| <strong md-src-pos="67257..67265">must</strong> | |
| contain <code md-src-pos="67274..67280">path</code> | |
| as one of the keys.</p> | |
| <p md-src-pos="67302..67604"> | |
| The <code md-src-pos="67306..67316">provider</code> | |
| key is optional. If missing, this key defaults to 'directory'. Valid values for <code md-src-pos="67397..67407">provider</code> | |
| are 'directory', 'files', 'location', 'directorymatch', 'filesmatch', or 'locationmatch'. If you set <code md-src-pos="67509..67519">provider</code> | |
| to 'directorymatch', it uses the keyword 'DirectoryMatch' in the Apache config file.</p> | |
| <p md-src-pos="67606..67654"> | |
| General <code md-src-pos="67614..67627">directories</code> | |
| usage looks something like</p> | |
| <pre><code class="language-puppet" md-src-pos="67656..67909"> apache::vhost { 'files.example.net': | |
| docroot => '/var/www/files', | |
| directories => [ | |
| { 'path' => '/var/www/files', | |
| 'provider' => 'files', | |
| 'deny' => 'from all' | |
| }, | |
| ], | |
| } | |
| </code></pre> | |
| <p md-src-pos="67911..68193"> | |
| <em md-src-pos="67911..67918">Note:</em> | |
| At least one directory should match the <code md-src-pos="67959..67968">docroot</code> | |
| parameter. After you start declaring directories, <code md-src-pos="68019..68034">apache::vhost</code> | |
| assumes that all required Directory blocks will be declared. If not defined, a single default Directory block is created that matches the <code md-src-pos="68173..68182">docroot</code> | |
| parameter.</p> | |
| <p md-src-pos="68195..68324"> | |
| Available handlers, represented as keys, should be placed within the <code md-src-pos="68264..68275">directory</code> | |
| , <code md-src-pos="68277..68284">files</code> | |
| , or <code md-src-pos="68289..68299">location</code> | |
| hashes. This looks like</p> | |
| <pre><code class="language-puppet" md-src-pos="68326..68503"> apache::vhost { 'sample.example.net': | |
| docroot => '/path/to/directory', | |
| directories => [ { path => '/path/to/directory', handler => value } ], | |
| } | |
| </code></pre> | |
| <p md-src-pos="68505..68704">Any handlers you do not set in these hashes are considered 'undefined' within Puppet and are not added to the virtual host, resulting in the module using their default values. Supported handlers are:</p> | |
| <h6 md-src-pos="68706..68725"> | |
| <code md-src-pos="68712..68725">addhandlers</code> | |
| </h6> | |
| <p md-src-pos="68727..69065"> | |
| Sets <a href="http://httpd.apache.org/docs/current/mod/mod_mime.html#addhandler" md-src-pos="68732..68811">AddHandler</a> | |
| directives, which map filename extensions to the specified handler. Accepts a list of hashes, with <code md-src-pos="68911..68923">extensions</code> | |
| serving to list the extensions being managed by the handler, and takes the form: <code md-src-pos="69005..69064">{ handler => 'handler-name', extensions => ['extension']}</code> | |
| .</p> | |
| <pre><code class="language-puppet" md-src-pos="69067..69340"> apache::vhost { 'sample.example.net': | |
| docroot => '/path/to/directory', | |
| directories => [ | |
| { path => '/path/to/directory', | |
| addhandlers => [{ handler => 'cgi-script', extensions => ['.cgi']}], | |
| }, | |
| ], | |
| } | |
| </code></pre> | |
| <h6 md-src-pos="69342..69355"> | |
| <code md-src-pos="69348..69355">allow</code> | |
| </h6> | |
| <p md-src-pos="69357..69702"> | |
| Sets an <a href="http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow" md-src-pos="69365..69436">Allow</a> | |
| directive, which groups authorizations based on hostnames or IPs. <strong md-src-pos="69503..69518">Deprecated:</strong> | |
| This parameter is being deprecated due to a change in Apache. It only works with Apache 2.2 and lower. You can use it as a single string for one rule or as an array for more than one.</p> | |
| <pre><code class="language-puppet" md-src-pos="69704..69931"> apache::vhost { 'sample.example.net': | |
| docroot => '/path/to/directory', | |
| directories => [ | |
| { path => '/path/to/directory', | |
| allow => 'from example.org', | |
| }, | |
| ], | |
| } | |
| </code></pre> | |
| <h6 md-src-pos="69933..69955"> | |
| <code md-src-pos="69939..69955">allow_override</code> | |
| </h6> | |
| <p md-src-pos="69957..70099"> | |
| Sets the types of directives allowed in <a href="http://httpd.apache.org/docs/current/mod/core.html#allowoverride" md-src-pos="69997..70074">.htaccess</a> | |
| files. Accepts an array.</p> | |
| <pre><code class="language-puppet" md-src-pos="70101..70355"> apache::vhost { 'sample.example.net': | |
| docroot => '/path/to/directory', | |
| directories => [ | |
| { path => '/path/to/directory', | |
| allow_override => ['AuthConfig', 'Indexes'], | |
| }, | |
| ], | |
| } | |
| </code></pre> | |
| <h6 md-src-pos="70357..70389"> | |
| <code md-src-pos="70363..70389">auth_basic_authoritative</code> | |
| </h6> | |
| <p md-src-pos="70391..70621"> | |
| Sets the value for <a href="https://httpd.apache.org/docs/current/mod/mod_auth_basic.html#authbasicauthoritative" md-src-pos="70410..70520">AuthBasicAuthoritative</a> | |
| , which determines whether authorization and authentication are passed to lower level Apache modules.</p> | |
| <h6 md-src-pos="70623..70646"> | |
| <code md-src-pos="70629..70646">auth_basic_fake</code> | |
| </h6> | |
| <p md-src-pos="70648..70842"> | |
| Sets the value for <a href="http://httpd.apache.org/docs/current/mod/mod_auth_basic.html#authbasicfake" md-src-pos="70667..70758">AuthBasicFake</a> | |
| , which statically configures authorization credentials for a given directive block.</p> | |
| <h6 md-src-pos="70844..70871"> | |
| <code md-src-pos="70850..70871">auth_basic_provider</code> | |
| </h6> | |
| <p md-src-pos="70873..71054"> | |
| Sets the value for [AuthBasicProvider] (<a href="http://httpd.apache.org/docs/current/mod/mod_auth_basic.html#authbasicprovider" md-src-pos="70913..70991">http://httpd.apache.org/docs/current/mod/mod_auth_basic.html#authbasicprovider</a> | |
| ), which sets the authentication provider for a given location.</p> | |
| <h6 md-src-pos="71056..71085"> | |
| <code md-src-pos="71062..71085">auth_digest_algorithm</code> | |
| </h6> | |
| <p md-src-pos="71087..71292"> | |
| Sets the value for <a href="http://httpd.apache.org/docs/current/mod/mod_auth_digest.html#authdigestalgorithm" md-src-pos="71106..71210">AuthDigestAlgorithm</a> | |
| , which selects the algorithm used to calculate the challenge and response hashes.</p> | |
| <h6 md-src-pos="71294..71320"> | |
| <code md-src-pos="71300..71320">auth_digest_domain</code> | |
| </h6> | |
| <p md-src-pos="71322..71541"> | |
| Sets the value for <a href="http://httpd.apache.org/docs/current/mod/mod_auth_digest.html#authdigestdomain" md-src-pos="71341..71439">AuthDigestDomain</a> | |
| , which allows you to specify one or more URIs in the same protection space for digest authentication.</p> | |
| <h6 md-src-pos="71543..71577"> | |
| <code md-src-pos="71549..71577">auth_digest_nonce_lifetime</code> | |
| </h6> | |
| <p md-src-pos="71579..71762"> | |
| Sets the value for <a href="http://httpd.apache.org/docs/current/mod/mod_auth_digest.html#authdigestnoncelifetime" md-src-pos="71598..71710">AuthDigestNonceLifetime</a> | |
| , which controls how long the server nonce is valid.</p> | |
| <h6 md-src-pos="71764..71792"> | |
| <code md-src-pos="71770..71792">auth_digest_provider</code> | |
| </h6> | |
| <p md-src-pos="71794..71977"> | |
| Sets the value for <a href="http://httpd.apache.org/docs/current/mod/mod_auth_digest.html#authdigestprovider" md-src-pos="71813..71915">AuthDigestProvider</a> | |
| , which sets the authentication provider for a given location.</p> | |
| <h6 md-src-pos="71979..72002"> | |
| <code md-src-pos="71985..72002">auth_digest_qop</code> | |
| </h6> | |
| <p md-src-pos="72004..72192"> | |
| Sets the value for <a href="http://httpd.apache.org/docs/current/mod/mod_auth_digest.html#authdigestqop" md-src-pos="72023..72115">AuthDigestQop</a> | |
| , which determines the quality-of-protection to use in digest authentication.</p> | |
| <h6 md-src-pos="72194..72224"> | |
| <code md-src-pos="72200..72224">auth_digest_shmem_size</code> | |
| </h6> | |
| <p md-src-pos="72226..72450"> | |
| Sets the value for <a href="http://httpd.apache.org/docs/current/mod/mod_auth_digest.html#authdigestshmemsize" md-src-pos="72245..72353">AuthAuthDigestShmemSize</a> | |
| , which defines the amount of shared memory allocated to the server for keeping track of clients.</p> | |
| <h6 md-src-pos="72452..72475"> | |
| <code md-src-pos="72458..72475">auth_group_file</code> | |
| </h6> | |
| <p md-src-pos="72477..72685"> | |
| Sets the value for <a href="https://httpd.apache.org/docs/current/mod/mod_authz_groupfile.html#authgroupfile" md-src-pos="72496..72593">AuthGroupFile</a> | |
| , which sets the name of the text file containing the list of user groups for authorization.</p> | |
| <h6 md-src-pos="72687..72704"> | |
| <code md-src-pos="72693..72704">auth_name</code> | |
| </h6> | |
| <p md-src-pos="72706..72855"> | |
| Sets the value for <a href="http://httpd.apache.org/docs/current/mod/mod_authn_core.html#authname" md-src-pos="72725..72806">AuthName</a> | |
| , which sets the name of the authorization realm.</p> | |
| <h6 md-src-pos="72857..72877"> | |
| <code md-src-pos="72863..72877">auth_require</code> | |
| </h6> | |
| <p md-src-pos="72879..73040"> | |
| Sets the entity name you're requiring to allow access. Read more about <a href="http://httpd.apache.org/docs/current/mod/mod_authz_host.html#requiredirectives" md-src-pos="72950..73039">Require</a> | |
| .</p> | |
| <h6 md-src-pos="73042..73059"> | |
| <code md-src-pos="73048..73059">auth_type</code> | |
| </h6> | |
| <p md-src-pos="73061..73208"> | |
| Sets the value for <a href="http://httpd.apache.org/docs/current/mod/mod_authn_core.html#authtype" md-src-pos="73080..73161">AuthType</a> | |
| , which guides the type of user authentication.</p> | |
| <h6 md-src-pos="73210..73232"> | |
| <code md-src-pos="73216..73232">auth_user_file</code> | |
| </h6> | |
| <p md-src-pos="73234..73431"> | |
| Sets the value for <a href="http://httpd.apache.org/docs/current/mod/mod_authn_file.html#authuserfile" md-src-pos="73253..73342">AuthUserFile</a> | |
| , which sets the name of the text file containing the users/passwords for authentication.</p> | |
| <h6 md-src-pos="73433..73456"> | |
| <code md-src-pos="73439..73456">custom_fragment</code> | |
| </h6> | |
| <p md-src-pos="73458..73562">Pass a string of custom configuration directives to be placed at the end of the directory configuration.</p> | |
| <pre><code class="language-puppet" md-src-pos="73564..73974"> apache::vhost { 'monitor': | |
| … | |
| directories => [ | |
| { | |
| path => '/path/to/directory', | |
| custom_fragment => ' | |
| <Location /balancer-manager> | |
| SetHandler balancer-manager | |
| Order allow,deny | |
| Allow from all | |
| </Location> | |
| <Location /server-status> | |
| SetHandler server-status | |
| Order allow,deny | |
| Allow from all | |
| </Location> | |
| ProxyStatus On', | |
| }, | |
| ] | |
| } | |
| </code></pre> | |
| <h6 md-src-pos="73976..73988"> | |
| <code md-src-pos="73982..73988">deny</code> | |
| </h6> | |
| <p md-src-pos="73990..74333"> | |
| Sets a <a href="http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#deny" md-src-pos="73997..74066">Deny</a> | |
| directive, specifying which hosts are denied access to the server. <strong md-src-pos="74134..74149">Deprecated:</strong> | |
| This parameter is being deprecated due to a change in Apache. It only works with Apache 2.2 and lower. You can use it as a single string for one rule or as an array for more than one.</p> | |
| <pre><code class="language-puppet" md-src-pos="74335..74560"> apache::vhost { 'sample.example.net': | |
| docroot => '/path/to/directory', | |
| directories => [ | |
| { path => '/path/to/directory', | |
| deny => 'from example.org', | |
| }, | |
| ], | |
| } | |
| </code></pre> | |
| <h6 md-src-pos="74562..74585"> | |
| <code md-src-pos="74568..74585">error_documents</code> | |
| </h6> | |
| <p md-src-pos="74587..74737"> | |
| An array of hashes used to override the <a href="https://httpd.apache.org/docs/current/mod/core.html#errordocument" md-src-pos="74627..74709">ErrorDocument</a> | |
| settings for the directory.</p> | |
| <pre><code class="language-puppet" md-src-pos="74739..75030"> apache::vhost { 'sample.example.net': | |
| directories => [ | |
| { path => '/srv/www', | |
| error_documents => [ | |
| { 'error_code' => '503', | |
| 'document' => '/service-unavail', | |
| }, | |
| ], | |
| }, | |
| ], | |
| } | |
| </code></pre> | |
| <h6 md-src-pos="75032..75052"> | |
| <code md-src-pos="75038..75052">geoip_enable</code> | |
| </h6> | |
| <p md-src-pos="75054..75239"> | |
| Sets the <a href="http://dev.maxmind.com/geoip/legacy/mod_geoip2/#Configuration" md-src-pos="75063..75139">GeoIPEnable</a> | |
| directive. | |
| Note that you must declare <code md-src-pos="75178..75210">class {'apache::mod::geoip': }</code> | |
| before using this directive.</p> | |
| <pre><code class="language-puppet" md-src-pos="75241..75459"> apache::vhost { 'first.example.com': | |
| docroot => '/var/www/first', | |
| directories => [ | |
| { path => '/var/www/first', | |
| geoip_enable => true, | |
| }, | |
| ], | |
| } | |
| </code></pre> | |
| <h6 md-src-pos="75461..75476"> | |
| <code md-src-pos="75467..75476">headers</code> | |
| </h6> | |
| <p md-src-pos="75478..75579"> | |
| Adds lines for <a href="http://httpd.apache.org/docs/current/mod/mod_headers.html#header" md-src-pos="75493..75567">Header</a> | |
| directives.</p> | |
| <pre><code class="language-puppet" md-src-pos="75581..75829"> apache::vhost { 'sample.example.net': | |
| docroot => '/path/to/directory', | |
| directories => { | |
| path => '/path/to/directory', | |
| headers => 'Set X-Robots-Tag "noindex, noarchive, nosnippet"', | |
| }, | |
| } | |
| </code></pre> | |
| <h6 md-src-pos="75831..75852"> | |
| <code md-src-pos="75837..75852">index_options</code> | |
| </h6> | |
| <p md-src-pos="75854..75983"> | |
| Allows configuration settings for <a href="http://httpd.apache.org/docs/current/mod/mod_autoindex.html#indexoptions" md-src-pos="75888..75982">directory indexing</a> | |
| .</p> | |
| <pre><code class="language-puppet" md-src-pos="75985..76388"> apache::vhost { 'sample.example.net': | |
| docroot => '/path/to/directory', | |
| directories => [ | |
| { path => '/path/to/directory', | |
| options => ['Indexes','FollowSymLinks','MultiViews'], | |
| index_options => ['IgnoreCase', 'FancyIndexing', 'FoldersFirst', 'NameWidth=*', 'DescriptionWidth=*', 'SuppressHTMLPreamble'], | |
| }, | |
| ], | |
| } | |
| </code></pre> | |
| <h6 md-src-pos="76390..76417"> | |
| <code md-src-pos="76396..76417">index_order_default</code> | |
| </h6> | |
| <p md-src-pos="76419..76549"> | |
| Sets the <a href="http://httpd.apache.org/docs/current/mod/mod_autoindex.html#indexorderdefault" md-src-pos="76428..76525">default ordering</a> | |
| of the directory index.</p> | |
| <pre><code class="language-puppet" md-src-pos="76551..76857"> apache::vhost { 'sample.example.net': | |
| docroot => '/path/to/directory', | |
| directories => [ | |
| { path => '/path/to/directory', | |
| order => 'Allow,Deny', | |
| index_order_default => ['Descending', 'Date'], | |
| }, | |
| ], | |
| } | |
| </code></pre> | |
| <h6 md-src-pos="76859..76874"> | |
| <code md-src-pos="76865..76874">options</code> | |
| </h6> | |
| <p md-src-pos="76876..76986"> | |
| Lists the <a href="http://httpd.apache.org/docs/current/mod/core.html#options" md-src-pos="76886..76955">Options</a> | |
| for the given Directory block.</p> | |
| <pre><code class="language-puppet" md-src-pos="76988..77242"> apache::vhost { 'sample.example.net': | |
| docroot => '/path/to/directory', | |
| directories => [ | |
| { path => '/path/to/directory', | |
| options => ['Indexes','FollowSymLinks','MultiViews'], | |
| }, | |
| ], | |
| } | |
| </code></pre> | |
| <h6 md-src-pos="77244..77257"> | |
| <code md-src-pos="77250..77257">order</code> | |
| </h6> | |
| <p md-src-pos="77259..77532"> | |
| Sets the order of processing Allow and Deny statements as per <a href="http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order" md-src-pos="77321..77412">Apache core documentation</a> | |
| . <strong md-src-pos="77414..77429">Deprecated:</strong> | |
| This parameter is being deprecated due to a change in Apache. It only works with Apache 2.2 and lower.</p> | |
| <pre><code class="language-puppet" md-src-pos="77534..77755"> apache::vhost { 'sample.example.net': | |
| docroot => '/path/to/directory', | |
| directories => [ | |
| { path => '/path/to/directory', | |
| order => 'Allow,Deny', | |
| }, | |
| ], | |
| } | |
| </code></pre> | |
| <h6 md-src-pos="77757..77782"> | |
| <code md-src-pos="77763..77782">passenger_enabled</code> | |
| </h6> | |
| <p md-src-pos="77784..77987"> | |
| Sets the value for the <a href="http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerEnabled" md-src-pos="77807..77909">PassengerEnabled</a> | |
| directory to 'on' or 'off'. Requires <code md-src-pos="77947..77971">apache::mod::passenger</code> | |
| to be included.</p> | |
| <pre><code class="language-puppet" md-src-pos="77989..78226"> apache::vhost { 'sample.example.net': | |
| docroot => '/path/to/directory', | |
| directories => [ | |
| { path => '/path/to/directory', | |
| passenger_enabled => 'on', | |
| }, | |
| ], | |
| } | |
| </code></pre> | |
| <p md-src-pos="78228..78425"> | |
| <em md-src-pos="78228..78235">Note:</em> | |
| Be aware that there is an <a href="http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html" md-src-pos="78262..78343">issue</a> | |
| using the PassengerEnabled directive with the PassengerHighPerformance directive.</p> | |
| <h6 md-src-pos="78427..78459"> | |
| <code md-src-pos="78433..78444">php_value</code> | |
| and <code md-src-pos="78449..78459">php_flag</code> | |
| </h6> | |
| <p md-src-pos="78461..78656"> | |
| <code md-src-pos="78461..78472">php_value</code> | |
| sets the value of the directory, and <code md-src-pos="78510..78520">php_flag</code> | |
| uses a boolean to configure the directory. Further information can be found <a href="http://php.net/manual/en/configuration.changes.php" md-src-pos="78597..78655">here</a> | |
| .</p> | |
| <h6 md-src-pos="78658..78702"> | |
| <code md-src-pos="78664..78681">php_admin_value</code> | |
| and <code md-src-pos="78686..78702">php_admin_flag</code> | |
| </h6> | |
| <p md-src-pos="78704..78911"> | |
| <code md-src-pos="78704..78721">php_admin_value</code> | |
| sets the value of the directory, and <code md-src-pos="78759..78775">php_admin_flag</code> | |
| uses a boolean to configure the directory. Further information can be found <a href="http://php.net/manual/en/configuration.changes.php" md-src-pos="78852..78910">here</a> | |
| .</p> | |
| <h6 md-src-pos="78914..78929"> | |
| <code md-src-pos="78920..78929">satisfy</code> | |
| </h6> | |
| <p md-src-pos="78931..79172"> | |
| Sets a <code md-src-pos="78938..78947">Satisfy</code> | |
| directive as per the <a href="http://httpd.apache.org/docs/2.2/mod/core.html#satisfy" md-src-pos="78969..79052">Apache Core documentation</a> | |
| . <strong md-src-pos="79054..79069">Deprecated:</strong> | |
| This parameter is being deprecated due to a change in Apache. It only works with Apache 2.2 and lower.</p> | |
| <pre><code class="language-puppet" md-src-pos="79174..79391"> apache::vhost { 'sample.example.net': | |
| docroot => '/path/to/directory', | |
| directories => [ | |
| { path => '/path/to/directory', | |
| satisfy => 'Any', | |
| } | |
| ], | |
| } | |
| </code></pre> | |
| <h6 md-src-pos="79393..79411"> | |
| <code md-src-pos="79399..79411">sethandler</code> | |
| </h6> | |
| <p md-src-pos="79413..79553"> | |
| Sets a <code md-src-pos="79420..79432">SetHandler</code> | |
| directive as per the <a href="http://httpd.apache.org/docs/2.2/mod/core.html#sethandler" md-src-pos="79454..79540">Apache Core documentation</a> | |
| . An example:</p> | |
| <pre><code class="language-puppet" md-src-pos="79555..79779"> apache::vhost { 'sample.example.net': | |
| docroot => '/path/to/directory', | |
| directories => [ | |
| { path => '/path/to/directory', | |
| sethandler => 'None', | |
| } | |
| ], | |
| } | |
| </code></pre> | |
| <h6 md-src-pos="79781..79797"> | |
| <code md-src-pos="79787..79797">rewrites</code> | |
| </h6> | |
| <p md-src-pos="79799..79984"> | |
| Creates URL <a href="#rewrites" md-src-pos="79811..79834"> | |
| <code md-src-pos="79812..79822">rewrites</code> | |
| </a> | |
| rules in vhost directories. Expects an array of hashes, and the hash keys can be any of 'comment', 'rewrite_base', 'rewrite_cond', or 'rewrite_rule'.</p> | |
| <pre><code class="language-puppet" md-src-pos="79986..80715"> 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]' ], | |
| } | |
| ], | |
| }, | |
| ], | |
| } | |
| </code></pre> | |
| <p md-src-pos="80717..80988"> | |
| <strong md-src-pos="80717..80727"> | |
| <em md-src-pos="80719..80725">Note</em> | |
| </strong> | |
| If you include rewrites in your directories make sure you are also including <code md-src-pos="80805..80827">apache::mod::rewrite</code> | |
| . You may also want to consider setting the rewrites using the <code md-src-pos="80890..80900">rewrites</code> | |
| parameter in <code md-src-pos="80914..80929">apache::vhost</code> | |
| rather than setting the rewrites in the vhost directories.</p> | |
| <h6 md-src-pos="80990..81018"> | |
| <code md-src-pos="80996..81018">shib_request_setting</code> | |
| </h6> | |
| <p md-src-pos="81020..81584"> | |
| Allows an valid content setting to be set or altered for the application request. This command takes two parameters, the name of the content setting, and the value to set it to.Check the Shibboleth <a href="https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPContentSettings" md-src-pos="81218..81327">content setting documentation</a> | |
| for valid settings. This key is disabled if <code md-src-pos="81372..81391">apache::mod::shib</code> | |
| is not defined. Check the <a href="https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPApacheConfig#NativeSPApacheConfig-Server/VirtualHostOptions" md-src-pos="81418..81566"> | |
| <code md-src-pos="81419..81429">mod_shib</code> | |
| documentation</a> | |
| for more details.</p> | |
| <pre><code class="language-puppet" md-src-pos="81586..81886"> apache::vhost { 'secure.example.net': | |
| docroot => '/path/to/directory', | |
| directories => [ | |
| { path => '/path/to/directory', | |
| shib_require_setting => 'requiresession 1', | |
| shib_use_headers => 'On', | |
| }, | |
| ], | |
| } | |
| </code></pre> | |
| <h6 md-src-pos="81888..81912"> | |
| <code md-src-pos="81894..81912">shib_use_headers</code> | |
| </h6> | |
| <p md-src-pos="81914..82323"> | |
| When set to 'On' this turns on the use of request headers to publish attributes to applications. Valid values for this key is 'On' or 'Off', and the default value is 'Off'. This key is disabled if <code md-src-pos="82111..82130">apache::mod::shib</code> | |
| is not defined. Check the <a href="https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPApacheConfig#NativeSPApacheConfig-Server/VirtualHostOptions" md-src-pos="82157..82305"> | |
| <code md-src-pos="82158..82168">mod_shib</code> | |
| documentation</a> | |
| for more details.</p> | |
| <h6 md-src-pos="82325..82344"> | |
| <code md-src-pos="82331..82344">ssl_options</code> | |
| </h6> | |
| <p md-src-pos="82346..82573"> | |
| String or list of <a href="https://httpd.apache.org/docs/current/mod/mod_ssl.html#ssloptions" md-src-pos="82364..82443">SSLOptions</a> | |
| , which configure SSL engine run-time options. This handler takes precedence over SSLOptions set in the parent block of the vhost.</p> | |
| <pre><code class="language-puppet" md-src-pos="82575..82937"> 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'], | |
| }, | |
| ], | |
| } | |
| </code></pre> | |
| <h6 md-src-pos="82939..82952"> | |
| <code md-src-pos="82945..82952">suphp</code> | |
| </h6> | |
| <p md-src-pos="82954..83211"> | |
| A hash containing the 'user' and 'group' keys for the <a href="http://www.suphp.org/DocumentationView.html?file=apache/CONFIG" md-src-pos="83008..83089">suPHP_UserGroup</a> | |
| setting. It must be used with <code md-src-pos="83120..83140">suphp_engine => on</code> | |
| in the vhost declaration, and can only be passed within <code md-src-pos="83197..83210">directories</code> | |
| .</p> | |
| <pre><code class="language-puppet" md-src-pos="83213..83509"> apache::vhost { 'secure.example.net': | |
| docroot => '/path/to/directory', | |
| directories => [ | |
| { path => '/path/to/directory', | |
| suphp => | |
| { user => 'myappuser', | |
| group => 'myappgroup', | |
| }, | |
| }, | |
| ], | |
| } | |
| </code></pre> | |
| <h4 md-src-pos="83511..83549"> | |
| SSL parameters for <code md-src-pos="83534..83549">apache::vhost</code> | |
| </h4> | |
| <p md-src-pos="83551..83724"> | |
| All of the SSL parameters for <code md-src-pos="83581..83590">::vhost</code> | |
| default to whatever is set in the base <code md-src-pos="83630..83638">apache</code> | |
| class. Use the below parameters to tweak individual SSL settings for specific vhosts.</p> | |
| <h5 md-src-pos="83726..83736"> | |
| <code md-src-pos="83731..83736">ssl</code> | |
| </h5> | |
| <p md-src-pos="83738..83870">Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are 'true' or 'false'. Defaults to 'false'.</p> | |
| <h5 md-src-pos="83872..83885"> | |
| <code md-src-pos="83877..83885">ssl_ca</code> | |
| </h5> | |
| <p md-src-pos="83887..83948">Specifies the SSL certificate authority. Defaults to 'undef'.</p> | |
| <h5 md-src-pos="83950..83965"> | |
| <code md-src-pos="83955..83965">ssl_cert</code> | |
| </h5> | |
| <p md-src-pos="83967..84223">Specifies the SSL certification. Defaults are based on your OS: '/etc/pki/tls/certs/localhost.crt' for RedHat, '/etc/ssl/certs/ssl-cert-snakeoil.pem' for Debian, '/usr/local/etc/apache22/server.crt' for FreeBSD, and '/etc/ssl/apache2/server.crt' on Gentoo.</p> | |
| <h5 md-src-pos="84225..84244"> | |
| <code md-src-pos="84230..84244">ssl_protocol</code> | |
| </h5> | |
| <p md-src-pos="84246..84416"> | |
| Specifies <a href="http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslprotocol" md-src-pos="84256..84336">SSLProtocol</a> | |
| . Expects an array of accepted protocols. Defaults to 'all', '-SSLv2', '-SSLv3'.</p> | |
| <h5 md-src-pos="84418..84435"> | |
| <code md-src-pos="84423..84435">ssl_cipher</code> | |
| </h5> | |
| <p md-src-pos="84437..84573"> | |
| Specifies <a href="http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslciphersuite" md-src-pos="84447..84533">SSLCipherSuite</a> | |
| . Defaults to 'HIGH:MEDIUM:!aNULL:!MD5'.</p> | |
| <h5 md-src-pos="84575..84602"> | |
| <code md-src-pos="84580..84602">ssl_honorcipherorder</code> | |
| </h5> | |
| <p md-src-pos="84604..84814"> | |
| Sets <a href="http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslhonorcipherorder" md-src-pos="84609..84705">SSLHonorCipherOrder</a> | |
| , which is used to prefer the server's cipher preference order. Defaults to 'On' in the base <code md-src-pos="84798..84806">apache</code> | |
| config.</p> | |
| <h5 md-src-pos="84816..84836"> | |
| <code md-src-pos="84821..84836">ssl_certs_dir</code> | |
| </h5> | |
| <p md-src-pos="84838..85040">Specifies the location of the SSL certification directory. Defaults to '/etc/ssl/certs' on Debian, '/etc/pki/tls/certs' on RedHat, '/usr/local/etc/apache22' on FreeBSD, and '/etc/ssl/apache2' on Gentoo.</p> | |
| <h5 md-src-pos="85042..85058"> | |
| <code md-src-pos="85047..85058">ssl_chain</code> | |
| </h5> | |
| <p md-src-pos="85060..85268"> | |
| Specifies the SSL chain. Defaults to 'undef'. (This default works out of the box, but it must be updated in the base <code md-src-pos="85177..85185">apache</code> | |
| class with your specific certificate information before being used in production.)</p> | |
| <h5 md-src-pos="85270..85284"> | |
| <code md-src-pos="85275..85284">ssl_crl</code> | |
| </h5> | |
| <p md-src-pos="85286..85515"> | |
| Specifies the certificate revocation list to use. Defaults to 'undef'. (This default works out of the box but must be updated in the base <code md-src-pos="85424..85432">apache</code> | |
| class with your specific certificate information before being used in production.)</p> | |
| <h5 md-src-pos="85517..85536"> | |
| <code md-src-pos="85522..85536">ssl_crl_path</code> | |
| </h5> | |
| <p md-src-pos="85538..85776"> | |
| Specifies the location of the certificate revocation list. Defaults to 'undef'. (This default works out of the box but must be updated in the base <code md-src-pos="85685..85693">apache</code> | |
| class with your specific certificate information before being used in production.)</p> | |
| <h5 md-src-pos="85778..85798"> | |
| <code md-src-pos="85783..85798">ssl_crl_check</code> | |
| </h5> | |
| <p md-src-pos="85800..86150"> | |
| Sets the certificate revocation check level via the <a href="http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslcarevocationcheck" md-src-pos="85852..85960">SSLCARevocationCheck directive</a> | |
| , defaults to 'undef'. This default works out of the box but must be specified when using CRLs in production. Only applicable to Apache 2.4 or higher; the value is ignored on older versions.</p> | |
| <h5 md-src-pos="86152..86166"> | |
| <code md-src-pos="86157..86166">ssl_key</code> | |
| </h5> | |
| <p md-src-pos="86168..86591"> | |
| Specifies the SSL key. Defaults are based on your operating system: '/etc/pki/tls/private/localhost.key' for RedHat, '/etc/ssl/private/ssl-cert-snakeoil.key' for Debian, '/usr/local/etc/apache22/server.key' for FreeBSD, and '/etc/ssl/apache2/server.key' on Gentoo. (This default works out of the box but must be updated in the base <code md-src-pos="86500..86508">apache</code> | |
| class with your specific certificate information before being used in production.)</p> | |
| <h5 md-src-pos="86593..86617"> | |
| <code md-src-pos="86598..86617">ssl_verify_client</code> | |
| </h5> | |
| <p md-src-pos="86619..86892"> | |
| Sets the <a href="http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslverifyclient" md-src-pos="86628..86716">SSLVerifyClient</a> | |
| directive, which sets the certificate verification level for client authentication. Valid values are: 'none', 'optional', 'require', and 'optional_no_ca'. Defaults to 'undef'.</p> | |
| <pre><code class="language-puppet" md-src-pos="86894..87002"> apache::vhost { 'sample.example.net': | |
| … | |
| ssl_verify_client => 'optional', | |
| } | |
| </code></pre> | |
| <h5 md-src-pos="87004..87027"> | |
| <code md-src-pos="87009..87027">ssl_verify_depth</code> | |
| </h5> | |
| <p md-src-pos="87029..87245"> | |
| Sets the <a href="http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslverifydepth" md-src-pos="87038..87124">SSLVerifyDepth</a> | |
| directive, which specifies the maximum depth of CA certificates in client certificate verification. Defaults to 'undef'.</p> | |
| <pre><code class="language-puppet" md-src-pos="87247..87345"> apache::vhost { 'sample.example.net': | |
| … | |
| ssl_verify_depth => 1, | |
| } | |
| </code></pre> | |
| <h5 md-src-pos="87347..87365"> | |
| <code md-src-pos="87352..87365">ssl_options</code> | |
| </h5> | |
| <p md-src-pos="87367..87620"> | |
| Sets the <a href="http://httpd.apache.org/docs/current/mod/mod_ssl.html#ssloptions" md-src-pos="87376..87454">SSLOptions</a> | |
| directive, which configures various SSL engine run-time options. This is the global setting for the given vhost and can be a string or an array. Defaults to 'undef'.</p> | |
| <p md-src-pos="87622..87631">A string:</p> | |
| <pre><code class="language-puppet" md-src-pos="87633..87742"> apache::vhost { 'sample.example.net': | |
| … | |
| ssl_options => '+ExportCertData', | |
| } | |
| </code></pre> | |
| <p md-src-pos="87744..87753">An array:</p> | |
| <pre><code class="language-puppet" md-src-pos="87755..87886"> apache::vhost { 'sample.example.net': | |
| … | |
| ssl_options => [ '+StrictRequire', '+ExportCertData' ], | |
| } | |
| </code></pre> | |
| <h5 md-src-pos="87888..87910"> | |
| <code md-src-pos="87893..87910">ssl_proxyengine</code> | |
| </h5> | |
| <p md-src-pos="87912..88089"> | |
| Specifies whether or not to use <a href="http://httpd.apache.org/docs/current/mod/mod_ssl.html#sslproxyengine" md-src-pos="87944..88030">SSLProxyEngine</a> | |
| . Valid values are 'true' and 'false'. Defaults to 'false'.</p> | |
| <h4 md-src-pos="88091..88123">Defined Type: FastCGI Server</h4> | |
| <p md-src-pos="88125..88264">This type is intended for use with mod_fastcgi. It allows you to define one or more external FastCGI servers to handle specific file types.</p> | |
| <p md-src-pos="88266..88269">Ex:</p> | |
| <pre><code class="language-puppet" md-src-pos="88271..88504">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' | |
| } | |
| </code></pre> | |
| <p md-src-pos="88506..88631">Within your virtual host, you can then configure the specified file type to be handled by the fastcgi server specified above.</p> | |
| <pre><code class="language-puppet" md-src-pos="88633..88743">apache::vhost { 'www': | |
| ... | |
| custom_fragment => 'AddType application/x-httpd-php .php' | |
| ... | |
| } | |
| </code></pre> | |
| <h5 md-src-pos="88745..88756"> | |
| <code md-src-pos="88750..88756">host</code> | |
| </h5> | |
| <p md-src-pos="88758..88837">The hostname or IP address and TCP port number (1-65535) of the FastCGI server.</p> | |
| <h5 md-src-pos="88839..88853"> | |
| <code md-src-pos="88844..88853">timeout</code> | |
| </h5> | |
| <p md-src-pos="88855..89381">The number of seconds of FastCGI application inactivity allowed before the request is aborted and the event is logged (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.</p> | |
| <h5 md-src-pos="89383..89395"> | |
| <code md-src-pos="89388..89395">flush</code> | |
| </h5> | |
| <p md-src-pos="89397..89560">Force a 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.</p> | |
| <h5 md-src-pos="89562..89578"> | |
| <code md-src-pos="89567..89578">faux_path</code> | |
| </h5> | |
| <p md-src-pos="89580..89732"> | |
| <code md-src-pos="89580..89591">faux_path</code> | |
| does not have to exist in the local filesystem. URIs that Apache resolves to this filename are handled by this external FastCGI application.</p> | |
| <h5 md-src-pos="89734..89746"> | |
| <code md-src-pos="89739..89746">alias</code> | |
| </h5> | |
| <p md-src-pos="89748..89831">A unique alias. This is used internally to link the action with the FastCGI server.</p> | |
| <h5 md-src-pos="89833..89849"> | |
| <code md-src-pos="89838..89849">file_type</code> | |
| </h5> | |
| <p md-src-pos="89851..89915">The MIME-type of the file to be processed by the FastCGI server.</p> | |
| <h3 md-src-pos="89917..89941">Virtual Host Examples</h3> | |
| <p md-src-pos="89943..90217"> | |
| The apache module allows you to set up pretty much any configuration of virtual host you might need. This section addresses some common configurations, but look at the <a href="https://github.com/puppetlabs/puppetlabs-apache/tree/master/tests" md-src-pos="90111..90193">Tests section</a> | |
| for even more examples.</p> | |
| <p md-src-pos="90219..90264">Configure a vhost with a server administrator</p> | |
| <pre><code class="language-puppet" md-src-pos="90266..90434"> apache::vhost { 'third.example.com': | |
| port => '80', | |
| docroot => '/var/www/third', | |
| serveradmin => 'admin@example.com', | |
| } | |
| </code></pre> | |
| <hr /> | |
| <p md-src-pos="90443..90478">Set up a vhost with aliased servers</p> | |
| <pre><code class="language-puppet" md-src-pos="90480..90702"> apache::vhost { 'sixth.example.com': | |
| serveraliases => [ | |
| 'sixth.example.org', | |
| 'sixth.example.net', | |
| ], | |
| port => '80', | |
| docroot => '/var/www/fifth', | |
| } | |
| </code></pre> | |
| <hr /> | |
| <p md-src-pos="90711..90743">Configure a vhost with a cgi-bin</p> | |
| <pre><code class="language-puppet" md-src-pos="90745..90918"> apache::vhost { 'eleventh.example.com': | |
| port => '80', | |
| docroot => '/var/www/eleventh', | |
| scriptalias => '/usr/lib/cgi-bin', | |
| } | |
| </code></pre> | |
| <hr /> | |
| <p md-src-pos="90927..90967">Set up a vhost with a rack configuration</p> | |
| <pre><code class="language-puppet" md-src-pos="90969..91161"> apache::vhost { 'fifteenth.example.com': | |
| port => '80', | |
| docroot => '/var/www/fifteenth', | |
| rack_base_uris => ['/rackapp1', '/rackapp2'], | |
| } | |
| </code></pre> | |
| <hr /> | |
| <p md-src-pos="91170..91227">Set up a mix of SSL and non-SSL vhosts at the same domain</p> | |
| <pre><code class="language-puppet" md-src-pos="91229..91647"> #The non-ssl vhost | |
| apache::vhost { 'first.example.com non-ssl': | |
| servername => 'first.example.com', | |
| port => '80', | |
| docroot => '/var/www/first', | |
| } | |
| #The SSL vhost at the same domain | |
| apache::vhost { 'first.example.com ssl': | |
| servername => 'first.example.com', | |
| port => '443', | |
| docroot => '/var/www/first', | |
| ssl => true, | |
| } | |
| </code></pre> | |
| <hr /> | |
| <p md-src-pos="91656..91712">Configure a vhost to redirect non-SSL connections to SSL</p> | |
| <pre><code class="language-puppet" md-src-pos="91714..92205"> apache::vhost { 'sixteenth.example.com non-ssl': | |
| servername => 'sixteenth.example.com', | |
| port => '80', | |
| docroot => '/var/www/sixteenth', | |
| redirect_status => 'permanent', | |
| redirect_dest => 'https://sixteenth.example.com/' | |
| } | |
| apache::vhost { 'sixteenth.example.com ssl': | |
| servername => 'sixteenth.example.com', | |
| port => '443', | |
| docroot => '/var/www/sixteenth', | |
| ssl => true, | |
| } | |
| </code></pre> | |
| <hr /> | |
| <p md-src-pos="92214..92453">Set up IP-based vhosts on any listen port and have them respond to requests on specific IP addresses. In this example, we set listening on ports 80 and 81. This is required because the example vhosts are not declared with a port parameter.</p> | |
| <pre><code class="language-puppet" md-src-pos="92455..92526"> apache::listen { '80': } | |
| apache::listen { '81': } | |
| </code></pre> | |
| <p md-src-pos="92528..92562">Then we set up the IP-based vhosts</p> | |
| <pre><code class="language-puppet" md-src-pos="92564..92855"> 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, | |
| } | |
| </code></pre> | |
| <hr /> | |
| <p md-src-pos="92864..92986">Configure a mix of name-based and IP-based vhosts. First, we add two IP-based vhosts on 10.0.0.10, one SSL and one non-SSL</p> | |
| <pre><code class="language-puppet" md-src-pos="92988..93482"> apache::vhost { 'The first IP-based vhost, 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, | |
| } | |
| </code></pre> | |
| <p md-src-pos="93484..93541">Then, we add two name-based vhosts listening on 10.0.0.20</p> | |
| <pre><code class="language-puppet" md-src-pos="93543..93828"> 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', | |
| } | |
| </code></pre> | |
| <p md-src-pos="93830..94069"> | |
| If you want to add two name-based vhosts so that they answer on either 10.0.0.10 or 10.0.0.20, you <strong md-src-pos="93929..93937">MUST</strong> | |
| declare <code md-src-pos="93946..93969">add_listen => 'false'</code> | |
| to disable the otherwise automatic 'Listen 80', as it conflicts with the preceding IP-based vhosts.</p> | |
| <pre><code class="language-puppet" md-src-pos="94071..94362"> 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, | |
| } | |
| </code></pre> | |
| <h3 md-src-pos="94364..94381">Load Balancing</h3> | |
| <h4 md-src-pos="94383..94419"> | |
| Defined Type: <code md-src-pos="94401..94419">apache::balancer</code> | |
| </h4> | |
| <p md-src-pos="94421..94621"> | |
| <code md-src-pos="94421..94439">apache::balancer</code> | |
| creates an Apache balancer cluster. Each balancer cluster needs one or more balancer members, which are declared with <a href="#defined-type-apachebalancermember" md-src-pos="94558..94620"> | |
| <code md-src-pos="94559..94583">apache::balancermember</code> | |
| </a> | |
| .</p> | |
| <p md-src-pos="94623..94886"> | |
| One <code md-src-pos="94627..94645">apache::balancer</code> | |
| defined resource should be defined for each Apache load balanced set of servers. The <code md-src-pos="94731..94755">apache::balancermember</code> | |
| resources for all balancer members can be exported and collected on a single Apache load balancer server using exported resources.</p> | |
| <p md-src-pos="94888..94929"> | |
| <strong md-src-pos="94888..94929"> | |
| Parameters within <code md-src-pos="94908..94926">apache::balancer</code> | |
| :</strong> | |
| </p> | |
| <h5 md-src-pos="94931..94942"> | |
| <code md-src-pos="94936..94942">name</code> | |
| </h5> | |
| <p md-src-pos="94944..95033">Sets the balancer cluster's title. This parameter also sets the title of the conf.d file.</p> | |
| <h5 md-src-pos="95035..95051"> | |
| <code md-src-pos="95040..95051">proxy_set</code> | |
| </h5> | |
| <p md-src-pos="95053..95204"> | |
| Configures key-value pairs as <a href="http://httpd.apache.org/docs/current/mod/mod_proxy.html#proxyset" md-src-pos="95083..95159">ProxySet</a> | |
| lines. Accepts a hash, and defaults to '{}'.</p> | |
| <h5 md-src-pos="95206..95229"> | |
| <code md-src-pos="95211..95229">collect_exported</code> | |
| </h5> | |
| <p md-src-pos="95231..95336">Determines whether or not to use exported resources. Valid values 'true' and 'false', defaults to 'true'.</p> | |
| <p md-src-pos="95338..95548"> | |
| If you statically declare all of your backend servers, you should set this to 'false' to rely on existing declared balancer member resources. Also make sure to use <code md-src-pos="95502..95526">apache::balancermember</code> | |
| with array arguments.</p> | |
| <p md-src-pos="95550..95864"> | |
| If you wish to dynamically declare your backend servers via <a href="http://docs.puppetlabs.com/guides/exported_resources.html" md-src-pos="95610..95689">exported resources</a> | |
| collected on a central node, you must set this parameter to 'true' in order to collect the exported balancer member resources that were exported by the balancer member nodes.</p> | |
| <p md-src-pos="95866..96078">If you choose not to use exported resources, all balancer members will be configured in a single Puppet run. If you are using exported resources, Puppet has to run on the balanced nodes, then run on the balancer.</p> | |
| <h4 md-src-pos="96080..96122"> | |
| Defined Type: <code md-src-pos="96098..96122">apache::balancermember</code> | |
| </h4> | |
| <p md-src-pos="96124..96356"> | |
| Defines members of <a href="http://httpd.apache.org/docs/current/mod/mod_proxy_balancer.html" md-src-pos="96143..96229">mod_proxy_balancer</a> | |
| , which sets up a balancer member inside a listening service configuration block in etc/apache/apache.cfg on the load balancer.</p> | |
| <p md-src-pos="96358..96405"> | |
| <strong md-src-pos="96358..96405"> | |
| Parameters within <code md-src-pos="96378..96402">apache::balancermember</code> | |
| :</strong> | |
| </p> | |
| <h5 md-src-pos="96407..96418"> | |
| <code md-src-pos="96412..96418">name</code> | |
| </h5> | |
| <p md-src-pos="96420..96504">Sets the title of the resource. This name also sets the name of the concat fragment.</p> | |
| <h5 md-src-pos="96506..96529"> | |
| <code md-src-pos="96511..96529">balancer_cluster</code> | |
| </h5> | |
| <p md-src-pos="96531..96649"> | |
| Sets the Apache service's instance name. This must match the name of a declared <code md-src-pos="96611..96629">apache::balancer</code> | |
| resource. Required.</p> | |
| <h5 md-src-pos="96651..96661"> | |
| <code md-src-pos="96656..96661">url</code> | |
| </h5> | |
| <p md-src-pos="96663..96757">Specifies the URL used to contact the balancer member server. Defaults to 'http://${::fqdn}/'.</p> | |
| <h5 md-src-pos="96759..96773"> | |
| <code md-src-pos="96764..96773">options</code> | |
| </h5> | |
| <p md-src-pos="96775..97012"> | |
| An array of <a href="http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#balancermember" md-src-pos="96787..96864">options</a> | |
| to be specified after the URL. Accepts any key-value pairs available to <a href="http://httpd.apache.org/docs/2.2/mod/mod_proxy.html#proxypass" md-src-pos="96937..97011">ProxyPass</a> | |
| .</p> | |
| <h4 md-src-pos="97014..97026">Examples</h4> | |
| <p md-src-pos="97028..97121"> | |
| To load balance with exported resources, export the <code md-src-pos="97080..97096">balancermember</code> | |
| from the balancer member</p> | |
| <pre><code class="language-puppet" md-src-pos="97123..97371"> @@apache::balancermember { "${::fqdn}-puppet00": | |
| balancer_cluster => 'puppet00', | |
| url => "ajp://${::fqdn}:8009" | |
| options => ['ping=5', 'disablereuse=on', 'retry=5', 'ttl=120'], | |
| } | |
| </code></pre> | |
| <p md-src-pos="97373..97427">Then, on the proxy server, create the balancer cluster</p> | |
| <pre><code class="language-puppet" md-src-pos="97429..97481"> apache::balancer { 'puppet00': } | |
| </code></pre> | |
| <p md-src-pos="97483..97561">To load balance without exported resources, declare the following on the proxy</p> | |
| <pre><code class="language-puppet" md-src-pos="97563..97844"> apache::balancer { 'puppet00': } | |
| apache::balancermember { "${::fqdn}-puppet00": | |
| balancer_cluster => 'puppet00', | |
| url => "ajp://${::fqdn}:8009" | |
| options => ['ping=5', 'disablereuse=on', 'retry=5', 'ttl=120'], | |
| } | |
| </code></pre> | |
| <p md-src-pos="97846..97927"> | |
| Then declare <code md-src-pos="97859..97877">apache::balancer</code> | |
| and <code md-src-pos="97882..97906">apache::balancermember</code> | |
| on the proxy server.</p> | |
| <p md-src-pos="97929..97979">If you need to use ProxySet in the balancer config</p> | |
| <pre><code class="language-puppet" md-src-pos="97981..98095"> apache::balancer { 'puppet01': | |
| proxy_set => {'stickysession' => 'JSESSIONID'}, | |
| } | |
| </code></pre> | |
| <h2 md-src-pos="98097..98108">Reference</h2> | |
| <h3 md-src-pos="98110..98120">Classes</h3> | |
| <h4 md-src-pos="98122..98140">Public Classes</h4> | |
| <ul md-src-pos="98142..98441"><li md-src-pos="98142..98204"> | |
| <a href="#class-apache" md-src-pos="98144..98169"> | |
| <code md-src-pos="98145..98153">apache</code> | |
| </a> | |
| : Guides the basic setup of Apache.</li><li md-src-pos="98205..98351"> | |
| <code md-src-pos="98207..98220">apache::dev</code> | |
| : Installs Apache development libraries. (<em md-src-pos="98262..98269">Note:</em> | |
| On FreeBSD, you must declare <code md-src-pos="98299..98316">apache::package</code> | |
| or <code md-src-pos="98320..98328">apache</code> | |
| before <code md-src-pos="98336..98349">apache::dev</code> | |
| .)</li><li md-src-pos="98352..98441"> | |
| <a href="#classes-apachemodname" md-src-pos="98354..98401"> | |
| <code md-src-pos="98355..98376">apache::mod::[name]</code> | |
| </a> | |
| : Enables specific Apache HTTPD modules.</li></ul> | |
| <h4 md-src-pos="98443..98462">Private Classes</h4> | |
| <ul md-src-pos="98464..98908"><li md-src-pos="98464..98580"> | |
| <code md-src-pos="98466..98490">apache::confd::no_accf</code> | |
| : Creates the no-accf.conf configuration file in conf.d, required by FreeBSD's Apache 2.4.</li><li md-src-pos="98581..98648"> | |
| <code md-src-pos="98583..98612">apache::default_confd_files</code> | |
| : Includes conf.d files for FreeBSD.</li><li md-src-pos="98649..98745"> | |
| <code md-src-pos="98651..98673">apache::default_mods</code> | |
| : Installs the Apache modules required to run the default configuration.</li><li md-src-pos="98746..98813"> | |
| <code md-src-pos="98748..98765">apache::package</code> | |
| : Installs and configures basic Apache packages.</li><li md-src-pos="98814..98860"> | |
| <code md-src-pos="98816..98832">apache::params</code> | |
| : Manages Apache parameters.</li><li md-src-pos="98861..98908"> | |
| <code md-src-pos="98863..98880">apache::service</code> | |
| : Manages the Apache daemon.</li></ul> | |
| <h3 md-src-pos="98910..98926">Defined Types</h3> | |
| <h4 md-src-pos="98928..98952">Public Defined Types</h4> | |
| <ul md-src-pos="98954..100006"><li md-src-pos="98954..99011"> | |
| <code md-src-pos="98956..98974">apache::balancer</code> | |
| : Creates an Apache balancer cluster.</li><li md-src-pos="99012..99146"> | |
| <code md-src-pos="99014..99038">apache::balancermember</code> | |
| : Defines members of <a href="http://httpd.apache.org/docs/current/mod/mod_proxy_balancer.html" md-src-pos="99059..99145">mod_proxy_balancer</a> | |
| .</li><li md-src-pos="99147..99438"> | |
| <code md-src-pos="99149..99165">apache::listen</code> | |
| : Based on the title, controls which ports Apache binds to for listening. Adds <a href="http://httpd.apache.org/docs/current/bind.html" md-src-pos="99244..99300">Listen</a> | |
| directives to ports.conf in the Apache HTTPD configuration directory. Titles take the form ' | |
| ', ' | |
| : | |
| ', or ' | |
| :'.</li><li md-src-pos="99439..99561"> | |
| <code md-src-pos="99441..99454">apache::mod</code> | |
| : Used to enable arbitrary Apache HTTPD modules for which there is no specific <code md-src-pos="99533..99554">apache::mod::[name]</code> | |
| class.</li><li md-src-pos="99562..99890"> | |
| <code md-src-pos="99564..99589">apache::namevirtualhost</code> | |
| : Enables name-based hosting of a virtual host. Adds all <a href="http://httpd.apache.org/docs/current/vhosts/name-based.html" md-src-pos="99646..99724">NameVirtualHost</a> | |
| directives to the <code md-src-pos="99743..99755">ports.conf</code> | |
| file in the Apache HTTPD configuration directory. Titles take the form '*', '*: | |
| ', '_default_: | |
| , ' | |
| ', or ' | |
| :'.</li><li md-src-pos="99891..100006"> | |
| <code md-src-pos="99893..99908">apache::vhost</code> | |
| : Allows specialized configurations for virtual hosts that have requirements outside the defaults.</li></ul> | |
| <h4 md-src-pos="100008..100033">Private Defined Types</h4> | |
| <ul md-src-pos="100035..100471"><li md-src-pos="100035..100192"> | |
| <code md-src-pos="100037..100067">apache::peruser::multiplexer</code> | |
| : Enables the <a href="http://www.freebsd.org/cgi/url.cgi?ports/www/apache22-peruser-mpm/pkg-descr" md-src-pos="100081..100167">Peruser</a> | |
| module for FreeBSD only.</li><li md-src-pos="100193..100348"> | |
| <code md-src-pos="100195..100223">apache::peruser::processor</code> | |
| : Enables the <a href="http://www.freebsd.org/cgi/url.cgi?ports/www/apache22-peruser-mpm/pkg-descr" md-src-pos="100237..100323">Peruser</a> | |
| module for FreeBSD only.</li><li md-src-pos="100349..100471"> | |
| <code md-src-pos="100351..100380">apache::security::file_link</code> | |
| : Links the activated_rules from apache::mod::security to the respective CRS rules on disk.</li></ul> | |
| <h3 md-src-pos="100473..100485">Templates</h3> | |
| <p md-src-pos="100487..100743"> | |
| The Apache module relies heavily on templates to enable the <code md-src-pos="100547..100554">vhost</code> | |
| and <code md-src-pos="100559..100572">apache::mod</code> | |
| defined types. These templates are built based on Facter facts around your operating system. Unless explicitly called out, most templates are not meant for configuration.</p> | |
| <h2 md-src-pos="100745..100758">Limitations</h2> | |
| <h3 md-src-pos="100760..100775">Ubuntu 10.04</h3> | |
| <p md-src-pos="100777..100987"> | |
| The <code md-src-pos="100781..100814">apache::vhost::WSGIImportScript</code> | |
| parameter creates a statement inside the VirtualHost which is unsupported on older versions of Apache, causing this to fail. This will be remedied in a future refactoring.</p> | |
| <h3 md-src-pos="100989..101005">RHEL/CentOS 5</h3> | |
| <p md-src-pos="101007..101138"> | |
| The <code md-src-pos="101011..101035">apache::mod::passenger</code> | |
| and <code md-src-pos="101040..101065">apache::mod::proxy_html</code> | |
| classes are untested since repositories are missing compatible packages.</p> | |
| <h3 md-src-pos="101140..101156">RHEL/CentOS 7</h3> | |
| <p md-src-pos="101158..101388"> | |
| The <code md-src-pos="101162..101186">apache::mod::passenger</code> | |
| class is untested as the repository does not have packages for EL7 yet. The fact that passenger packages aren't available also makes us unable to test the <code md-src-pos="101343..101358">rack_base_uri</code> | |
| parameter in <code md-src-pos="101372..101387">apache::vhost</code> | |
| .</p> | |
| <h3 md-src-pos="101390..101400">General</h3> | |
| <p md-src-pos="101402..101558">This module is CI tested on Centos 5 & 6, Ubuntu 12.04 & 14.04, Debian 7, and RHEL 5, 6 & 7 platforms against both the OSS and Enterprise version of Puppet.</p> | |
| <p md-src-pos="101560..101739">The module contains support for other distributions and operating systems, such as FreeBSD, Gentoo and Amazon Linux, but is not formally tested on those and regressions can occur.</p> | |
| <h3 md-src-pos="101741..101768">SELinux and Custom Paths</h3> | |
| <p md-src-pos="101770..101962"> | |
| If you are running with SELinux in enforcing mode and want to use custom paths for your <code md-src-pos="101858..101867">logroot</code> | |
| , <code md-src-pos="101869..101878">mod_dir</code> | |
| , <code md-src-pos="101880..101891">vhost_dir</code> | |
| , and <code md-src-pos="101897..101906">docroot</code> | |
| , you need to manage the context for the files yourself.</p> | |
| <p md-src-pos="101964..101993">Something along the lines of:</p> | |
| <pre><code class="language-puppet" md-src-pos="101995..102941"> 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', | |
| } | |
| </code></pre> | |
| <p md-src-pos="102943..103134"> | |
| You need to set the contexts using <code md-src-pos="102978..102997">semanage fcontext</code> | |
| not <code md-src-pos="103002..103009">chcon</code> | |
| because <code md-src-pos="103018..103030">file {...}</code> | |
| resources reset the context to the values in the database if the resource isn't specifying the context.</p> | |
| <h3 md-src-pos="103136..103146">FreeBSD</h3> | |
| <p md-src-pos="103148..103243"> | |
| In order to use this module on FreeBSD, you <em md-src-pos="103192..103198">must</em> | |
| use apache24-2.4.12 (www/apache24) or newer.</p> | |
| <h2 md-src-pos="103245..103258">Development</h2> | |
| <h3 md-src-pos="103260..103275">Contributing</h3> | |
| <p md-src-pos="103277..103544">Puppet Labs modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. We can’t access the huge number of platforms and myriad of hardware, software, and deployment configurations that Puppet is intended to serve.</p> | |
| <p md-src-pos="103546..103773">We want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things.</p> | |
| <p md-src-pos="103775..103873"> | |
| Read the complete module <a href="https://docs.puppetlabs.com/forge/contributing.html" md-src-pos="103800..103873">contribution guide</a> | |
| </p> | |
| <h3 md-src-pos="103875..103891">Running tests</h3> | |
| <p md-src-pos="103893..104126"> | |
| This project contains tests for both <a href="http://rspec-puppet.com/" md-src-pos="103930..103970">rspec-puppet</a> | |
| and <a href="https://github.com/puppetlabs/beaker-rspec" md-src-pos="103975..104033">beaker-rspec</a> | |
| to verify functionality. For in-depth information please see their respective documentation.</p> | |
| <p md-src-pos="104128..104139">Quickstart:</p> | |
| <h4 md-src-pos="104141..104157">Ruby > 1.8.7</h4> | |
| <pre><code md-src-pos="104159..104324"> gem install bundler | |
| bundle install | |
| bundle exec rake spec | |
| bundle exec rspec spec/acceptance | |
| RS_DEBUG=yes bundle exec rspec spec/acceptance | |
| </code></pre> | |
| <h4 md-src-pos="104326..104342">Ruby = 1.8.7</h4> | |
| <pre><code md-src-pos="104344..104443"> gem install bundler | |
| bundle install --without system_tests | |
| bundle exec rake spec | |
| </code></pre> | |
| </body> |