puppet_forge 3.0.0 → 3.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -131,10 +131,10 @@
131
131
  "file_size": 13280,
132
132
  "file_md5": "b00db93a5ee05c20207bbadcf85af2d6",
133
133
  "downloads": 308,
134
- "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;webmaster@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Notes</h2>\n\n<p>Since Puppet cannot ensure that all parent directories exist you need to\nmanage these yourself. In the more advanced example above, you need to ensure \nthat <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.</p>\n</section>",
134
+ "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;web@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Notes</h2>\n\n<p>Since Puppet cannot ensure that all parent directories exist you need to\nmanage these yourself. In the more advanced example above, you need to ensure \nthat <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.</p>\n</section>",
135
135
  "changelog": "<section class=\"plaintext\"><pre>2012-05-08 Puppet Labs &lt;info@puppetlabs.com&gt; - 0.0.4\ne62e362 Fix broken tests for ssl, vhost, vhost::*\n42c6363 Changes to match style guide and pass puppet-lint without error\n42bc8ba changed name =&gt; path for file resources in order to name namevar by it&#x27;s name\n72e13de One end too much\n0739641 style guide fixes: &#x27;true&#x27; &lt;&gt; true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod&#x2F;a2dismo commands optional\n98d774e (#13860) Autorequire Package[&#x27;httpd&#x27;]\n05fcec5 (#13073) Add missing puppet spec tests\n541afda (#6899) Remove virtual a2mod definition\n976cb69 (#13072) Move mod python and wsgi package names to params\n323915a (#13060) Add .gitignore to repo\nfdf40af (#13060) Remove pkg directory from source tree\nfd90015 Add LICENSE file and update the ModuleFile\nd3d0d23 Re-enable local php class\nd7516c7 Make management of firewalls configurable for vhosts\n60f83ba Explicitly lookup scope of apache_name in templates.\nf4d287f (#12581) Add explicit ordering for vdir directory\n88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall\na776a8b (#11071) Fix to work with latest firewall module\n2b79e8b (#11070) Add support for Scientific Linux\n405b3e9 Fix for a2mod\n57b9048 Commit apache::vhost::redirect Manifest\n8862d01 Commit apache::vhost::proxy Manifest\nd5c1fd0 Commit apache::mod::wsgi Manifest\na825ac7 Commit apache::mod::python Manifest\nb77062f Commit Templates\n9a51b4a Vhost File Declarations\n6cf7312 Defaults for Parameters\n6a5b11a Ensure installed\nf672e46 a2mod fix\n8a56ee9 add pthon support to apache\n</pre></section>",
136
136
  "license": "<section class=\"plaintext\"><pre>Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n</pre></section>",
137
137
  "created_at": "2012-08-08 00:23:44 -0700",
138
138
  "updated_at": "2012-08-08 00:23:44 -0700",
139
139
  "deleted_at": null
140
- }
140
+ }
@@ -181,7 +181,7 @@
181
181
  "file_size": 31302,
182
182
  "file_md5": "89fa11aef710c060e0bf9f9ff2cae455",
183
183
  "downloads": 25919,
184
- "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::mod::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;webmaster@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Dependencies</h2>\n\n<p>Some functionality is dependent on other modules:</p>\n\n<ul>\n<li><a href=\"https://github.com/puppetlabs/puppetlabs-stdlib\">stdlib</a></li>\n<li><a href=\"https://github.com/puppetlabs/puppetlabs-firewall\">firewall</a></li>\n</ul>\n\n<h2>Notes</h2>\n\n<p>Since Puppet cannot ensure that all parent directories exist you need to\nmanage these yourself. In the more advanced example above, you need to ensure \nthat <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.</p>\n</section>",
184
+ "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::mod::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;web@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Dependencies</h2>\n\n<p>Some functionality is dependent on other modules:</p>\n\n<ul>\n<li><a href=\"https://github.com/puppetlabs/puppetlabs-stdlib\">stdlib</a></li>\n<li><a href=\"https://github.com/puppetlabs/puppetlabs-firewall\">firewall</a></li>\n</ul>\n\n<h2>Notes</h2>\n\n<p>Since Puppet cannot ensure that all parent directories exist you need to\nmanage these yourself. In the more advanced example above, you need to ensure \nthat <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.</p>\n</section>",
185
185
  "changelog": "<section class=\"plaintext\"><pre>2013-03-2 Release 0.6.0\n- update travis tests (add more supported versions)\n- add access log_parameter\n- make purging of vhost dir configurable\n\n2012-08-24 Release 0.4.0\nChanges:\n- `include apache` is now required when using apache::mod::*\n\nBugfixes:\n- Fix syntax for validate_re\n- Fix formatting in vhost template\n- Fix spec tests such that they pass\n\n2012-05-08 Puppet Labs &lt;info@puppetlabs.com&gt; - 0.0.4\ne62e362 Fix broken tests for ssl, vhost, vhost::*\n42c6363 Changes to match style guide and pass puppet-lint without error\n42bc8ba changed name =&gt; path for file resources in order to name namevar by it&#x27;s name\n72e13de One end too much\n0739641 style guide fixes: &#x27;true&#x27; &lt;&gt; true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod&#x2F;a2dismo commands optional\n98d774e (#13860) Autorequire Package[&#x27;httpd&#x27;]\n05fcec5 (#13073) Add missing puppet spec tests\n541afda (#6899) Remove virtual a2mod definition\n976cb69 (#13072) Move mod python and wsgi package names to params\n323915a (#13060) Add .gitignore to repo\nfdf40af (#13060) Remove pkg directory from source tree\nfd90015 Add LICENSE file and update the ModuleFile\nd3d0d23 Re-enable local php class\nd7516c7 Make management of firewalls configurable for vhosts\n60f83ba Explicitly lookup scope of apache_name in templates.\nf4d287f (#12581) Add explicit ordering for vdir directory\n88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall\na776a8b (#11071) Fix to work with latest firewall module\n2b79e8b (#11070) Add support for Scientific Linux\n405b3e9 Fix for a2mod\n57b9048 Commit apache::vhost::redirect Manifest\n8862d01 Commit apache::vhost::proxy Manifest\nd5c1fd0 Commit apache::mod::wsgi Manifest\na825ac7 Commit apache::mod::python Manifest\nb77062f Commit Templates\n9a51b4a Vhost File Declarations\n6cf7312 Defaults for Parameters\n6a5b11a Ensure installed\nf672e46 a2mod fix\n8a56ee9 add pthon support to apache\n</pre></section>",
186
186
  "license": "<section class=\"plaintext\"><pre>Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n</pre></section>",
187
187
  "created_at": "2013-03-28 15:44:52 -0700",
@@ -454,7 +454,7 @@
454
454
  "file_size": 62433,
455
455
  "file_md5": "97ab32e19f65dbe6d7f42b3e5c3ada8e",
456
456
  "downloads": 18449,
457
- "readme": "<section class=\"markdown\"><h1>apache</h1>\n\n<p><a href=\"https://travis-ci.org/puppetlabs/puppetlabs-apache\"><img src=\"https://travis-ci.org/puppetlabs/puppetlabs-apache.png?branch=master\" alt=\"Build Status\"></a></p>\n\n<h4>Table of Contents</h4>\n\n<ol>\n<li><a href=\"#overview\">Overview - What is the Apache module?</a></li>\n<li><a href=\"#module-description\">Module Description - What does the module do?</a></li>\n<li><a href=\"#setup\">Setup - The basics of getting started with Apache</a>\n\n<ul>\n<li><a href=\"#beginning-with-apache\">Beginning with Apache - Installation</a></li>\n<li><a href=\"#configure-a-virtual-host\">Configure a Virtual Host - Basic options for getting started</a></li>\n</ul></li>\n<li><a href=\"#usage\">Usage - The classes, defined types, and their parameters available for configuration</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a>\n\n<ul>\n<li><a href=\"#class-apache\">Class: apache</a></li>\n<li><a href=\"#classes-apachemodname\">Classes: apache::mod::*</a></li>\n<li><a href=\"#defined-type-apachevhost\">Defined Type: apache::vhost</a></li>\n</ul></li>\n<li><a href=\"#virtual-host-examples\">Virtual Host Examples - Demonstrations of some configuration options</a></li>\n</ul></li>\n<li><a href=\"#implementation\">Implementation - An under-the-hood peek at what the module is doing</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a></li>\n<li><a href=\"#templates\">Templates</a></li>\n</ul></li>\n<li><a href=\"#limitations\">Limitations - OS compatibility, etc.</a></li>\n<li><a href=\"#development\">Development - Guide for contributing to the module</a></li>\n<li><a href=\"#release-notes\">Release Notes - Notes on the most recent updates to the module</a></li>\n</ol>\n\n<h2>Overview</h2>\n\n<p>The Apache module allows you to set up virtual hosts and manage web services with minimal effort.</p>\n\n<h2>Module Description</h2>\n\n<p>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>\n\n<h2>Setup</h2>\n\n<p><strong>What Apache affects:</strong></p>\n\n<ul>\n<li>configuration files and directories (created and written to)\n\n<ul>\n<li><strong>NOTE</strong>: Configurations that are <em>not</em> managed by Puppet will be purged.</li>\n</ul></li>\n<li>package/service/configuration files for Apache</li>\n<li>Apache modules</li>\n<li>virtual hosts</li>\n<li>listened-to ports</li>\n</ul>\n\n<h3>Beginning with Apache</h3>\n\n<p>To install Apache with the default parameters</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;: }\n</code></pre>\n\n<p>The defaults are determined by your operating system (e.g. Debian systems have one set of defaults, RedHat systems have another). These defaults will work well in a testing environment, but are not suggested for production. To establish customized parameters</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;:\n default_mods =&gt; false,\n }\n</code></pre>\n\n<h3>Configure a virtual host</h3>\n\n<p>Declaring the <code>apache</code> class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving <code>$apache::docroot</code>.</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;: }\n</code></pre>\n\n<p>To configure a very basic, name-based virtual host</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;first.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n }\n</code></pre>\n\n<p><em>Note:</em> The default priority is 15. If nothing matches this priority, the alphabetically first name-based vhost will be used. This is also true if you pass a higher priority and no names match anything else.</p>\n\n<p>A slightly more complicated example, which moves the docroot owner/group</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;second.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n docroot_owner =&gt; &#39;third&#39;,\n docroot_group =&gt; &#39;third&#39;,\n }\n</code></pre>\n\n<p>To set up a virtual host with SSL and default SSL certificates</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;ssl.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/ssl&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<p>To set up a virtual host with SSL and specific SSL certificates</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n ssl =&gt; true,\n ssl_cert =&gt; &#39;/etc/ssl/fourth.example.com.cert&#39;,\n ssl_key =&gt; &#39;/etc/ssl/fourth.example.com.key&#39;,\n }\n</code></pre>\n\n<p>To set up a virtual host with wildcard alias for subdomain mapped to same named directory\n<code>http://examle.com.loc =&gt; /var/www/example.com</code></p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;subdomain.loc&#39;:\n vhost_name =&gt; &#39;*&#39;,\n port =&gt; &#39;80&#39;,\n virtual_docroot&#39; =&gt; &#39;/var/www/%-2+&#39;,\n docroot =&gt; &#39;/var/www&#39;,\n serveraliases =&gt; [&#39;*.loc&#39;,],\n }\n</code></pre>\n\n<p>To set up a virtual host with suPHP</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;suphp.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/appuser/myphpapp&#39;,\n suphp_addhandler =&gt; &#39;x-httpd-php&#39;,\n suphp_engine =&gt; &#39;on&#39;,\n suphp_configpath =&gt; &#39;/etc/php5/apache2&#39;,\n }\n</code></pre>\n\n<p>To set up a virtual host with WSGI</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;wsgi.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/pythonapp&#39;,\n wsgi_daemon_process =&gt; &#39;wsgi&#39;,\n wsgi_daemon_process_options =&gt;\n { processes =&gt; &#39;2&#39;, threads =&gt; &#39;15&#39;, display-name =&gt; &#39;%{GROUP}&#39; },\n wsgi_process_group =&gt; &#39;wsgi&#39;,\n wsgi_script_aliases =&gt; { &#39;/&#39; =&gt; &#39;/var/www/demo.wsgi&#39; },\n }\n</code></pre>\n\n<p>To see a list of all virtual host parameters, <a href=\"#defined-type-apachevhost\">please go here</a>. To see an extensive list of virtual host examples <a href=\"#virtual-host-examples\">please look here</a>.</p>\n\n<h2>Usage</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<p>This module modifies Apache configuration files and directories and will purge any configuration not managed by Puppet. Configuration of Apache should be managed by Puppet, as non-puppet configuration files can cause unexpected failures.</p>\n\n<p>It is possible to temporarily disable full Puppet management by setting the <code>purge_configs</code> parameter within the base <code>apache</code> class to &#39;false&#39;. This option should only be used as a temporary means of saving and relocating customized configurations.</p>\n\n<h4>Class: <code>apache</code></h4>\n\n<p>The Apache module&#39;s primary class, <code>apache</code>, guides the basic setup of Apache on your system.</p>\n\n<p>You may establish a default vhost in this class, the <code>vhost</code> class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the <code>vhost</code> type.</p>\n\n<p><strong>Parameters within <code>apache</code>:</strong></p>\n\n<h5><code>default_mods</code></h5>\n\n<p>Sets up Apache with default settings based on your OS. Defaults to &#39;true&#39;, set to &#39;false&#39; for customized configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets up a default virtual host. Defaults to &#39;true&#39;, set to &#39;false&#39; to set up <a href=\"#configure-a-virtual-host\">customized virtual hosts</a>.</p>\n\n<h5><code>default_ssl_vhost</code></h5>\n\n<p>Sets up a default SSL virtual host. Defaults to &#39;false&#39;.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;default-ssl&#39;:\n port =&gt; 443,\n ssl =&gt; true,\n docroot =&gt; $docroot,\n scriptalias =&gt; $scriptalias,\n serveradmin =&gt; $serveradmin,\n access_log_file =&gt; &quot;ssl_${access_log_file}&quot;,\n }\n</code></pre>\n\n<p>SSL vhosts only respond to HTTPS queries.</p>\n\n<h5><code>default_ssl_cert</code></h5>\n\n<p>The default SSL certification, which is automatically set based on your operating system (<code>/etc/pki/tls/certs/localhost.crt</code> for RedHat, <code>/etc/ssl/certs/ssl-cert-snakeoil.pem</code> for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_key</code></h5>\n\n<p>The default SSL key, which is automatically set based on your operating system (<code>/etc/pki/tls/private/localhost.key</code> for RedHat, <code>/etc/ssl/private/ssl-cert-snakeoil.key</code> for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_chain</code></h5>\n\n<p>The default SSL chain, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_ca</code></h5>\n\n<p>The default certificate authority, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl_path</code></h5>\n\n<p>The default certificate revocation list path, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl</code></h5>\n\n<p>The default certificate revocation list to use, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>service_enable</code></h5>\n\n<p>Determines whether the &#39;httpd&#39; service is enabled when the machine is booted, meaning Puppet will check the service status to start/stop it. Defaults to &#39;true&#39;, meaning the service is enabled/running.</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Sets the server administrator. Defaults to &#39;root@localhost&#39;.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the servername. Defaults to fqdn provided by facter.</p>\n\n<h5><code>sendfile</code></h5>\n\n<p>Makes Apache use the Linux kernel &#39;sendfile&#39; to serve static files. Defaults to &#39;false&#39;.</p>\n\n<h5><code>error_documents</code></h5>\n\n<p>Enables custom error documents. Defaults to &#39;false&#39;.</p>\n\n<h5><code>httpd_dir</code></h5>\n\n<p>Changes the base location of the configuration directories used for the service. This is useful for specially repackaged HTTPD builds but may have unintended concequences when used in combination with the default distribution packages. Default is based on your OS.</p>\n\n<h5><code>confd_dir</code></h5>\n\n<p>Changes the location of the configuration directory your custom configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>vhost_dir</code></h5>\n\n<p>Changes the location of the configuration directory your virtual host configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mod_dir</code></h5>\n\n<p>Changes the location of the configuration directory your Apache modules configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mpm_module</code></h5>\n\n<p>Configures which mpm module is loaded and configured for the httpd process by the <code>apache::mod::prefork</code>, <code>apache::mod::worker</code> and <code>apache::mod::itk</code> classes. Must be set to <code>false</code> to explicitly declare <code>apache::mod::worker</code>, <code>apache::mod::worker</code> or <code>apache::mod::itk</code> classes with parameters. Valid values are <code>worker</code>, <code>prefork</code>, <code>itk</code> (Debian), or the boolean <code>false</code>. Defaults to <code>prefork</code> on RedHat and <code>worker</code> on Debian.</p>\n\n<h5><code>conf_template</code></h5>\n\n<p>Setting this allows you to override the template used for the main apache configuration file. This is a potentially risky thing to do as this module has been built around the concept of a minimal configuration file with most of the configuration coming in the form of conf.d/ entries. Defaults to &#39;apache/httpd.conf.erb&#39;.</p>\n\n<h5><code>keepalive</code></h5>\n\n<p>Setting this allows you to enable persistent connections.</p>\n\n<h5><code>keepalive_timeout</code></h5>\n\n<p>Amount of time the server will wait for subsequent requests on a persistent connection. Defaults to &#39;15&#39;.</p>\n\n<h5><code>logroot</code></h5>\n\n<p>Changes the location of the directory Apache log files are placed in. Defaut is based on your OS.</p>\n\n<h5><code>ports_file</code></h5>\n\n<p>Changes the name of the file containing Apache ports configuration. Default is <code>${conf_dir}/ports.conf</code>.</p>\n\n<h4>Class: <code>apache::default_mods</code></h4>\n\n<p>Installs default Apache modules based on what OS you are running</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::default_mods&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::mod</code></h4>\n\n<p>Used to enable arbitrary Apache httpd modules for which there is no specific <code>apache::mod::[name]</code> class. The <code>apache::mod</code> defined type will also install the required packages to enable the module, if any.</p>\n\n<pre lang=\"puppet\"><code> apache::mod { &#39;rewrite&#39;: }\n apache::mod { &#39;ldap&#39;: }\n</code></pre>\n\n<h4>Classes: <code>apache::mod::[name]</code></h4>\n\n<p>There are many <code>apache::mod::[name]</code> classes within this module that can be declared using <code>include</code>:</p>\n\n<ul>\n<li><code>alias</code></li>\n<li><code>auth_basic</code></li>\n<li><code>auth_kerb</code></li>\n<li><code>autoindex</code></li>\n<li><code>cache</code></li>\n<li><code>cgi</code></li>\n<li><code>cgid</code></li>\n<li><code>dav</code></li>\n<li><code>dav_fs</code></li>\n<li><code>deflate</code></li>\n<li><code>dir</code>*</li>\n<li><code>disk_cache</code></li>\n<li><code>fcgid</code></li>\n<li><code>info</code></li>\n<li><code>ldap</code></li>\n<li><code>mime</code></li>\n<li><code>mime_magic</code></li>\n<li><code>mpm_event</code></li>\n<li><code>negotiation</code></li>\n<li><code>passenger</code>*</li>\n<li><code>perl</code></li>\n<li><code>php</code> (requires <a href=\"#mpm_module\"><code>mpm_module</code></a> set to <code>prefork</code>)</li>\n<li><code>prefork</code>*</li>\n<li><code>proxy</code>*</li>\n<li><code>proxy_html</code></li>\n<li><code>proxy_http</code></li>\n<li><code>python</code></li>\n<li><code>reqtimeout</code></li>\n<li><code>setenvif</code></li>\n<li><code>ssl</code>* (see <a href=\"#class-apachemodssl\">apache::mod::ssl</a> below)</li>\n<li><code>status</code></li>\n<li><code>suphp</code></li>\n<li><code>userdir</code>*</li>\n<li><code>worker</code>*</li>\n<li><code>wsgi</code> (see <a href=\"#class-apachemodwsgi\">apache::mod::wsgi</a> below)</li>\n<li><code>xsendfile</code></li>\n</ul>\n\n<p>Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module&#39;s configuration. Most of the time, these parameters will not require any configuration or attention.</p>\n\n<p>The modules mentioned above, and other Apache modules that have templates, will cause template files to be dropped along with the mod install, and the module will not work without the template. Any mod without a template will install package but drop no files.</p>\n\n<h4>Class: <code>apache::mod::ssl</code></h4>\n\n<p>Installs Apache SSL capabilities and utilizes <code>ssl.conf.erb</code> template</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::mod::ssl&#39;: }\n</code></pre>\n\n<p>To <em>use</em> SSL with a virtual host, you must either set the<code>default_ssl_vhost</code> parameter in <code>apache</code> to &#39;true&#39; or set the <code>ssl</code> parameter in <code>apache::vhost</code> to &#39;true&#39;.</p>\n\n<h4>Class: <code>apache::mod::wsgi</code></h4>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::mod::wsgi&#39;:\n wsgi_socket_prefix =&gt; &quot;\\${APACHE_RUN_DIR}WSGI&quot;,\n wsgi_python_home =&gt; &#39;/path/to/virtenv&#39;,\n }\n</code></pre>\n\n<h4>Defined Type: <code>apache::vhost</code></h4>\n\n<p>The Apache module allows a lot of flexibility in the set up and configuration of virtual hosts. This flexibility is due, in part, to <code>vhost</code>&#39;s setup as a defined resource type, which allows it to be evaluated multiple times with different parameters.</p>\n\n<p>The <code>vhost</code> defined type allows you to have specialized configurations for virtual hosts that have requirements outside of the defaults. You can set up a default vhost within the base <code>apache</code> class as well as set a customized vhost setup as default. Your customized vhost (priority 10) will be privileged over the base class vhost (15).</p>\n\n<p>If you have a series of specific configurations and do not want a base <code>apache</code> class default vhost, make sure to set the base class default host to &#39;false&#39;.</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;:\n default_vhost =&gt; false,\n }\n</code></pre>\n\n<p><strong>Parameters within <code>apache::vhost</code>:</strong></p>\n\n<p>The default values for each parameter will vary based on operating system and type of virtual host.</p>\n\n<h5><code>access_log</code></h5>\n\n<p>Specifies whether <code>*_access.log</code> directives should be configured. Valid values are &#39;true&#39; and &#39;false&#39;. Defaults to &#39;true&#39;.</p>\n\n<h5><code>access_log_file</code></h5>\n\n<p>Points to the <code>*_access.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_pipe</code></h5>\n\n<p>Specifies a pipe to send access log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_syslog</code></h5>\n\n<p>Sends all access log messages to syslog. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_format</code></h5>\n\n<p>Specifies either a LogFormat nickname or custom format string for access log. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>add_listen</code></h5>\n\n<p>Determines whether the vhost creates a listen statement. The default value is &#39;true&#39;.</p>\n\n<p>Setting <code>add_listen</code> to &#39;false&#39; stops the vhost from creating a listen statement, and this is important when you combine vhosts that are not passed an <code>ip</code> parameter with vhosts that <em>are</em> passed the <code>ip</code> parameter.</p>\n\n<h5><code>aliases</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>Alias</code> statements as per the <a href=\"http://httpd.apache.org/docs/current/mod/mod_alias.html\"><code>mod_alias</code> documentation</a>. Each hash is expected to be of the form:</p>\n\n<pre lang=\"puppet\"><code>aliases =&gt; [ { alias =&gt; &#39;/alias&#39;, path =&gt; &#39;/path/to/directory&#39; } ],\n</code></pre>\n\n<p>For <code>Alias</code> to work, each will need a corresponding <code>&lt;Directory /path/to/directory&gt;</code> or <code>&lt;Location /path/to/directory&gt;</code> block.</p>\n\n<p><strong>Note:</strong> If <code>apache::mod::passenger</code> is loaded and <code>PassengerHighPerformance true</code> is set, then <code>Alias</code> may have issues honouring the <code>PassengerEnabled off</code> statement. See <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">this article</a> for details.</p>\n\n<h5><code>block</code></h5>\n\n<p>Specifies the list of things Apache will block access to. The default is an empty set, &#39;[]&#39;. Currently, the only option is &#39;scm&#39;, which blocks web access to .svn, .git and .bzr directories. To add to this, please see the <a href=\"#development\">Development</a> section.</p>\n\n<h5><code>custom_fragment</code></h5>\n\n<p>Pass a string of custom configuration directives to be placed at the end of the vhost configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets a given <code>apache::vhost</code> as the default to serve requests that do not match any other <code>apache::vhost</code> definitions. The default value is &#39;false&#39;.</p>\n\n<h5><code>directories</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>&lt;Directory /path/to/directory&gt;...&lt;/Directory&gt;</code> directive blocks as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#directory\">Apache core documentation</a>. The <code>path</code> key is required in these hashes. Usage will typically look like:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [\n { path =&gt; &#39;/path/to/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n { path =&gt; &#39;/path/to/another/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n ],\n }\n</code></pre>\n\n<p><em>Note:</em> At least one directory should match <code>docroot</code> parameter, once you start declaring directories <code>apache::vhost</code> assumes that all required <code>&lt;Directory&gt;</code> blocks will be declared.</p>\n\n<p><em>Note:</em> If not defined a single default <code>&lt;Directory&gt;</code> block will be created that matches the <code>docroot</code> parameter.</p>\n\n<p>The directives will be embedded within the <code>Directory</code> directive block, missing directives should be undefined and not be added, resulting in their default vaules in Apache. Currently this is the list of supported directives:</p>\n\n<h6><code>addhandlers</code></h6>\n\n<p>Sets <code>AddHandler</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addhandler\">Apache Core documentation</a>. Accepts a list of hashes of the form <code>{ handler =&gt; &#39;handler-name&#39;, extensions =&gt; [&#39;extension&#39;]}</code>. Note that <code>extensions</code> is a list of extenstions being handled by the handler.\nAn example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;,\n addhandlers =&gt; [ { handler =&gt; &#39;cgi-script&#39;, extensions =&gt; [&#39;.cgi&#39;]} ],\n } ],\n }\n</code></pre>\n\n<h6><code>allow</code></h6>\n\n<p>Sets an <code>Allow</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow\">Apache Core documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow =&gt; &#39;from example.org&#39; } ],\n }\n</code></pre>\n\n<h6><code>allow_override</code></h6>\n\n<p>Sets the usage of <code>.htaccess</code> files as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride\">Apache core documentation</a>. Should accept in the form of a list or a string. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow_override =&gt; [&#39;AuthConfig&#39;, &#39;Indexes&#39;] } ],\n }\n</code></pre>\n\n<h6><code>deny</code></h6>\n\n<p>Sets an <code>Deny</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#deny\">Apache Core documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, deny =&gt; &#39;from example.org&#39; } ],\n }\n</code></pre>\n\n<h6><code>headers</code></h6>\n\n<p>Adds lines for <code>Header</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_headers.html#header\">Apache Header documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; {\n path =&gt; &#39;/path/to/directory&#39;,\n headers =&gt; &#39;Set X-Robots-Tag &quot;noindex, noarchive, nosnippet&quot;&#39;,\n },\n }\n</code></pre>\n\n<h6><code>options</code></h6>\n\n<p>Lists the options for the given <code>&lt;Directory&gt;</code> block</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;] }],\n }\n</code></pre>\n\n<h6><code>order</code></h6>\n\n<p>Sets the order of processing <code>Allow</code> and <code>Deny</code> statements as per <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order\">Apache core documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, order =&gt; &#39;Allow, Deny&#39; } ],\n }\n</code></pre>\n\n<h6><code>auth_type</code></h6>\n\n<p>Sets the value for <code>AuthType</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#authtype\">Apache AuthType\ndocumentation</a>.</p>\n\n<h6><code>auth_name</code></h6>\n\n<p>Sets the value for <code>AuthName</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#authname\">Apache AuthName\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_algorithm</code></h6>\n\n<p>Sets the value for <code>AuthDigestAlgorithm</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestalgorithm\">Apache\nAuthDigestAlgorithm\ndocumentation</a></p>\n\n<h6><code>auth_digest_domain</code></h6>\n\n<p>Sets the value for <code>AuthDigestDomain</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestdomain\">Apache AuthDigestDomain\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_nonce_lifetime</code></h6>\n\n<p>Sets the value for <code>AuthDigestNonceLifetime</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestnoncelifetime\">Apache\nAuthDigestNonceLifetime\ndocumentation</a></p>\n\n<h6><code>auth_digest_provider</code></h6>\n\n<p>Sets the value for <code>AuthDigestProvider</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestprovider\">Apache AuthDigestProvider\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_qop</code></h6>\n\n<p>Sets the value for <code>AuthDigestQop</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestqop\">Apache AuthDigestQop\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_shmem_size</code></h6>\n\n<p>Sets the value for <code>AuthAuthDigestShmemSize</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestshmemsize\">Apache AuthDigestShmemSize\ndocumentation</a>.</p>\n\n<h6><code>auth_basic_authoritative</code></h6>\n\n<p>Sets the value for <code>AuthBasicAuthoritative</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_basic.html#authbasicauthoritative\">Apache\nAuthBasicAuthoritative\ndocumentation</a>.</p>\n\n<h6><code>auth_basic_fake</code></h6>\n\n<p>Sets the value for <code>AuthBasicFake</code> as per the <a href=\"https://httpd.apache.org/docs/trunk/mod/mod_auth_basic.html#authbasicfake\">Apache AuthBasicFake\ndocumentation</a>.</p>\n\n<h6><code>auth_basic_provider</code></h6>\n\n<p>Sets the value for <code>AuthBasicProvider</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_basic.html#authbasicprovider\">Apache AuthBasicProvider\ndocumentation</a>.</p>\n\n<h6><code>auth_user_file</code></h6>\n\n<p>Sets the value for <code>AuthUserFile</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_authn_file.html#authuserfile\">Apache AuthUserFile\ndocumentation</a>.</p>\n\n<h6><code>auth_require</code></h6>\n\n<p>Sets the value for <code>AuthName</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#require\">Apache Require\ndocumentation</a></p>\n\n<h6><code>passenger_enabled</code></h6>\n\n<p>Sets the value for the <code>PassengerEnabled</code> directory to <code>on</code> or <code>off</code> as per the <a href=\"http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerEnabled\">Passenger documentation</a>.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, passenger_enabled =&gt; &#39;off&#39; } ],\n }\n</code></pre>\n\n<p><strong>Note:</strong> This directive requires <code>apache::mod::passenger</code> to be active, Apache may not start with an unrecognised directive without it.</p>\n\n<p><strong>Note:</strong> Be aware that there is an <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">issue</a> using the <code>PassengerEnabled</code> directive with the <code>PassengerHighPerformance</code> directive.</p>\n\n<h6><code>custom_fragment</code></h6>\n\n<p>Pass a string of custom configuration directives to be placed at the end of the\ndirectory configuration.</p>\n\n<h5><code>docroot</code></h5>\n\n<p>Provides the DocumentRoot directive, identifying the directory Apache serves files from.</p>\n\n<h5><code>docroot_group</code></h5>\n\n<p>Sets group access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>docroot_owner</code></h5>\n\n<p>Sets individual user access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>error_log</code></h5>\n\n<p>Specifies whether <code>*_error.log</code> directives should be configured. Defaults to &#39;true&#39;.</p>\n\n<h5><code>error_log_file</code></h5>\n\n<p>Points to the <code>*_error.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_log_pipe</code></h5>\n\n<p>Specifies a pipe to send error log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_log_syslog</code></h5>\n\n<p>Sends all error log messages to syslog. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ensure</code></h5>\n\n<p>Specifies if the vhost file is present or absent.</p>\n\n<h5><code>ip</code></h5>\n\n<p>The IP address the vhost listens on. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ip_based</code></h5>\n\n<p>Enables an IP-based vhost. This parameter inhibits the creation of a NameVirtualHost directive, since those are used to funnel requests to name-based vhosts. Defaults to &#39;false&#39;.</p>\n\n<h5><code>logroot</code></h5>\n\n<p>Specifies the location of the virtual host&#39;s logfiles. Defaults to <code>/var/log/&lt;apache log location&gt;/</code>.</p>\n\n<h5><code>no_proxy_uris</code></h5>\n\n<p>Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with <code>proxy_dest</code>.</p>\n\n<h5><code>options</code></h5>\n\n<p>Lists the options for the given virtual host</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;],\n }\n</code></pre>\n\n<h5><code>override</code></h5>\n\n<p>Sets the overrides for the given virtual host. Accepts an array of AllowOverride arguments.</p>\n\n<h5><code>port</code></h5>\n\n<p>Sets the port the host is configured on.</p>\n\n<h5><code>priority</code></h5>\n\n<p>Sets the relative load-order for Apache httpd VirtualHost configuration files. Defaults to &#39;25&#39;.</p>\n\n<p>If nothing matches the priority, the first name-based vhost will be used. Likewise, passing a higher priority will cause the alphabetically first name-based vhost to be used if no other names match.</p>\n\n<p><em>Note</em>: You should not need to use this parameter. However, if you do use it, be aware that the <code>default_vhost</code> parameter for <code>apache::vhost</code> passes a priority of &#39;15&#39;.</p>\n\n<h5><code>proxy_dest</code></h5>\n\n<p>Specifies the destination address of a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>proxy_pass</code></h5>\n\n<p>Specifies an array of path =&gt; uri for a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<p>Example:</p>\n\n<pre lang=\"puppet\"><code>$proxy_pass = [\n { &#39;path&#39; =&gt; &#39;/a&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/&#39; },\n { &#39;path&#39; =&gt; &#39;/b&#39;, &#39;url&#39; =&gt; &#39;http://backend-b/&#39; },\n { &#39;path&#39; =&gt; &#39;/c&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/c&#39; }\n]\n\napache::vhost { &#39;site.name.fdqn&#39;:\n …\n proxy_pass =&gt; $proxy_pass,\n}\n</code></pre>\n\n<h5><code>rack_base_uris</code></h5>\n\n<p>Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for passenger/rack in the <code>_rack.erb</code> template. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_dest</code></h5>\n\n<p>Specifies the address to redirect to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_source</code></h5>\n\n<p>Specifies the source items? that will redirect to the destination specified in <code>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>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_source =&gt; [&#39;/images&#39;,&#39;/downloads&#39;],\n redirect_dest =&gt; [&#39;http://img.example.com/&#39;,&#39;http://downloads.example.com/&#39;],\n }\n</code></pre>\n\n<h5><code>redirect_status</code></h5>\n\n<p>Specifies the status to append to the redirect. Defaults to &#39;undef&#39;.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_status =&gt; [&#39;temp&#39;,&#39;permanent&#39;],\n }\n</code></pre>\n\n<h5><code>request_headers</code></h5>\n\n<p>Specifies additional request headers.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n request_headers =&gt; [\n &#39;append MirrorID &quot;mirror 12&quot;&#39;,\n &#39;unset MirrorID&#39;,\n ],\n }\n</code></pre>\n\n<h5><code>rewrite_base</code></h5>\n\n<p>Limits the <code>rewrite_rule</code> to the specified base URL. Defaults to &#39;undef&#39;.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n rewrite_base =&gt; &#39;/blog/&#39;,\n }\n</code></pre>\n\n<p>The above example would limit the index.html -&gt; welcome.html rewrite to only something inside of <a href=\"http://example.com/blog/\">http://example.com/blog/</a>.</p>\n\n<h5><code>rewrite_cond</code></h5>\n\n<p>Rewrites a URL via <code>rewrite_rule</code> based on the truth of specified conditions. For example</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_cond =&gt; &#39;%{HTTP_USER_AGENT} ^MSIE&#39;,\n }\n</code></pre>\n\n<p>will rewrite URLs only if the visitor is using IE. Defaults to &#39;undef&#39;.</p>\n\n<p><em>Note</em>: At the moment, each vhost is limited to a single list of rewrite conditions. In the future, you will be able to specify multiple <code>rewrite_cond</code> and <code>rewrite_rules</code> per vhost, so that different conditions get different rewrites.</p>\n\n<h5><code>rewrite_rule</code></h5>\n\n<p>Creates URL rewrite rules. Defaults to &#39;undef&#39;. This parameter allows you to specify, for example, that anyone trying to access index.html will be served welcome.html.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n }\n</code></pre>\n\n<h5><code>scriptalias</code></h5>\n\n<p>Defines a directory of CGI scripts to be aliased to the path &#39;/cgi-bin&#39;</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Specifies the email address Apache will display when it renders one of its error pages.</p>\n\n<h5><code>serveraliases</code></h5>\n\n<p>Sets the server aliases of the site.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the primary name of the virtual host.</p>\n\n<h5><code>setenv</code></h5>\n\n<p>Used by HTTPD to set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>setenvif</code></h5>\n\n<p>Used by HTTPD to conditionally set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>ssl</code></h5>\n\n<p>Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are &#39;true&#39; or &#39;false&#39;.</p>\n\n<h5><code>ssl_ca</code></h5>\n\n<p>Specifies the certificate authority.</p>\n\n<h5><code>ssl_cert</code></h5>\n\n<p>Specifies the SSL certification.</p>\n\n<h5><code>ssl_certs_dir</code></h5>\n\n<p>Specifies the location of the SSL certification directory. Defaults to <code>/etc/ssl/certs</code>.</p>\n\n<h5><code>ssl_chain</code></h5>\n\n<p>Specifies the SSL chain.</p>\n\n<h5><code>ssl_crl</code></h5>\n\n<p>Specifies the certificate revocation list to use.</p>\n\n<h5><code>ssl_crl_path</code></h5>\n\n<p>Specifies the location of the certificate revocation list.</p>\n\n<h5><code>ssl_key</code></h5>\n\n<p>Specifies the SSL key.</p>\n\n<h5><code>sslproxyengine</code></h5>\n\n<p>Specifies whether to use <code>SSLProxyEngine</code> or not. Defaults to <code>false</code>.</p>\n\n<h5><code>vhost_name</code></h5>\n\n<p>This parameter is for use with name-based virtual hosting. Defaults to &#39;*&#39;.</p>\n\n<h5><code>itk</code></h5>\n\n<p>Hash containing infos to configure itk as per the <a href=\"http://mpm-itk.sesse.net/\">ITK documentation</a>.</p>\n\n<p>Keys could be:</p>\n\n<ul>\n<li>user + group</li>\n<li>assignuseridexpr</li>\n<li>assigngroupidexpr</li>\n<li>maxclientvhost</li>\n<li>nice</li>\n<li>limituidrange (Linux 3.5.0 or newer)</li>\n<li>limitgidrange (Linux 3.5.0 or newer)</li>\n</ul>\n\n<p>Usage will typically look like:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n itk =&gt; {\n user =&gt; &#39;someuser&#39;,\n group =&gt; &#39;somegroup&#39;,\n },\n }\n</code></pre>\n\n<h3>Virtual Host Examples</h3>\n\n<p>The Apache module allows you to set up pretty much any configuration of virtual host you might desire. This section will address some common configurations. Please see the <a href=\"https://github.com/puppetlabs/puppetlabs-apache/tree/master/tests\">Tests section</a> for even more examples.</p>\n\n<p>Configure a vhost with a server administrator</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;third.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n serveradmin =&gt; &#39;admin@example.com&#39;,\n }\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with aliased servers</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sixth.example.com&#39;:\n serveraliases =&gt; [\n &#39;sixth.example.org&#39;,\n &#39;sixth.example.net&#39;,\n ],\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n }\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost with a cgi-bin</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;eleventh.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/eleventh&#39;,\n scriptalias =&gt; &#39;/usr/lib/cgi-bin&#39;,\n }\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with a rack configuration</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;fifteenth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifteenth&#39;,\n rack_base_uris =&gt; [&#39;/rackapp1&#39;, &#39;/rackapp2&#39;],\n }\n</code></pre>\n\n<hr>\n\n<p>Set up a mix of SSL and non-SSL vhosts at the same domain</p>\n\n<pre lang=\"puppet\"><code> #The non-ssl vhost\n apache::vhost { &#39;first.example.com non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n }\n\n #The SSL vhost at the same domain\n apache::vhost { &#39;first.example.com ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost to redirect non-SSL connections to SSL</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sixteenth.example.com non-ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n redirect_status =&gt; &#39;permanent&#39;\n redirect_dest =&gt; &#39;https://sixteenth.example.com/&#39;\n }\n apache::vhost { &#39;sixteenth.example.com ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<hr>\n\n<p>Set up IP-based vhosts on any listen port and have them respond to requests on specific IP addresses. In this example, we will set listening on ports 80 and 81. This is required because the example vhosts are not declared with a port parameter.</p>\n\n<pre lang=\"puppet\"><code> apache::listen { &#39;80&#39;: }\n apache::listen { &#39;81&#39;: }\n</code></pre>\n\n<p>Then we will set up the IP-based vhosts</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;first.example.com&#39;:\n ip =&gt; &#39;10.0.0.10&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ip_based =&gt; true,\n }\n apache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.11&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n ip_based =&gt; true,\n }\n</code></pre>\n\n<hr>\n\n<p>Configure a mix of name-based and IP-based vhosts. First, we will add two IP-based vhosts on 10.0.0.10, one SSL and one non-SSL</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;The first IP-based vhost, non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;80&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first&#39;,\n }\n apache::vhost { &#39;The first IP-based vhost, ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;443&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first-ssl&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<p>Then, we will add two name-based vhosts listening on 10.0.0.20</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n }\n apache::vhost { &#39;third.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n }\n</code></pre>\n\n<p>If you want to add two name-based vhosts so that they will answer on either 10.0.0.10 or 10.0.0.20, you <strong>MUST</strong> declare <code>add_listen =&gt; &#39;false&#39;</code> to disable the otherwise automatic &#39;Listen 80&#39;, as it will conflict with the preceding IP-based vhosts.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n add_listen =&gt; false,\n }\n apache::vhost { &#39;fifth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n add_listen =&gt; false,\n }\n</code></pre>\n\n<h2>Implementation</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<h4>Class: <code>apache::dev</code></h4>\n\n<p>Installs Apache development libraries</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::dev&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::listen</code></h4>\n\n<p>Controls which ports Apache binds to for listening based on the title:</p>\n\n<pre lang=\"puppet\"><code> apache::listen { &#39;80&#39;: }\n apache::listen { &#39;443&#39;: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>Listen</code> directives to the <code>ports.conf</code> file in the Apache httpd configuration directory. <code>apache::listen</code> titles should always take the form of: <code>&lt;port&gt;</code>, <code>&lt;ipv4&gt;:&lt;port&gt;</code>, or <code>[&lt;ipv6&gt;]:&lt;port&gt;</code></p>\n\n<p>Apache httpd requires that <code>Listen</code> directives must be added for every port. The <code>apache::vhost</code> defined type will automatically add <code>Listen</code> directives unless the <code>apache::vhost</code> is passed <code>add_listen =&gt; false</code>.</p>\n\n<h4>Defined Type: <code>apache::namevirtualhost</code></h4>\n\n<p>Enables named-based hosting of a virtual host</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::namevirtualhost`: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>NameVirtualHost</code> directives to the <code>ports.conf</code> file in the Apache https configuration directory. <code>apache::namevirtualhost</code> titles should always take the form of: <code>*</code>, <code>*:&lt;port&gt;</code>, <code>_default_:&lt;port&gt;</code>, <code>&lt;ip&gt;</code>, or <code>&lt;ip&gt;:&lt;port&gt;</code>.</p>\n\n<h4>Defined Type: <code>apache::balancermember</code></h4>\n\n<p>Define members of a proxy_balancer set (mod_proxy_balancer). Very useful when using exported resources.</p>\n\n<p>On every app server you can export a balancermember like this:</p>\n\n<pre lang=\"puppet\"><code> @@apache::balancermember { &quot;${::fqdn}-puppet00&quot;:\n balancer_cluster =&gt; &#39;puppet00&#39;,\n url =&gt; &quot;ajp://${::fqdn}:8009&quot;\n options =&gt; [&#39;ping=5&#39;, &#39;disablereuse=on&#39;, &#39;retry=5&#39;, &#39;ttl=120&#39;],\n }\n</code></pre>\n\n<p>And on the proxy itself you create the balancer cluster using the defined type apache::balancer:</p>\n\n<pre lang=\"puppet\"><code> apache::balancer { &#39;puppet00&#39;: }\n</code></pre>\n\n<p>If you need to use ProxySet in the balncer config you can do as so:</p>\n\n<pre lang=\"puppet\"><code> apache::balancer { &#39;puppet01&#39;:\n proxy_set =&gt; {&#39;stickysession&#39; =&gt; &#39;JSESSIONID&#39;},\n }\n</code></pre>\n\n<h3>Templates</h3>\n\n<p>The Apache module relies heavily on templates to enable the <code>vhost</code> and <code>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>\n\n<h2>Limitations</h2>\n\n<p>This has been tested on Ubuntu Precise, Debian Wheezy, and CentOS 5.8.</p>\n\n<h2>Development</h2>\n\n<h3>Overview</h3>\n\n<p>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>\n\n<p>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>\n\n<p>You can read the complete module contribution guide <a href=\"http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing\">on the Puppet Labs wiki.</a></p>\n\n<h3>Running tests</h3>\n\n<p>This project contains tests for both <a href=\"http://rspec-puppet.com/\">rspec-puppet</a> and <a href=\"https://github.com/puppetlabs/rspec-system\">rspec-system</a> to verify functionality. For in-depth information please see their respective documentation.</p>\n\n<p>Quickstart:</p>\n\n<pre><code>gem install bundler\nbundle install\nbundle exec rake spec\nbundle exec rake spec:system\n</code></pre>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.</p>\n</section>",
457
+ "readme": "<section class=\"markdown\"><h1>apache</h1>\n\n<p><a href=\"https://travis-ci.org/puppetlabs/puppetlabs-apache\"><img src=\"https://travis-ci.org/puppetlabs/puppetlabs-apache.png?branch=main\" alt=\"Build Status\"></a></p>\n\n<h4>Table of Contents</h4>\n\n<ol>\n<li><a href=\"#overview\">Overview - What is the Apache module?</a></li>\n<li><a href=\"#module-description\">Module Description - What does the module do?</a></li>\n<li><a href=\"#setup\">Setup - The basics of getting started with Apache</a>\n\n<ul>\n<li><a href=\"#beginning-with-apache\">Beginning with Apache - Installation</a></li>\n<li><a href=\"#configure-a-virtual-host\">Configure a Virtual Host - Basic options for getting started</a></li>\n</ul></li>\n<li><a href=\"#usage\">Usage - The classes, defined types, and their parameters available for configuration</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a>\n\n<ul>\n<li><a href=\"#class-apache\">Class: apache</a></li>\n<li><a href=\"#classes-apachemodname\">Classes: apache::mod::*</a></li>\n<li><a href=\"#defined-type-apachevhost\">Defined Type: apache::vhost</a></li>\n</ul></li>\n<li><a href=\"#virtual-host-examples\">Virtual Host Examples - Demonstrations of some configuration options</a></li>\n</ul></li>\n<li><a href=\"#implementation\">Implementation - An under-the-hood peek at what the module is doing</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a></li>\n<li><a href=\"#templates\">Templates</a></li>\n</ul></li>\n<li><a href=\"#limitations\">Limitations - OS compatibility, etc.</a></li>\n<li><a href=\"#development\">Development - Guide for contributing to the module</a></li>\n<li><a href=\"#release-notes\">Release Notes - Notes on the most recent updates to the module</a></li>\n</ol>\n\n<h2>Overview</h2>\n\n<p>The Apache module allows you to set up virtual hosts and manage web services with minimal effort.</p>\n\n<h2>Module Description</h2>\n\n<p>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>\n\n<h2>Setup</h2>\n\n<p><strong>What Apache affects:</strong></p>\n\n<ul>\n<li>configuration files and directories (created and written to)\n\n<ul>\n<li><strong>NOTE</strong>: Configurations that are <em>not</em> managed by Puppet will be purged.</li>\n</ul></li>\n<li>package/service/configuration files for Apache</li>\n<li>Apache modules</li>\n<li>virtual hosts</li>\n<li>listened-to ports</li>\n</ul>\n\n<h3>Beginning with Apache</h3>\n\n<p>To install Apache with the default parameters</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;: }\n</code></pre>\n\n<p>The defaults are determined by your operating system (e.g. Debian systems have one set of defaults, RedHat systems have another). These defaults will work well in a testing environment, but are not suggested for production. To establish customized parameters</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;:\n default_mods =&gt; false,\n }\n</code></pre>\n\n<h3>Configure a virtual host</h3>\n\n<p>Declaring the <code>apache</code> class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving <code>$apache::docroot</code>.</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;: }\n</code></pre>\n\n<p>To configure a very basic, name-based virtual host</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;first.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n }\n</code></pre>\n\n<p><em>Note:</em> The default priority is 15. If nothing matches this priority, the alphabetically first name-based vhost will be used. This is also true if you pass a higher priority and no names match anything else.</p>\n\n<p>A slightly more complicated example, which moves the docroot owner/group</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;second.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n docroot_owner =&gt; &#39;third&#39;,\n docroot_group =&gt; &#39;third&#39;,\n }\n</code></pre>\n\n<p>To set up a virtual host with SSL and default SSL certificates</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;ssl.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/ssl&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<p>To set up a virtual host with SSL and specific SSL certificates</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n ssl =&gt; true,\n ssl_cert =&gt; &#39;/etc/ssl/fourth.example.com.cert&#39;,\n ssl_key =&gt; &#39;/etc/ssl/fourth.example.com.key&#39;,\n }\n</code></pre>\n\n<p>To set up a virtual host with wildcard alias for subdomain mapped to same named directory\n<code>http://examle.com.loc =&gt; /var/www/example.com</code></p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;subdomain.loc&#39;:\n vhost_name =&gt; &#39;*&#39;,\n port =&gt; &#39;80&#39;,\n virtual_docroot&#39; =&gt; &#39;/var/www/%-2+&#39;,\n docroot =&gt; &#39;/var/www&#39;,\n serveraliases =&gt; [&#39;*.loc&#39;,],\n }\n</code></pre>\n\n<p>To set up a virtual host with suPHP</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;suphp.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/appuser/myphpapp&#39;,\n suphp_addhandler =&gt; &#39;x-httpd-php&#39;,\n suphp_engine =&gt; &#39;on&#39;,\n suphp_configpath =&gt; &#39;/etc/php5/apache2&#39;,\n }\n</code></pre>\n\n<p>To set up a virtual host with WSGI</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;wsgi.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/pythonapp&#39;,\n wsgi_daemon_process =&gt; &#39;wsgi&#39;,\n wsgi_daemon_process_options =&gt;\n { processes =&gt; &#39;2&#39;, threads =&gt; &#39;15&#39;, display-name =&gt; &#39;%{GROUP}&#39; },\n wsgi_process_group =&gt; &#39;wsgi&#39;,\n wsgi_script_aliases =&gt; { &#39;/&#39; =&gt; &#39;/var/www/demo.wsgi&#39; },\n }\n</code></pre>\n\n<p>To see a list of all virtual host parameters, <a href=\"#defined-type-apachevhost\">please go here</a>. To see an extensive list of virtual host examples <a href=\"#virtual-host-examples\">please look here</a>.</p>\n\n<h2>Usage</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<p>This module modifies Apache configuration files and directories and will purge any configuration not managed by Puppet. Configuration of Apache should be managed by Puppet, as non-puppet configuration files can cause unexpected failures.</p>\n\n<p>It is possible to temporarily disable full Puppet management by setting the <code>purge_configs</code> parameter within the base <code>apache</code> class to &#39;false&#39;. This option should only be used as a temporary means of saving and relocating customized configurations.</p>\n\n<h4>Class: <code>apache</code></h4>\n\n<p>The Apache module&#39;s primary class, <code>apache</code>, guides the basic setup of Apache on your system.</p>\n\n<p>You may establish a default vhost in this class, the <code>vhost</code> class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the <code>vhost</code> type.</p>\n\n<p><strong>Parameters within <code>apache</code>:</strong></p>\n\n<h5><code>default_mods</code></h5>\n\n<p>Sets up Apache with default settings based on your OS. Defaults to &#39;true&#39;, set to &#39;false&#39; for customized configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets up a default virtual host. Defaults to &#39;true&#39;, set to &#39;false&#39; to set up <a href=\"#configure-a-virtual-host\">customized virtual hosts</a>.</p>\n\n<h5><code>default_ssl_vhost</code></h5>\n\n<p>Sets up a default SSL virtual host. Defaults to &#39;false&#39;.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;default-ssl&#39;:\n port =&gt; 443,\n ssl =&gt; true,\n docroot =&gt; $docroot,\n scriptalias =&gt; $scriptalias,\n serveradmin =&gt; $serveradmin,\n access_log_file =&gt; &quot;ssl_${access_log_file}&quot;,\n }\n</code></pre>\n\n<p>SSL vhosts only respond to HTTPS queries.</p>\n\n<h5><code>default_ssl_cert</code></h5>\n\n<p>The default SSL certification, which is automatically set based on your operating system (<code>/etc/pki/tls/certs/localhost.crt</code> for RedHat, <code>/etc/ssl/certs/ssl-cert-snakeoil.pem</code> for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_key</code></h5>\n\n<p>The default SSL key, which is automatically set based on your operating system (<code>/etc/pki/tls/private/localhost.key</code> for RedHat, <code>/etc/ssl/private/ssl-cert-snakeoil.key</code> for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_chain</code></h5>\n\n<p>The default SSL chain, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_ca</code></h5>\n\n<p>The default certificate authority, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl_path</code></h5>\n\n<p>The default certificate revocation list path, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl</code></h5>\n\n<p>The default certificate revocation list to use, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>service_enable</code></h5>\n\n<p>Determines whether the &#39;httpd&#39; service is enabled when the machine is booted, meaning Puppet will check the service status to start/stop it. Defaults to &#39;true&#39;, meaning the service is enabled/running.</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Sets the server administrator. Defaults to &#39;root@localhost&#39;.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the servername. Defaults to fqdn provided by facter.</p>\n\n<h5><code>sendfile</code></h5>\n\n<p>Makes Apache use the Linux kernel &#39;sendfile&#39; to serve static files. Defaults to &#39;false&#39;.</p>\n\n<h5><code>error_documents</code></h5>\n\n<p>Enables custom error documents. Defaults to &#39;false&#39;.</p>\n\n<h5><code>httpd_dir</code></h5>\n\n<p>Changes the base location of the configuration directories used for the service. This is useful for specially repackaged HTTPD builds but may have unintended concequences when used in combination with the default distribution packages. Default is based on your OS.</p>\n\n<h5><code>confd_dir</code></h5>\n\n<p>Changes the location of the configuration directory your custom configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>vhost_dir</code></h5>\n\n<p>Changes the location of the configuration directory your virtual host configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mod_dir</code></h5>\n\n<p>Changes the location of the configuration directory your Apache modules configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mpm_module</code></h5>\n\n<p>Configures which mpm module is loaded and configured for the httpd process by the <code>apache::mod::prefork</code>, <code>apache::mod::worker</code> and <code>apache::mod::itk</code> classes. Must be set to <code>false</code> to explicitly declare <code>apache::mod::worker</code>, <code>apache::mod::worker</code> or <code>apache::mod::itk</code> classes with parameters. Valid values are <code>worker</code>, <code>prefork</code>, <code>itk</code> (Debian), or the boolean <code>false</code>. Defaults to <code>prefork</code> on RedHat and <code>worker</code> on Debian.</p>\n\n<h5><code>conf_template</code></h5>\n\n<p>Setting this allows you to override the template used for the main apache configuration file. This is a potentially risky thing to do as this module has been built around the concept of a minimal configuration file with most of the configuration coming in the form of conf.d/ entries. Defaults to &#39;apache/httpd.conf.erb&#39;.</p>\n\n<h5><code>keepalive</code></h5>\n\n<p>Setting this allows you to enable persistent connections.</p>\n\n<h5><code>keepalive_timeout</code></h5>\n\n<p>Amount of time the server will wait for subsequent requests on a persistent connection. Defaults to &#39;15&#39;.</p>\n\n<h5><code>logroot</code></h5>\n\n<p>Changes the location of the directory Apache log files are placed in. Defaut is based on your OS.</p>\n\n<h5><code>ports_file</code></h5>\n\n<p>Changes the name of the file containing Apache ports configuration. Default is <code>${conf_dir}/ports.conf</code>.</p>\n\n<h4>Class: <code>apache::default_mods</code></h4>\n\n<p>Installs default Apache modules based on what OS you are running</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::default_mods&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::mod</code></h4>\n\n<p>Used to enable arbitrary Apache httpd modules for which there is no specific <code>apache::mod::[name]</code> class. The <code>apache::mod</code> defined type will also install the required packages to enable the module, if any.</p>\n\n<pre lang=\"puppet\"><code> apache::mod { &#39;rewrite&#39;: }\n apache::mod { &#39;ldap&#39;: }\n</code></pre>\n\n<h4>Classes: <code>apache::mod::[name]</code></h4>\n\n<p>There are many <code>apache::mod::[name]</code> classes within this module that can be declared using <code>include</code>:</p>\n\n<ul>\n<li><code>alias</code></li>\n<li><code>auth_basic</code></li>\n<li><code>auth_kerb</code></li>\n<li><code>autoindex</code></li>\n<li><code>cache</code></li>\n<li><code>cgi</code></li>\n<li><code>cgid</code></li>\n<li><code>dav</code></li>\n<li><code>dav_fs</code></li>\n<li><code>deflate</code></li>\n<li><code>dir</code>*</li>\n<li><code>disk_cache</code></li>\n<li><code>fcgid</code></li>\n<li><code>info</code></li>\n<li><code>ldap</code></li>\n<li><code>mime</code></li>\n<li><code>mime_magic</code></li>\n<li><code>mpm_event</code></li>\n<li><code>negotiation</code></li>\n<li><code>passenger</code>*</li>\n<li><code>perl</code></li>\n<li><code>php</code> (requires <a href=\"#mpm_module\"><code>mpm_module</code></a> set to <code>prefork</code>)</li>\n<li><code>prefork</code>*</li>\n<li><code>proxy</code>*</li>\n<li><code>proxy_html</code></li>\n<li><code>proxy_http</code></li>\n<li><code>python</code></li>\n<li><code>reqtimeout</code></li>\n<li><code>setenvif</code></li>\n<li><code>ssl</code>* (see <a href=\"#class-apachemodssl\">apache::mod::ssl</a> below)</li>\n<li><code>status</code></li>\n<li><code>suphp</code></li>\n<li><code>userdir</code>*</li>\n<li><code>worker</code>*</li>\n<li><code>wsgi</code> (see <a href=\"#class-apachemodwsgi\">apache::mod::wsgi</a> below)</li>\n<li><code>xsendfile</code></li>\n</ul>\n\n<p>Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module&#39;s configuration. Most of the time, these parameters will not require any configuration or attention.</p>\n\n<p>The modules mentioned above, and other Apache modules that have templates, will cause template files to be dropped along with the mod install, and the module will not work without the template. Any mod without a template will install package but drop no files.</p>\n\n<h4>Class: <code>apache::mod::ssl</code></h4>\n\n<p>Installs Apache SSL capabilities and utilizes <code>ssl.conf.erb</code> template</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::mod::ssl&#39;: }\n</code></pre>\n\n<p>To <em>use</em> SSL with a virtual host, you must either set the<code>default_ssl_vhost</code> parameter in <code>apache</code> to &#39;true&#39; or set the <code>ssl</code> parameter in <code>apache::vhost</code> to &#39;true&#39;.</p>\n\n<h4>Class: <code>apache::mod::wsgi</code></h4>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::mod::wsgi&#39;:\n wsgi_socket_prefix =&gt; &quot;\\${APACHE_RUN_DIR}WSGI&quot;,\n wsgi_python_home =&gt; &#39;/path/to/virtenv&#39;,\n }\n</code></pre>\n\n<h4>Defined Type: <code>apache::vhost</code></h4>\n\n<p>The Apache module allows a lot of flexibility in the set up and configuration of virtual hosts. This flexibility is due, in part, to <code>vhost</code>&#39;s setup as a defined resource type, which allows it to be evaluated multiple times with different parameters.</p>\n\n<p>The <code>vhost</code> defined type allows you to have specialized configurations for virtual hosts that have requirements outside of the defaults. You can set up a default vhost within the base <code>apache</code> class as well as set a customized vhost setup as default. Your customized vhost (priority 10) will be privileged over the base class vhost (15).</p>\n\n<p>If you have a series of specific configurations and do not want a base <code>apache</code> class default vhost, make sure to set the base class default host to &#39;false&#39;.</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;:\n default_vhost =&gt; false,\n }\n</code></pre>\n\n<p><strong>Parameters within <code>apache::vhost</code>:</strong></p>\n\n<p>The default values for each parameter will vary based on operating system and type of virtual host.</p>\n\n<h5><code>access_log</code></h5>\n\n<p>Specifies whether <code>*_access.log</code> directives should be configured. Valid values are &#39;true&#39; and &#39;false&#39;. Defaults to &#39;true&#39;.</p>\n\n<h5><code>access_log_file</code></h5>\n\n<p>Points to the <code>*_access.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_pipe</code></h5>\n\n<p>Specifies a pipe to send access log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_syslog</code></h5>\n\n<p>Sends all access log messages to syslog. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_format</code></h5>\n\n<p>Specifies either a LogFormat nickname or custom format string for access log. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>add_listen</code></h5>\n\n<p>Determines whether the vhost creates a listen statement. The default value is &#39;true&#39;.</p>\n\n<p>Setting <code>add_listen</code> to &#39;false&#39; stops the vhost from creating a listen statement, and this is important when you combine vhosts that are not passed an <code>ip</code> parameter with vhosts that <em>are</em> passed the <code>ip</code> parameter.</p>\n\n<h5><code>aliases</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>Alias</code> statements as per the <a href=\"http://httpd.apache.org/docs/current/mod/mod_alias.html\"><code>mod_alias</code> documentation</a>. Each hash is expected to be of the form:</p>\n\n<pre lang=\"puppet\"><code>aliases =&gt; [ { alias =&gt; &#39;/alias&#39;, path =&gt; &#39;/path/to/directory&#39; } ],\n</code></pre>\n\n<p>For <code>Alias</code> to work, each will need a corresponding <code>&lt;Directory /path/to/directory&gt;</code> or <code>&lt;Location /path/to/directory&gt;</code> block.</p>\n\n<p><strong>Note:</strong> If <code>apache::mod::passenger</code> is loaded and <code>PassengerHighPerformance true</code> is set, then <code>Alias</code> may have issues honouring the <code>PassengerEnabled off</code> statement. See <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">this article</a> for details.</p>\n\n<h5><code>block</code></h5>\n\n<p>Specifies the list of things Apache will block access to. The default is an empty set, &#39;[]&#39;. Currently, the only option is &#39;scm&#39;, which blocks web access to .svn, .git and .bzr directories. To add to this, please see the <a href=\"#development\">Development</a> section.</p>\n\n<h5><code>custom_fragment</code></h5>\n\n<p>Pass a string of custom configuration directives to be placed at the end of the vhost configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets a given <code>apache::vhost</code> as the default to serve requests that do not match any other <code>apache::vhost</code> definitions. The default value is &#39;false&#39;.</p>\n\n<h5><code>directories</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>&lt;Directory /path/to/directory&gt;...&lt;/Directory&gt;</code> directive blocks as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#directory\">Apache core documentation</a>. The <code>path</code> key is required in these hashes. Usage will typically look like:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [\n { path =&gt; &#39;/path/to/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n { path =&gt; &#39;/path/to/another/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n ],\n }\n</code></pre>\n\n<p><em>Note:</em> At least one directory should match <code>docroot</code> parameter, once you start declaring directories <code>apache::vhost</code> assumes that all required <code>&lt;Directory&gt;</code> blocks will be declared.</p>\n\n<p><em>Note:</em> If not defined a single default <code>&lt;Directory&gt;</code> block will be created that matches the <code>docroot</code> parameter.</p>\n\n<p>The directives will be embedded within the <code>Directory</code> directive block, missing directives should be undefined and not be added, resulting in their default vaules in Apache. Currently this is the list of supported directives:</p>\n\n<h6><code>addhandlers</code></h6>\n\n<p>Sets <code>AddHandler</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addhandler\">Apache Core documentation</a>. Accepts a list of hashes of the form <code>{ handler =&gt; &#39;handler-name&#39;, extensions =&gt; [&#39;extension&#39;]}</code>. Note that <code>extensions</code> is a list of extenstions being handled by the handler.\nAn example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;,\n addhandlers =&gt; [ { handler =&gt; &#39;cgi-script&#39;, extensions =&gt; [&#39;.cgi&#39;]} ],\n } ],\n }\n</code></pre>\n\n<h6><code>allow</code></h6>\n\n<p>Sets an <code>Allow</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow\">Apache Core documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow =&gt; &#39;from example.org&#39; } ],\n }\n</code></pre>\n\n<h6><code>allow_override</code></h6>\n\n<p>Sets the usage of <code>.htaccess</code> files as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride\">Apache core documentation</a>. Should accept in the form of a list or a string. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow_override =&gt; [&#39;AuthConfig&#39;, &#39;Indexes&#39;] } ],\n }\n</code></pre>\n\n<h6><code>deny</code></h6>\n\n<p>Sets an <code>Deny</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#deny\">Apache Core documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, deny =&gt; &#39;from example.org&#39; } ],\n }\n</code></pre>\n\n<h6><code>headers</code></h6>\n\n<p>Adds lines for <code>Header</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_headers.html#header\">Apache Header documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; {\n path =&gt; &#39;/path/to/directory&#39;,\n headers =&gt; &#39;Set X-Robots-Tag &quot;noindex, noarchive, nosnippet&quot;&#39;,\n },\n }\n</code></pre>\n\n<h6><code>options</code></h6>\n\n<p>Lists the options for the given <code>&lt;Directory&gt;</code> block</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;] }],\n }\n</code></pre>\n\n<h6><code>order</code></h6>\n\n<p>Sets the order of processing <code>Allow</code> and <code>Deny</code> statements as per <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order\">Apache core documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, order =&gt; &#39;Allow, Deny&#39; } ],\n }\n</code></pre>\n\n<h6><code>auth_type</code></h6>\n\n<p>Sets the value for <code>AuthType</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#authtype\">Apache AuthType\ndocumentation</a>.</p>\n\n<h6><code>auth_name</code></h6>\n\n<p>Sets the value for <code>AuthName</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#authname\">Apache AuthName\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_algorithm</code></h6>\n\n<p>Sets the value for <code>AuthDigestAlgorithm</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestalgorithm\">Apache\nAuthDigestAlgorithm\ndocumentation</a></p>\n\n<h6><code>auth_digest_domain</code></h6>\n\n<p>Sets the value for <code>AuthDigestDomain</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestdomain\">Apache AuthDigestDomain\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_nonce_lifetime</code></h6>\n\n<p>Sets the value for <code>AuthDigestNonceLifetime</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestnoncelifetime\">Apache\nAuthDigestNonceLifetime\ndocumentation</a></p>\n\n<h6><code>auth_digest_provider</code></h6>\n\n<p>Sets the value for <code>AuthDigestProvider</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestprovider\">Apache AuthDigestProvider\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_qop</code></h6>\n\n<p>Sets the value for <code>AuthDigestQop</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestqop\">Apache AuthDigestQop\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_shmem_size</code></h6>\n\n<p>Sets the value for <code>AuthAuthDigestShmemSize</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestshmemsize\">Apache AuthDigestShmemSize\ndocumentation</a>.</p>\n\n<h6><code>auth_basic_authoritative</code></h6>\n\n<p>Sets the value for <code>AuthBasicAuthoritative</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_basic.html#authbasicauthoritative\">Apache\nAuthBasicAuthoritative\ndocumentation</a>.</p>\n\n<h6><code>auth_basic_fake</code></h6>\n\n<p>Sets the value for <code>AuthBasicFake</code> as per the <a href=\"https://httpd.apache.org/docs/trunk/mod/mod_auth_basic.html#authbasicfake\">Apache AuthBasicFake\ndocumentation</a>.</p>\n\n<h6><code>auth_basic_provider</code></h6>\n\n<p>Sets the value for <code>AuthBasicProvider</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_basic.html#authbasicprovider\">Apache AuthBasicProvider\ndocumentation</a>.</p>\n\n<h6><code>auth_user_file</code></h6>\n\n<p>Sets the value for <code>AuthUserFile</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_authn_file.html#authuserfile\">Apache AuthUserFile\ndocumentation</a>.</p>\n\n<h6><code>auth_require</code></h6>\n\n<p>Sets the value for <code>AuthName</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#require\">Apache Require\ndocumentation</a></p>\n\n<h6><code>passenger_enabled</code></h6>\n\n<p>Sets the value for the <code>PassengerEnabled</code> directory to <code>on</code> or <code>off</code> as per the <a href=\"http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerEnabled\">Passenger documentation</a>.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, passenger_enabled =&gt; &#39;off&#39; } ],\n }\n</code></pre>\n\n<p><strong>Note:</strong> This directive requires <code>apache::mod::passenger</code> to be active, Apache may not start with an unrecognised directive without it.</p>\n\n<p><strong>Note:</strong> Be aware that there is an <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">issue</a> using the <code>PassengerEnabled</code> directive with the <code>PassengerHighPerformance</code> directive.</p>\n\n<h6><code>custom_fragment</code></h6>\n\n<p>Pass a string of custom configuration directives to be placed at the end of the\ndirectory configuration.</p>\n\n<h5><code>docroot</code></h5>\n\n<p>Provides the DocumentRoot directive, identifying the directory Apache serves files from.</p>\n\n<h5><code>docroot_group</code></h5>\n\n<p>Sets group access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>docroot_owner</code></h5>\n\n<p>Sets individual user access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>error_log</code></h5>\n\n<p>Specifies whether <code>*_error.log</code> directives should be configured. Defaults to &#39;true&#39;.</p>\n\n<h5><code>error_log_file</code></h5>\n\n<p>Points to the <code>*_error.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_log_pipe</code></h5>\n\n<p>Specifies a pipe to send error log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_log_syslog</code></h5>\n\n<p>Sends all error log messages to syslog. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ensure</code></h5>\n\n<p>Specifies if the vhost file is present or absent.</p>\n\n<h5><code>ip</code></h5>\n\n<p>The IP address the vhost listens on. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ip_based</code></h5>\n\n<p>Enables an IP-based vhost. This parameter inhibits the creation of a NameVirtualHost directive, since those are used to funnel requests to name-based vhosts. Defaults to &#39;false&#39;.</p>\n\n<h5><code>logroot</code></h5>\n\n<p>Specifies the location of the virtual host&#39;s logfiles. Defaults to <code>/var/log/&lt;apache log location&gt;/</code>.</p>\n\n<h5><code>no_proxy_uris</code></h5>\n\n<p>Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with <code>proxy_dest</code>.</p>\n\n<h5><code>options</code></h5>\n\n<p>Lists the options for the given virtual host</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;],\n }\n</code></pre>\n\n<h5><code>override</code></h5>\n\n<p>Sets the overrides for the given virtual host. Accepts an array of AllowOverride arguments.</p>\n\n<h5><code>port</code></h5>\n\n<p>Sets the port the host is configured on.</p>\n\n<h5><code>priority</code></h5>\n\n<p>Sets the relative load-order for Apache httpd VirtualHost configuration files. Defaults to &#39;25&#39;.</p>\n\n<p>If nothing matches the priority, the first name-based vhost will be used. Likewise, passing a higher priority will cause the alphabetically first name-based vhost to be used if no other names match.</p>\n\n<p><em>Note</em>: You should not need to use this parameter. However, if you do use it, be aware that the <code>default_vhost</code> parameter for <code>apache::vhost</code> passes a priority of &#39;15&#39;.</p>\n\n<h5><code>proxy_dest</code></h5>\n\n<p>Specifies the destination address of a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>proxy_pass</code></h5>\n\n<p>Specifies an array of path =&gt; uri for a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<p>Example:</p>\n\n<pre lang=\"puppet\"><code>$proxy_pass = [\n { &#39;path&#39; =&gt; &#39;/a&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/&#39; },\n { &#39;path&#39; =&gt; &#39;/b&#39;, &#39;url&#39; =&gt; &#39;http://backend-b/&#39; },\n { &#39;path&#39; =&gt; &#39;/c&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/c&#39; }\n]\n\napache::vhost { &#39;site.name.fdqn&#39;:\n …\n proxy_pass =&gt; $proxy_pass,\n}\n</code></pre>\n\n<h5><code>rack_base_uris</code></h5>\n\n<p>Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for passenger/rack in the <code>_rack.erb</code> template. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_dest</code></h5>\n\n<p>Specifies the address to redirect to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_source</code></h5>\n\n<p>Specifies the source items? that will redirect to the destination specified in <code>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>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_source =&gt; [&#39;/images&#39;,&#39;/downloads&#39;],\n redirect_dest =&gt; [&#39;http://img.example.com/&#39;,&#39;http://downloads.example.com/&#39;],\n }\n</code></pre>\n\n<h5><code>redirect_status</code></h5>\n\n<p>Specifies the status to append to the redirect. Defaults to &#39;undef&#39;.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_status =&gt; [&#39;temp&#39;,&#39;permanent&#39;],\n }\n</code></pre>\n\n<h5><code>request_headers</code></h5>\n\n<p>Specifies additional request headers.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n request_headers =&gt; [\n &#39;append MirrorID &quot;mirror 12&quot;&#39;,\n &#39;unset MirrorID&#39;,\n ],\n }\n</code></pre>\n\n<h5><code>rewrite_base</code></h5>\n\n<p>Limits the <code>rewrite_rule</code> to the specified base URL. Defaults to &#39;undef&#39;.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n rewrite_base =&gt; &#39;/blog/&#39;,\n }\n</code></pre>\n\n<p>The above example would limit the index.html -&gt; welcome.html rewrite to only something inside of <a href=\"http://example.com/blog/\">http://example.com/blog/</a>.</p>\n\n<h5><code>rewrite_cond</code></h5>\n\n<p>Rewrites a URL via <code>rewrite_rule</code> based on the truth of specified conditions. For example</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_cond =&gt; &#39;%{HTTP_USER_AGENT} ^MSIE&#39;,\n }\n</code></pre>\n\n<p>will rewrite URLs only if the visitor is using IE. Defaults to &#39;undef&#39;.</p>\n\n<p><em>Note</em>: At the moment, each vhost is limited to a single list of rewrite conditions. In the future, you will be able to specify multiple <code>rewrite_cond</code> and <code>rewrite_rules</code> per vhost, so that different conditions get different rewrites.</p>\n\n<h5><code>rewrite_rule</code></h5>\n\n<p>Creates URL rewrite rules. Defaults to &#39;undef&#39;. This parameter allows you to specify, for example, that anyone trying to access index.html will be served welcome.html.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n }\n</code></pre>\n\n<h5><code>scriptalias</code></h5>\n\n<p>Defines a directory of CGI scripts to be aliased to the path &#39;/cgi-bin&#39;</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Specifies the email address Apache will display when it renders one of its error pages.</p>\n\n<h5><code>serveraliases</code></h5>\n\n<p>Sets the server aliases of the site.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the primary name of the virtual host.</p>\n\n<h5><code>setenv</code></h5>\n\n<p>Used by HTTPD to set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>setenvif</code></h5>\n\n<p>Used by HTTPD to conditionally set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>ssl</code></h5>\n\n<p>Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are &#39;true&#39; or &#39;false&#39;.</p>\n\n<h5><code>ssl_ca</code></h5>\n\n<p>Specifies the certificate authority.</p>\n\n<h5><code>ssl_cert</code></h5>\n\n<p>Specifies the SSL certification.</p>\n\n<h5><code>ssl_certs_dir</code></h5>\n\n<p>Specifies the location of the SSL certification directory. Defaults to <code>/etc/ssl/certs</code>.</p>\n\n<h5><code>ssl_chain</code></h5>\n\n<p>Specifies the SSL chain.</p>\n\n<h5><code>ssl_crl</code></h5>\n\n<p>Specifies the certificate revocation list to use.</p>\n\n<h5><code>ssl_crl_path</code></h5>\n\n<p>Specifies the location of the certificate revocation list.</p>\n\n<h5><code>ssl_key</code></h5>\n\n<p>Specifies the SSL key.</p>\n\n<h5><code>sslproxyengine</code></h5>\n\n<p>Specifies whether to use <code>SSLProxyEngine</code> or not. Defaults to <code>false</code>.</p>\n\n<h5><code>vhost_name</code></h5>\n\n<p>This parameter is for use with name-based virtual hosting. Defaults to &#39;*&#39;.</p>\n\n<h5><code>itk</code></h5>\n\n<p>Hash containing infos to configure itk as per the <a href=\"http://mpm-itk.sesse.net/\">ITK documentation</a>.</p>\n\n<p>Keys could be:</p>\n\n<ul>\n<li>user + group</li>\n<li>assignuseridexpr</li>\n<li>assigngroupidexpr</li>\n<li>maxclientvhost</li>\n<li>nice</li>\n<li>limituidrange (Linux 3.5.0 or newer)</li>\n<li>limitgidrange (Linux 3.5.0 or newer)</li>\n</ul>\n\n<p>Usage will typically look like:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n itk =&gt; {\n user =&gt; &#39;someuser&#39;,\n group =&gt; &#39;somegroup&#39;,\n },\n }\n</code></pre>\n\n<h3>Virtual Host Examples</h3>\n\n<p>The Apache module allows you to set up pretty much any configuration of virtual host you might desire. This section will address some common configurations. Please see the <a href=\"https://github.com/puppetlabs/puppetlabs-apache/tree/main/tests\">Tests section</a> for even more examples.</p>\n\n<p>Configure a vhost with a server administrator</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;third.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n serveradmin =&gt; &#39;admin@example.com&#39;,\n }\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with aliased servers</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sixth.example.com&#39;:\n serveraliases =&gt; [\n &#39;sixth.example.org&#39;,\n &#39;sixth.example.net&#39;,\n ],\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n }\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost with a cgi-bin</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;eleventh.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/eleventh&#39;,\n scriptalias =&gt; &#39;/usr/lib/cgi-bin&#39;,\n }\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with a rack configuration</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;fifteenth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifteenth&#39;,\n rack_base_uris =&gt; [&#39;/rackapp1&#39;, &#39;/rackapp2&#39;],\n }\n</code></pre>\n\n<hr>\n\n<p>Set up a mix of SSL and non-SSL vhosts at the same domain</p>\n\n<pre lang=\"puppet\"><code> #The non-ssl vhost\n apache::vhost { &#39;first.example.com non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n }\n\n #The SSL vhost at the same domain\n apache::vhost { &#39;first.example.com ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost to redirect non-SSL connections to SSL</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sixteenth.example.com non-ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n redirect_status =&gt; &#39;permanent&#39;\n redirect_dest =&gt; &#39;https://sixteenth.example.com/&#39;\n }\n apache::vhost { &#39;sixteenth.example.com ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<hr>\n\n<p>Set up IP-based vhosts on any listen port and have them respond to requests on specific IP addresses. In this example, we will set listening on ports 80 and 81. This is required because the example vhosts are not declared with a port parameter.</p>\n\n<pre lang=\"puppet\"><code> apache::listen { &#39;80&#39;: }\n apache::listen { &#39;81&#39;: }\n</code></pre>\n\n<p>Then we will set up the IP-based vhosts</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;first.example.com&#39;:\n ip =&gt; &#39;10.0.0.10&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ip_based =&gt; true,\n }\n apache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.11&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n ip_based =&gt; true,\n }\n</code></pre>\n\n<hr>\n\n<p>Configure a mix of name-based and IP-based vhosts. First, we will add two IP-based vhosts on 10.0.0.10, one SSL and one non-SSL</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;The first IP-based vhost, non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;80&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first&#39;,\n }\n apache::vhost { &#39;The first IP-based vhost, ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;443&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first-ssl&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<p>Then, we will add two name-based vhosts listening on 10.0.0.20</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n }\n apache::vhost { &#39;third.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n }\n</code></pre>\n\n<p>If you want to add two name-based vhosts so that they will answer on either 10.0.0.10 or 10.0.0.20, you <strong>MUST</strong> declare <code>add_listen =&gt; &#39;false&#39;</code> to disable the otherwise automatic &#39;Listen 80&#39;, as it will conflict with the preceding IP-based vhosts.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n add_listen =&gt; false,\n }\n apache::vhost { &#39;fifth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n add_listen =&gt; false,\n }\n</code></pre>\n\n<h2>Implementation</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<h4>Class: <code>apache::dev</code></h4>\n\n<p>Installs Apache development libraries</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::dev&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::listen</code></h4>\n\n<p>Controls which ports Apache binds to for listening based on the title:</p>\n\n<pre lang=\"puppet\"><code> apache::listen { &#39;80&#39;: }\n apache::listen { &#39;443&#39;: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>Listen</code> directives to the <code>ports.conf</code> file in the Apache httpd configuration directory. <code>apache::listen</code> titles should always take the form of: <code>&lt;port&gt;</code>, <code>&lt;ipv4&gt;:&lt;port&gt;</code>, or <code>[&lt;ipv6&gt;]:&lt;port&gt;</code></p>\n\n<p>Apache httpd requires that <code>Listen</code> directives must be added for every port. The <code>apache::vhost</code> defined type will automatically add <code>Listen</code> directives unless the <code>apache::vhost</code> is passed <code>add_listen =&gt; false</code>.</p>\n\n<h4>Defined Type: <code>apache::namevirtualhost</code></h4>\n\n<p>Enables named-based hosting of a virtual host</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::namevirtualhost`: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>NameVirtualHost</code> directives to the <code>ports.conf</code> file in the Apache https configuration directory. <code>apache::namevirtualhost</code> titles should always take the form of: <code>*</code>, <code>*:&lt;port&gt;</code>, <code>_default_:&lt;port&gt;</code>, <code>&lt;ip&gt;</code>, or <code>&lt;ip&gt;:&lt;port&gt;</code>.</p>\n\n<h4>Defined Type: <code>apache::balancermember</code></h4>\n\n<p>Define members of a proxy_balancer set (mod_proxy_balancer). Very useful when using exported resources.</p>\n\n<p>On every app server you can export a balancermember like this:</p>\n\n<pre lang=\"puppet\"><code> @@apache::balancermember { &quot;${::fqdn}-puppet00&quot;:\n balancer_cluster =&gt; &#39;puppet00&#39;,\n url =&gt; &quot;ajp://${::fqdn}:8009&quot;\n options =&gt; [&#39;ping=5&#39;, &#39;disablereuse=on&#39;, &#39;retry=5&#39;, &#39;ttl=120&#39;],\n }\n</code></pre>\n\n<p>And on the proxy itself you create the balancer cluster using the defined type apache::balancer:</p>\n\n<pre lang=\"puppet\"><code> apache::balancer { &#39;puppet00&#39;: }\n</code></pre>\n\n<p>If you need to use ProxySet in the balncer config you can do as so:</p>\n\n<pre lang=\"puppet\"><code> apache::balancer { &#39;puppet01&#39;:\n proxy_set =&gt; {&#39;stickysession&#39; =&gt; &#39;JSESSIONID&#39;},\n }\n</code></pre>\n\n<h3>Templates</h3>\n\n<p>The Apache module relies heavily on templates to enable the <code>vhost</code> and <code>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>\n\n<h2>Limitations</h2>\n\n<p>This has been tested on Ubuntu Precise, Debian Wheezy, and CentOS 5.8.</p>\n\n<h2>Development</h2>\n\n<h3>Overview</h3>\n\n<p>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>\n\n<p>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>\n\n<p>You can read the complete module contribution guide <a href=\"http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing\">on the Puppet Labs wiki.</a></p>\n\n<h3>Running tests</h3>\n\n<p>This project contains tests for both <a href=\"http://rspec-puppet.com/\">rspec-puppet</a> and <a href=\"https://github.com/puppetlabs/rspec-system\">rspec-system</a> to verify functionality. For in-depth information please see their respective documentation.</p>\n\n<p>Quickstart:</p>\n\n<pre><code>gem install bundler\nbundle install\nbundle exec rake spec\nbundle exec rake spec:system\n</code></pre>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.</p>\n</section>",
458
458
  "changelog": null,
459
459
  "license": "<section class=\"plaintext\"><pre>Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n</pre></section>",
460
460
  "created_at": "2013-09-06 14:49:24 -0700",
@@ -706,7 +706,7 @@
706
706
  "file_size": 52306,
707
707
  "file_md5": "debec531e3b92b356b6d01dbb9a8d6d4",
708
708
  "downloads": 6639,
709
- "readme": "<section class=\"markdown\"><h1>apache</h1>\n\n<h4>Table of Contents</h4>\n\n<ol>\n<li><a href=\"#overview\">Overview - What is the Apache module?</a></li>\n<li><a href=\"#module-description\">Module Description - What does the module do?</a></li>\n<li><a href=\"#setup\">Setup - The basics of getting started with Apache</a>\n\n<ul>\n<li><a href=\"#beginning-with-apache\">Beginning with Apache - Installation</a></li>\n<li><a href=\"#configure-a-virtual-host\">Configure a Virtual Host - Basic options for getting started</a></li>\n</ul></li>\n<li><a href=\"#usage\">Usage - The classes, defined types, and their parameters available for configuration</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a>\n\n<ul>\n<li><a href=\"#class-apache\">Class: apache</a></li>\n<li><a href=\"#classes-apachemodname\">Classes: apache::mod::*</a></li>\n<li><a href=\"#defined-type-apachevhost\">Defined Type: apache::vhost</a></li>\n</ul></li>\n<li><a href=\"#virtual-host-examples\">Virtual Host Examples - Demonstrations of some configuration options</a></li>\n</ul></li>\n<li><a href=\"#implementation\">Implementation - An under-the-hood peek at what the module is doing</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a></li>\n<li><a href=\"#templates\">Templates</a></li>\n</ul></li>\n<li><a href=\"#limitations\">Limitations - OS compatibility, etc.</a></li>\n<li><a href=\"#development\">Development - Guide for contributing to the module</a></li>\n<li><a href=\"#release-notes\">Release Notes - Notes on the most recent updates to the module</a></li>\n</ol>\n\n<h2>Overview</h2>\n\n<p>The Apache module allows you to set up virtual hosts and manage web services with minimal effort.</p>\n\n<h2>Module Description</h2>\n\n<p>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>\n\n<h2>Setup</h2>\n\n<p><strong>What Apache affects:</strong></p>\n\n<ul>\n<li>configuration files and directories (created and written to)\n\n<ul>\n<li><strong>NOTE</strong>: Configurations that are <em>not</em> managed by Puppet will be purged.</li>\n</ul></li>\n<li>package/service/configuration files for Apache</li>\n<li>Apache modules</li>\n<li>virtual hosts</li>\n<li>listened-to ports</li>\n</ul>\n\n<h3>Beginning with Apache</h3>\n\n<p>To install Apache with the default parameters</p>\n\n<pre><code>class { &#39;apache&#39;: }\n</code></pre>\n\n<p>The defaults are determined by your operating system (e.g. Debian systems have one set of defaults, RedHat systems have another). These defaults will work well in a testing environment, but are not suggested for production. To establish customized parameters</p>\n\n<pre><code>class { &#39;apache&#39;:\n default_mods =&gt; false,\n …\n}\n</code></pre>\n\n<h3>Configure a virtual host</h3>\n\n<p>Declaring the <code>apache</code> class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving <code>$apache::docroot</code>.</p>\n\n<pre><code>class { &#39;apache&#39;: }\n</code></pre>\n\n<p>To configure a very basic, name-based virtual host</p>\n\n<pre><code>apache::vhost { &#39;first.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n}\n</code></pre>\n\n<p><em>Note:</em> The default priority is 15. If nothing matches this priority, the alphabetically first name-based vhost will be used. This is also true if you pass a higher priority and no names match anything else.</p>\n\n<p>A slightly more complicated example, which moves the docroot owner/group</p>\n\n<pre><code>apache::vhost { &#39;second.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n docroot_owner =&gt; &#39;third&#39;,\n docroot_group =&gt; &#39;third&#39;,\n}\n</code></pre>\n\n<p>To set up a virtual host with SSL and default SSL certificates</p>\n\n<pre><code>apache::vhost { &#39;ssl.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/ssl&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<p>To set up a virtual host with SSL and specific SSL certificates</p>\n\n<pre><code>apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n ssl =&gt; true,\n ssl_cert =&gt; &#39;/etc/ssl/fourth.example.com.cert&#39;,\n ssl_key =&gt; &#39;/etc/ssl/fourth.example.com.key&#39;,\n}\n</code></pre>\n\n<p>To set up a virtual host with wildcard alias for subdomain mapped to same named directory \n<code>http://examle.com.loc =&gt; /var/www/example.com</code></p>\n\n<pre><code>apache::vhost { &#39;subdomain.loc&#39;:\n vhost_name =&gt; &#39;*&#39;,\n port =&gt; &#39;80&#39;,\n virtual_docroot&#39; =&gt; &#39;/var/www/%-2+&#39;,\n docroot =&gt; &#39;/var/www&#39;,\n serveraliases =&gt; [&#39;*.loc&#39;,],\n}\n</code></pre>\n\n<p>To see a list of all virtual host parameters, <a href=\"#defined-type-apachevhost\">please go here</a>. To see an extensive list of virtual host examples <a href=\"#virtual-host-examples\">please look here</a>.</p>\n\n<h2>Usage</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<p>This module modifies Apache configuration files and directories and will purge any configuration not managed by Puppet. Configuration of Apache should be managed by Puppet, as non-puppet configuration files can cause unexpected failures.</p>\n\n<p>It is possible to temporarily disable full Puppet management by setting the <code>purge_configs</code> parameter within the base <code>apache</code> class to &#39;false&#39;. This option should only be used as a temporary means of saving and relocating customized configurations.</p>\n\n<h4>Class: <code>apache</code></h4>\n\n<p>The Apache module&#39;s primary class, <code>apache</code>, guides the basic setup of Apache on your system.</p>\n\n<p>You may establish a default vhost in this class, the <code>vhost</code> class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the <code>vhost</code> type.</p>\n\n<p><strong>Parameters within <code>apache</code>:</strong></p>\n\n<h5><code>default_mods</code></h5>\n\n<p>Sets up Apache with default settings based on your OS. Defaults to &#39;true&#39;, set to &#39;false&#39; for customized configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets up a default virtual host. Defaults to &#39;true&#39;, set to &#39;false&#39; to set up <a href=\"#configure-a-virtual-host\">customized virtual hosts</a>.</p>\n\n<h5><code>default_ssl_vhost</code></h5>\n\n<p>Sets up a default SSL virtual host. Defaults to &#39;false&#39;.</p>\n\n<pre><code>apache::vhost { &#39;default-ssl&#39;:\n port =&gt; 443,\n ssl =&gt; true,\n docroot =&gt; $docroot,\n scriptalias =&gt; $scriptalias,\n serveradmin =&gt; $serveradmin,\n access_log_file =&gt; &quot;ssl_${access_log_file}&quot;,\n }\n</code></pre>\n\n<p>SSL vhosts only respond to HTTPS queries.</p>\n\n<h5><code>default_ssl_cert</code></h5>\n\n<p>The default SSL certification, which is automatically set based on your operating system (<code>/etc/pki/tls/certs/localhost.crt</code> for RedHat, <code>/etc/ssl/certs/ssl-cert-snakeoil.pem</code> for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_key</code></h5>\n\n<p>The default SSL key, which is automatically set based on your operating system (<code>/etc/pki/tls/private/localhost.key</code> for RedHat, <code>/etc/ssl/private/ssl-cert-snakeoil.key</code> for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_chain</code></h5>\n\n<p>The default SSL chain, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_ca</code></h5>\n\n<p>The default certificate authority, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl_path</code></h5>\n\n<p>The default certificate revocation list path, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl</code></h5>\n\n<p>The default certificate revocation list to use, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>service_enable</code></h5>\n\n<p>Determines whether the &#39;httpd&#39; service is enabled when the machine is booted, meaning Puppet will check the service status to start/stop it. Defaults to &#39;true&#39;, meaning the service is enabled/running.</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Sets the server administrator. Defaults to &#39;root@localhost&#39;.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the servername. Defaults to fqdn provided by facter.</p>\n\n<h5><code>sendfile</code></h5>\n\n<p>Makes Apache use the Linux kernel &#39;sendfile&#39; to serve static files. Defaults to &#39;false&#39;.</p>\n\n<h5><code>error_documents</code></h5>\n\n<p>Enables custom error documents. Defaults to &#39;false&#39;.</p>\n\n<h5><code>confd_dir</code></h5>\n\n<p>Changes the location of the configuration directory your custom configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>vhost_dir</code></h5>\n\n<p>Changes the location of the configuration directory your virtual host configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mod_dir</code></h5>\n\n<p>Changes the location of the configuration directory your Apache modules configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mpm_module</code></h5>\n\n<p>Configures which mpm module is loaded and configured for the httpd process by the <code>apache::mod::prefork</code> and <code>apache::mod::worker</code> classes. Must be set to <code>false</code> to explicitly declare <code>apache::mod::worker</code> or <code>apache::mod::prefork</code> classes with parameters. Valid values are <code>worker</code>, <code>prefork</code>, or the boolean <code>false</code>. Defaults to <code>prefork</code> on RedHat and <code>worker</code> on Debian.</p>\n\n<h5><code>conf_template</code></h5>\n\n<p>Setting this allows you to override the template used for the main apache configuration file. This is a potentially risky thing to do as this module has been built around the concept of a minimal configuration file with most of the configuration coming in the form of conf.d/ entries. Defaults to &#39;apache/httpd.conf.erb&#39;.</p>\n\n<h4>Class: <code>apache::default_mods</code></h4>\n\n<p>Installs default Apache modules based on what OS you are running</p>\n\n<pre><code>class { &#39;apache::default_mods&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::mod</code></h4>\n\n<p>Used to enable arbitrary Apache httpd modules for which there is no specific <code>apache::mod::[name]</code> class. The <code>apache::mod</code> defined type will also install the required packages to enable the module, if any.</p>\n\n<pre><code>apache::mod { &#39;rewrite&#39;: }\napache::mod { &#39;ldap&#39;: }\n</code></pre>\n\n<h4>Classes: <code>apache::mod::[name]</code></h4>\n\n<p>There are many <code>apache::mod::[name]</code> classes within this module that can be declared using <code>include</code>:</p>\n\n<ul>\n<li><code>alias</code></li>\n<li><code>auth_basic</code></li>\n<li><code>auth_kerb</code></li>\n<li><code>autoindex</code></li>\n<li><code>cache</code></li>\n<li><code>cgi</code></li>\n<li><code>cgid</code></li>\n<li><code>dav</code></li>\n<li><code>dav_fs</code></li>\n<li><code>deflate</code></li>\n<li><code>dir</code>*</li>\n<li><code>disk_cache</code></li>\n<li><code>fcgid</code></li>\n<li><code>info</code></li>\n<li><code>ldap</code></li>\n<li><code>mime</code></li>\n<li><code>mime_magic</code></li>\n<li><code>mpm_event</code></li>\n<li><code>negotiation</code></li>\n<li><code>passenger</code>*</li>\n<li><code>perl</code></li>\n<li><code>php</code> (requires <a href=\"#mpm_module\"><code>mpm_module</code></a> set to <code>prefork</code>)</li>\n<li><code>prefork</code>*</li>\n<li><code>proxy</code>*</li>\n<li><code>proxy_html</code></li>\n<li><code>proxy_http</code></li>\n<li><code>python</code></li>\n<li><code>reqtimeout</code></li>\n<li><code>setenvif</code></li>\n<li><code>ssl</code>* (see <a href=\"#class-apachemodssl\">apache::mod::ssl</a> below)</li>\n<li><code>status</code></li>\n<li><code>userdir</code>*</li>\n<li><code>worker</code>*</li>\n<li><code>wsgi</code></li>\n<li><code>xsendfile</code></li>\n</ul>\n\n<p>Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module&#39;s configuration. Most of the time, these parameters will not require any configuration or attention.</p>\n\n<p>The modules mentioned above, and other Apache modules that have templates, will cause template files to be dropped along with the mod install, and the module will not work without the template. Any mod without a template will install package but drop no files.</p>\n\n<h4>Class: <code>apache::mod::ssl</code></h4>\n\n<p>Installs Apache SSL capabilities and utilizes <code>ssl.conf.erb</code> template</p>\n\n<pre><code>class { &#39;apache::mod::ssl&#39;: }\n</code></pre>\n\n<p>To <em>use</em> SSL with a virtual host, you must either set the<code>default_ssl_vhost</code> parameter in <code>apache</code> to &#39;true&#39; or set the <code>ssl</code> parameter in <code>apache::vhost</code> to &#39;true&#39;.</p>\n\n<h4>Defined Type: <code>apache::vhost</code></h4>\n\n<p>The Apache module allows a lot of flexibility in the set up and configuration of virtual hosts. This flexibility is due, in part, to <code>vhost</code>&#39;s setup as a defined resource type, which allows it to be evaluated multiple times with different parameters.</p>\n\n<p>The <code>vhost</code> defined type allows you to have specialized configurations for virtual hosts that have requirements outside of the defaults. You can set up a default vhost within the base <code>apache</code> class as well as set a customized vhost setup as default. Your customized vhost (priority 10) will be privileged over the base class vhost (15).</p>\n\n<p>If you have a series of specific configurations and do not want a base <code>apache</code> class default vhost, make sure to set the base class default host to &#39;false&#39;.</p>\n\n<pre><code>class { &#39;apache&#39;:\n default_vhost =&gt; false,\n}\n</code></pre>\n\n<p><strong>Parameters within <code>apache::vhost</code>:</strong></p>\n\n<p>The default values for each parameter will vary based on operating system and type of virtual host.</p>\n\n<h5><code>access_log</code></h5>\n\n<p>Specifies whether <code>*_access.log</code> directives should be configured. Valid values are &#39;true&#39; and &#39;false&#39;. Defaults to &#39;true&#39;.</p>\n\n<h5><code>access_log_file</code></h5>\n\n<p>Points to the <code>*_access.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_pipe</code></h5>\n\n<p>Specifies a pipe to send access log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_format</code></h5>\n\n<p>Specifies either a LogFormat nickname or custom format string for access log. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>add_listen</code></h5>\n\n<p>Determines whether the vhost creates a listen statement. The default value is &#39;true&#39;.</p>\n\n<p>Setting <code>add_listen</code> to &#39;false&#39; stops the vhost from creating a listen statement, and this is important when you combine vhosts that are not passed an <code>ip</code> parameter with vhosts that <em>are</em> passed the <code>ip</code> parameter.</p>\n\n<h5><code>aliases</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>Alias</code> statements as per the <a href=\"http://httpd.apache.org/docs/current/mod/mod_alias.html\"><code>mod_alias</code> documentation</a>. Each hash is expected to be of the form:</p>\n\n<pre lang=\"ruby\"><code>aliases =&gt; [ { alias =&gt; &#39;/alias&#39;, path =&gt; &#39;/path/to/directory&#39; } ],\n</code></pre>\n\n<p>For <code>Alias</code> to work, each will need a corresponding <code>&lt;Directory /path/to/directory&gt;</code> or <code>&lt;Location /path/to/directory&gt;</code> block.</p>\n\n<p><strong>Note:</strong> If <code>apache::mod::passenger</code> is loaded and <code>PassengerHighPerformance true</code> is set, then <code>Alias</code> may have issues honouring the <code>PassengerEnabled off</code> statement. See <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">this article</a> for details.</p>\n\n<h5><code>block</code></h5>\n\n<p>Specifies the list of things Apache will block access to. The default is an empty set, &#39;[]&#39;. Currently, the only option is &#39;scm&#39;, which blocks web access to .svn, .git and .bzr directories. To add to this, please see the <a href=\"#development\">Development</a> section.</p>\n\n<h5><code>custom_fragment</code></h5>\n\n<p>Pass a string of custom configuration directives to be placed at the end of the vhost configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets a given <code>apache::vhost</code> as the default to serve requests that do not match any other <code>apache::vhost</code> definitions. The default value is &#39;false&#39;.</p>\n\n<h5><code>directories</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>&lt;Directory /path/to/directory&gt;...&lt;/Directory&gt;</code> directive blocks as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#directory\">Apache core documentation</a>. The <code>path</code> key is required in these hashes. Usage will typically look like:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [\n { path =&gt; &#39;/path/to/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n { path =&gt; &#39;/path/to/another/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n ],\n}\n</code></pre>\n\n<p><em>Note:</em> At least one directory should match <code>docroot</code> parameter, once you start declaring directories <code>apache::vhost</code> assumes that all required <code>&lt;Directory&gt;</code> blocks will be declared.</p>\n\n<p><em>Note:</em> If not defined a single default <code>&lt;Directory&gt;</code> block will be created that matches the <code>docroot</code> parameter.</p>\n\n<p>The directives will be embedded within the <code>Directory</code> directive block, missing directives should be undefined and not be added, resulting in their default vaules in Apache. Currently this is the list of supported directives:</p>\n\n<h6><code>addhandlers</code></h6>\n\n<p>Sets <code>AddHandler</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addhandler\">Apache Core documentation</a>. Accepts a list of hashes of the form <code>{ handler =&gt; &#39;handler-name&#39;, extensions =&gt; [&#39;extension&#39;]}</code>. Note that <code>extensions</code> is a list of extenstions being handled by the handler.\nAn example: </p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;,\n addhandlers =&gt; [ { handler =&gt; &#39;cgi-script&#39;, extensions =&gt; [&#39;.cgi&#39;]} ],\n } ],\n}\n</code></pre>\n\n<h6><code>allow</code></h6>\n\n<p>Sets an <code>Allow</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow\">Apache Core documentation</a>. An example:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow =&gt; &#39;from example.org&#39; } ],\n}\n</code></pre>\n\n<h6><code>allow_override</code></h6>\n\n<p>Sets the usage of <code>.htaccess</code> files as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride\">Apache core documentation</a>. Should accept in the form of a list or a string. An example:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow_override =&gt; [&#39;AuthConfig&#39;, &#39;Indexes&#39;] } ],\n}\n</code></pre>\n\n<h6><code>deny</code></h6>\n\n<p>Sets an <code>Deny</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#deny\">Apache Core documentation</a>. An example:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, deny =&gt; &#39;from example.org&#39; } ],\n}\n</code></pre>\n\n<h6><code>options</code></h6>\n\n<p>Lists the options for the given <code>&lt;Directory&gt;</code> block</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;] }],\n}\n</code></pre>\n\n<h6><code>order</code></h6>\n\n<p>Sets the order of processing <code>Allow</code> and <code>Deny</code> statements as per <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order\">Apache core documentation</a>. An example:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, order =&gt; &#39;Allow, Deny&#39; } ],\n}\n</code></pre>\n\n<h6><code>passenger_enabled</code></h6>\n\n<p>Sets the value for the <code>PassengerEnabled</code> directory to <code>on</code> or <code>off</code> as per the <a href=\"http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerEnabled\">Passenger documentation</a>.</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, passenger_enabled =&gt; &#39;off&#39; } ],\n}\n</code></pre>\n\n<p><strong>Note:</strong> This directive requires <code>apache::mod::passenger</code> to be active, Apache may not start with an unrecognised directive without it.</p>\n\n<p><strong>Note:</strong> Be aware that there is an <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">issue</a> using the <code>PassengerEnabled</code> directive with the <code>PassengerHighPerformance</code> directive.</p>\n\n<h5><code>docroot</code></h5>\n\n<p>Provides the DocumentRoot directive, identifying the directory Apache serves files from.</p>\n\n<h5><code>docroot_group</code></h5>\n\n<p>Sets group access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>docroot_owner</code></h5>\n\n<p>Sets individual user access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>error_log</code></h5>\n\n<p>Specifies whether <code>*_error.log</code> directives should be configured. Defaults to &#39;true&#39;.</p>\n\n<h5><code>error_log_file</code></h5>\n\n<p>Points to the <code>*_error.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_log_pipe</code></h5>\n\n<p>Specifies a pipe to send error log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ensure</code></h5>\n\n<p>Specifies if the vhost file is present or absent.</p>\n\n<h5><code>ip</code></h5>\n\n<p>The IP address the vhost listens on. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ip_based</code></h5>\n\n<p>Enables an IP-based vhost. This parameter inhibits the creation of a NameVirtualHost directive, since those are used to funnel requests to name-based vhosts. Defaults to &#39;false&#39;.</p>\n\n<h5><code>logroot</code></h5>\n\n<p>Specifies the location of the virtual host&#39;s logfiles. Defaults to <code>/var/log/&lt;apache log location&gt;/</code>.</p>\n\n<h5><code>no_proxy_uris</code></h5>\n\n<p>Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with <code>proxy_dest</code>.</p>\n\n<h5><code>options</code></h5>\n\n<p>Lists the options for the given virtual host</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;],\n}\n</code></pre>\n\n<h5><code>override</code></h5>\n\n<p>Sets the overrides for the given virtual host. Accepts an array of AllowOverride arguments.</p>\n\n<h5><code>port</code></h5>\n\n<p>Sets the port the host is configured on.</p>\n\n<h5><code>priority</code></h5>\n\n<p>Sets the relative load-order for Apache httpd VirtualHost configuration files. Defaults to &#39;25&#39;.</p>\n\n<p>If nothing matches the priority, the first name-based vhost will be used. Likewise, passing a higher priority will cause the alphabetically first name-based vhost to be used if no other names match.</p>\n\n<p><em>Note</em>: You should not need to use this parameter. However, if you do use it, be aware that the <code>default_vhost</code> parameter for <code>apache::vhost</code> passes a priority of &#39;15&#39;.</p>\n\n<h5><code>proxy_dest</code></h5>\n\n<p>Specifies the destination address of a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>proxy_pass</code></h5>\n\n<p>Specifies an array of path =&gt; uri for a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<p>Example:\n$proxy_pass = [\n { &#39;path&#39; =&gt; &#39;/a&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/&#39; },\n { &#39;path&#39; =&gt; &#39;/b&#39;, &#39;url&#39; =&gt; &#39;http://backend-b/&#39; },\n { &#39;path&#39; =&gt; &#39;/c&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/c&#39; },\n]</p>\n\n<p>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n proxy_pass =&gt; $proxy_pass,\n}</p>\n\n<h5><code>rack_base_uris</code></h5>\n\n<p>Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for passenger/rack in the <code>_rack.erb</code> template. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_dest</code></h5>\n\n<p>Specifies the address to redirect to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_source</code></h5>\n\n<p>Specifies the source items? that will redirect to the destination specified in <code>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>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_source =&gt; [&#39;/images&#39;,&#39;/downloads&#39;],\n redirect_dest =&gt; [&#39;http://img.example.com/&#39;,&#39;http://downloads.example.com/&#39;],\n}\n</code></pre>\n\n<h5><code>redirect_status</code></h5>\n\n<p>Specifies the status to append to the redirect. Defaults to &#39;undef&#39;.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_status =&gt; [&#39;temp&#39;,&#39;permanent&#39;],\n}\n</code></pre>\n\n<h5><code>request_headers</code></h5>\n\n<p>Specifies additional request headers.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n request_headers =&gt; [\n &#39;append MirrorID &quot;mirror 12&quot;&#39;,\n &#39;unset MirrorID&#39;,\n ],\n}\n</code></pre>\n\n<h5><code>rewrite_base</code></h5>\n\n<p>Limits the <code>rewrite_rule</code> to the specified base URL. Defaults to &#39;undef&#39;.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n rewrite_base =&gt; &#39;/blog/&#39;,\n}\n</code></pre>\n\n<p>The above example would limit the index.html -&gt; welcome.html rewrite to only something inside of <a href=\"http://example.com/blog/\">http://example.com/blog/</a>.</p>\n\n<h5><code>rewrite_cond</code></h5>\n\n<p>Rewrites a URL via <code>rewrite_rule</code> based on the truth of specified conditions. For example</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_cond =&gt; &#39;%{HTTP_USER_AGENT} ^MSIE&#39;,\n}\n</code></pre>\n\n<p>will rewrite URLs only if the visitor is using IE. Defaults to &#39;undef&#39;.</p>\n\n<p><em>Note</em>: At the moment, each vhost is limited to a single list of rewrite conditions. In the future, you will be able to specify multiple <code>rewrite_cond</code> and <code>rewrite_rules</code> per vhost, so that different conditions get different rewrites.</p>\n\n<h5><code>rewrite_rule</code></h5>\n\n<p>Creates URL rewrite rules. Defaults to &#39;undef&#39;. This parameter allows you to specify, for example, that anyone trying to access index.html will be served welcome.html.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n}\n</code></pre>\n\n<h5><code>scriptalias</code></h5>\n\n<p>Defines a directory of CGI scripts to be aliased to the path &#39;/cgi-bin&#39;</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Specifies the email address Apache will display when it renders one of its error pages.</p>\n\n<h5><code>serveraliases</code></h5>\n\n<p>Sets the server aliases of the site.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the primary name of the virtual host.</p>\n\n<h5><code>setenv</code></h5>\n\n<p>Used by HTTPD to set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>setenvif</code></h5>\n\n<p>Used by HTTPD to conditionally set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>ssl</code></h5>\n\n<p>Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are &#39;true&#39; or &#39;false&#39;.</p>\n\n<h5><code>ssl_ca</code></h5>\n\n<p>Specifies the certificate authority.</p>\n\n<h5><code>ssl_cert</code></h5>\n\n<p>Specifies the SSL certification.</p>\n\n<h5><code>ssl_certs_dir</code></h5>\n\n<p>Specifies the location of the SSL certification directory. Defaults to <code>/etc/ssl/certs</code>.</p>\n\n<h5><code>ssl_chain</code></h5>\n\n<p>Specifies the SSL chain.</p>\n\n<h5><code>ssl_crl</code></h5>\n\n<p>Specifies the certificate revocation list to use.</p>\n\n<h5><code>ssl_crl_path</code></h5>\n\n<p>Specifies the location of the certificate revocation list.</p>\n\n<h5><code>ssl_key</code></h5>\n\n<p>Specifies the SSL key.</p>\n\n<h5><code>vhost_name</code></h5>\n\n<p>This parameter is for use with name-based virtual hosting. Defaults to &#39;*&#39;.</p>\n\n<h3>Virtual Host Examples</h3>\n\n<p>The Apache module allows you to set up pretty much any configuration of virtual host you might desire. This section will address some common configurations. Please see the <a href=\"https://github.com/puppetlabs/puppetlabs-apache/tree/master/tests\">Tests section</a> for even more examples.</p>\n\n<p>Configure a vhost with a server administrator</p>\n\n<pre><code>apache::vhost { &#39;third.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n serveradmin =&gt; &#39;admin@example.com&#39;,\n}\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with aliased servers</p>\n\n<pre><code>apache::vhost { &#39;sixth.example.com&#39;:\n serveraliases =&gt; [\n &#39;sixth.example.org&#39;,\n &#39;sixth.example.net&#39;,\n ],\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n}\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost with a cgi-bin</p>\n\n<pre><code>apache::vhost { &#39;eleventh.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/eleventh&#39;,\n scriptalias =&gt; &#39;/usr/lib/cgi-bin&#39;,\n}\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with a rack configuration</p>\n\n<pre><code>apache::vhost { &#39;fifteenth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifteenth&#39;,\n rack_base_uris =&gt; [&#39;/rackapp1&#39;, &#39;/rackapp2&#39;],\n}\n</code></pre>\n\n<hr>\n\n<p>Set up a mix of SSL and non-SSL vhosts at the same domain</p>\n\n<pre><code>#The non-ssl vhost\napache::vhost { &#39;first.example.com non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n}\n\n#The SSL vhost at the same domain\napache::vhost { &#39;first.example.com ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost to redirect non-SSL connections to SSL</p>\n\n<pre><code>apache::vhost { &#39;sixteenth.example.com non-ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n redirect_status =&gt; &#39;permanent&#39;\n redirect_dest =&gt; &#39;https://sixteenth.example.com/&#39; \n}\napache::vhost { &#39;sixteenth.example.com ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<hr>\n\n<p>Set up IP-based vhosts on any listen port and have them respond to requests on specific IP addresses. In this example, we will set listening on ports 80 and 81. This is required because the example vhosts are not declared with a port parameter.</p>\n\n<pre><code>apache::listen { &#39;80&#39;: }\napache::listen { &#39;81&#39;: }\n</code></pre>\n\n<p>Then we will set up the IP-based vhosts</p>\n\n<pre><code>apache::vhost { &#39;first.example.com&#39;:\n ip =&gt; &#39;10.0.0.10&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ip_based =&gt; true,\n}\napache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.11&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n ip_based =&gt; true,\n}\n</code></pre>\n\n<hr>\n\n<p>Configure a mix of name-based and IP-based vhosts. First, we will add two IP-based vhosts on 10.0.0.10, one SSL and one non-SSL</p>\n\n<pre><code>apache::vhost { &#39;The first IP-based vhost, non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;80&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first&#39;,\n}\napache::vhost { &#39;The first IP-based vhost, ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;443&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first-ssl&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<p>Then, we will add two name-based vhosts listening on 10.0.0.20</p>\n\n<pre><code>apache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n}\napache::vhost { &#39;third.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n}\n</code></pre>\n\n<p>If you want to add two name-based vhosts so that they will answer on either 10.0.0.10 or 10.0.0.20, you <strong>MUST</strong> declare <code>add_listen =&gt; &#39;false&#39;</code> to disable the otherwise automatic &#39;Listen 80&#39;, as it will conflict with the preceding IP-based vhosts.</p>\n\n<pre><code>apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n add_listen =&gt; false,\n}\napache::vhost { &#39;fifth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n add_listen =&gt; false,\n}\n</code></pre>\n\n<h2>Implementation</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<h4>Class: <code>apache::dev</code></h4>\n\n<p>Installs Apache development libraries</p>\n\n<pre><code>class { &#39;apache::dev&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::listen</code></h4>\n\n<p>Controls which ports Apache binds to for listening based on the title:</p>\n\n<pre><code>apache::listen { &#39;80&#39;: }\napache::listen { &#39;443&#39;: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>Listen</code> directives to the <code>ports.conf</code> file in the Apache httpd configuration directory. <code>apache::listen</code> titles should always take the form of: <code>&lt;port&gt;</code>, <code>&lt;ipv4&gt;:&lt;port&gt;</code>, or <code>[&lt;ipv6&gt;]:&lt;port&gt;</code></p>\n\n<p>Apache httpd requires that <code>Listen</code> directives must be added for every port. The <code>apache::vhost</code> defined type will automatically add <code>Listen</code> directives unless the <code>apache::vhost</code> is passed <code>add_listen =&gt; false</code>.</p>\n\n<h4>Defined Type: <code>apache::namevirtualhost</code></h4>\n\n<p>Enables named-based hosting of a virtual host</p>\n\n<pre><code>class { &#39;apache::namevirtualhost`: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>NameVirtualHost</code> directives to the <code>ports.conf</code> file in the Apache https configuration directory. <code>apache::namevirtualhost</code> titles should always take the form of: <code>*</code>, <code>*:&lt;port&gt;</code>, <code>_default_:&lt;port&gt;</code>, <code>&lt;ip&gt;</code>, or <code>&lt;ip&gt;:&lt;port&gt;</code>.</p>\n\n<h4>Defined Type: <code>apache::balancermember</code></h4>\n\n<p>Define members of a proxy_balancer set (mod_proxy_balancer). Very useful when using exported resources.</p>\n\n<p>On every app server you can export a balancermember like this:</p>\n\n<pre><code> @@apache::balancermember { &quot;${::fqdn}-puppet00&quot;:\n balancer_cluster =&gt; &#39;puppet00&#39;,\n url =&gt; &quot;ajp://${::fqdn}:8009&quot;\n options =&gt; [&#39;ping=5&#39;, &#39;disablereuse=on&#39;, &#39;retry=5&#39;, &#39;ttl=120&#39;],\n }\n</code></pre>\n\n<p>And on the proxy itself you create the balancer cluster using the defined type apache::balancer:</p>\n\n<pre><code> apache::balancer { &#39;puppet00&#39;: }\n</code></pre>\n\n<p>If you need to use ProxySet in the balncer config you can do as so:</p>\n\n<pre><code> apache::balancer { &#39;puppet01&#39;:\n proxy_set =&gt; {&#39;stickysession&#39; =&gt; &#39;JSESSIONID&#39;},\n }\n</code></pre>\n\n<h3>Templates</h3>\n\n<p>The Apache module relies heavily on templates to enable the <code>vhost</code> and <code>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>\n\n<h2>Limitations</h2>\n\n<p>This has been tested on Ubuntu Precise, Debian Wheezy, and CentOS 5.8.</p>\n\n<h2>Development</h2>\n\n<h3>Overview</h3>\n\n<p>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>\n\n<p>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>\n\n<p>You can read the complete module contribution guide <a href=\"http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing\">on the Puppet Labs wiki.</a></p>\n\n<h3>Running tests</h3>\n\n<p>This project contains tests for both <a href=\"http://rspec-puppet.com/\">rspec-puppet</a> and <a href=\"https://github.com/puppetlabs/rspec-system\">rspec-system</a> to verify functionality. For in-depth information please see their respective documentation.</p>\n\n<p>Quickstart:</p>\n\n<pre><code>gem install bundler\nbundle install\nbundle exec rake spec\nbundle exec rake spec:system\n</code></pre>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.</p>\n</section>",
709
+ "readme": "<section class=\"markdown\"><h1>apache</h1>\n\n<h4>Table of Contents</h4>\n\n<ol>\n<li><a href=\"#overview\">Overview - What is the Apache module?</a></li>\n<li><a href=\"#module-description\">Module Description - What does the module do?</a></li>\n<li><a href=\"#setup\">Setup - The basics of getting started with Apache</a>\n\n<ul>\n<li><a href=\"#beginning-with-apache\">Beginning with Apache - Installation</a></li>\n<li><a href=\"#configure-a-virtual-host\">Configure a Virtual Host - Basic options for getting started</a></li>\n</ul></li>\n<li><a href=\"#usage\">Usage - The classes, defined types, and their parameters available for configuration</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a>\n\n<ul>\n<li><a href=\"#class-apache\">Class: apache</a></li>\n<li><a href=\"#classes-apachemodname\">Classes: apache::mod::*</a></li>\n<li><a href=\"#defined-type-apachevhost\">Defined Type: apache::vhost</a></li>\n</ul></li>\n<li><a href=\"#virtual-host-examples\">Virtual Host Examples - Demonstrations of some configuration options</a></li>\n</ul></li>\n<li><a href=\"#implementation\">Implementation - An under-the-hood peek at what the module is doing</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a></li>\n<li><a href=\"#templates\">Templates</a></li>\n</ul></li>\n<li><a href=\"#limitations\">Limitations - OS compatibility, etc.</a></li>\n<li><a href=\"#development\">Development - Guide for contributing to the module</a></li>\n<li><a href=\"#release-notes\">Release Notes - Notes on the most recent updates to the module</a></li>\n</ol>\n\n<h2>Overview</h2>\n\n<p>The Apache module allows you to set up virtual hosts and manage web services with minimal effort.</p>\n\n<h2>Module Description</h2>\n\n<p>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>\n\n<h2>Setup</h2>\n\n<p><strong>What Apache affects:</strong></p>\n\n<ul>\n<li>configuration files and directories (created and written to)\n\n<ul>\n<li><strong>NOTE</strong>: Configurations that are <em>not</em> managed by Puppet will be purged.</li>\n</ul></li>\n<li>package/service/configuration files for Apache</li>\n<li>Apache modules</li>\n<li>virtual hosts</li>\n<li>listened-to ports</li>\n</ul>\n\n<h3>Beginning with Apache</h3>\n\n<p>To install Apache with the default parameters</p>\n\n<pre><code>class { &#39;apache&#39;: }\n</code></pre>\n\n<p>The defaults are determined by your operating system (e.g. Debian systems have one set of defaults, RedHat systems have another). These defaults will work well in a testing environment, but are not suggested for production. To establish customized parameters</p>\n\n<pre><code>class { &#39;apache&#39;:\n default_mods =&gt; false,\n …\n}\n</code></pre>\n\n<h3>Configure a virtual host</h3>\n\n<p>Declaring the <code>apache</code> class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving <code>$apache::docroot</code>.</p>\n\n<pre><code>class { &#39;apache&#39;: }\n</code></pre>\n\n<p>To configure a very basic, name-based virtual host</p>\n\n<pre><code>apache::vhost { &#39;first.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n}\n</code></pre>\n\n<p><em>Note:</em> The default priority is 15. If nothing matches this priority, the alphabetically first name-based vhost will be used. This is also true if you pass a higher priority and no names match anything else.</p>\n\n<p>A slightly more complicated example, which moves the docroot owner/group</p>\n\n<pre><code>apache::vhost { &#39;second.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n docroot_owner =&gt; &#39;third&#39;,\n docroot_group =&gt; &#39;third&#39;,\n}\n</code></pre>\n\n<p>To set up a virtual host with SSL and default SSL certificates</p>\n\n<pre><code>apache::vhost { &#39;ssl.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/ssl&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<p>To set up a virtual host with SSL and specific SSL certificates</p>\n\n<pre><code>apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n ssl =&gt; true,\n ssl_cert =&gt; &#39;/etc/ssl/fourth.example.com.cert&#39;,\n ssl_key =&gt; &#39;/etc/ssl/fourth.example.com.key&#39;,\n}\n</code></pre>\n\n<p>To set up a virtual host with wildcard alias for subdomain mapped to same named directory \n<code>http://examle.com.loc =&gt; /var/www/example.com</code></p>\n\n<pre><code>apache::vhost { &#39;subdomain.loc&#39;:\n vhost_name =&gt; &#39;*&#39;,\n port =&gt; &#39;80&#39;,\n virtual_docroot&#39; =&gt; &#39;/var/www/%-2+&#39;,\n docroot =&gt; &#39;/var/www&#39;,\n serveraliases =&gt; [&#39;*.loc&#39;,],\n}\n</code></pre>\n\n<p>To see a list of all virtual host parameters, <a href=\"#defined-type-apachevhost\">please go here</a>. To see an extensive list of virtual host examples <a href=\"#virtual-host-examples\">please look here</a>.</p>\n\n<h2>Usage</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<p>This module modifies Apache configuration files and directories and will purge any configuration not managed by Puppet. Configuration of Apache should be managed by Puppet, as non-puppet configuration files can cause unexpected failures.</p>\n\n<p>It is possible to temporarily disable full Puppet management by setting the <code>purge_configs</code> parameter within the base <code>apache</code> class to &#39;false&#39;. This option should only be used as a temporary means of saving and relocating customized configurations.</p>\n\n<h4>Class: <code>apache</code></h4>\n\n<p>The Apache module&#39;s primary class, <code>apache</code>, guides the basic setup of Apache on your system.</p>\n\n<p>You may establish a default vhost in this class, the <code>vhost</code> class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the <code>vhost</code> type.</p>\n\n<p><strong>Parameters within <code>apache</code>:</strong></p>\n\n<h5><code>default_mods</code></h5>\n\n<p>Sets up Apache with default settings based on your OS. Defaults to &#39;true&#39;, set to &#39;false&#39; for customized configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets up a default virtual host. Defaults to &#39;true&#39;, set to &#39;false&#39; to set up <a href=\"#configure-a-virtual-host\">customized virtual hosts</a>.</p>\n\n<h5><code>default_ssl_vhost</code></h5>\n\n<p>Sets up a default SSL virtual host. Defaults to &#39;false&#39;.</p>\n\n<pre><code>apache::vhost { &#39;default-ssl&#39;:\n port =&gt; 443,\n ssl =&gt; true,\n docroot =&gt; $docroot,\n scriptalias =&gt; $scriptalias,\n serveradmin =&gt; $serveradmin,\n access_log_file =&gt; &quot;ssl_${access_log_file}&quot;,\n }\n</code></pre>\n\n<p>SSL vhosts only respond to HTTPS queries.</p>\n\n<h5><code>default_ssl_cert</code></h5>\n\n<p>The default SSL certification, which is automatically set based on your operating system (<code>/etc/pki/tls/certs/localhost.crt</code> for RedHat, <code>/etc/ssl/certs/ssl-cert-snakeoil.pem</code> for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_key</code></h5>\n\n<p>The default SSL key, which is automatically set based on your operating system (<code>/etc/pki/tls/private/localhost.key</code> for RedHat, <code>/etc/ssl/private/ssl-cert-snakeoil.key</code> for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_chain</code></h5>\n\n<p>The default SSL chain, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_ca</code></h5>\n\n<p>The default certificate authority, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl_path</code></h5>\n\n<p>The default certificate revocation list path, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl</code></h5>\n\n<p>The default certificate revocation list to use, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>service_enable</code></h5>\n\n<p>Determines whether the &#39;httpd&#39; service is enabled when the machine is booted, meaning Puppet will check the service status to start/stop it. Defaults to &#39;true&#39;, meaning the service is enabled/running.</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Sets the server administrator. Defaults to &#39;root@localhost&#39;.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the servername. Defaults to fqdn provided by facter.</p>\n\n<h5><code>sendfile</code></h5>\n\n<p>Makes Apache use the Linux kernel &#39;sendfile&#39; to serve static files. Defaults to &#39;false&#39;.</p>\n\n<h5><code>error_documents</code></h5>\n\n<p>Enables custom error documents. Defaults to &#39;false&#39;.</p>\n\n<h5><code>confd_dir</code></h5>\n\n<p>Changes the location of the configuration directory your custom configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>vhost_dir</code></h5>\n\n<p>Changes the location of the configuration directory your virtual host configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mod_dir</code></h5>\n\n<p>Changes the location of the configuration directory your Apache modules configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mpm_module</code></h5>\n\n<p>Configures which mpm module is loaded and configured for the httpd process by the <code>apache::mod::prefork</code> and <code>apache::mod::worker</code> classes. Must be set to <code>false</code> to explicitly declare <code>apache::mod::worker</code> or <code>apache::mod::prefork</code> classes with parameters. Valid values are <code>worker</code>, <code>prefork</code>, or the boolean <code>false</code>. Defaults to <code>prefork</code> on RedHat and <code>worker</code> on Debian.</p>\n\n<h5><code>conf_template</code></h5>\n\n<p>Setting this allows you to override the template used for the main apache configuration file. This is a potentially risky thing to do as this module has been built around the concept of a minimal configuration file with most of the configuration coming in the form of conf.d/ entries. Defaults to &#39;apache/httpd.conf.erb&#39;.</p>\n\n<h4>Class: <code>apache::default_mods</code></h4>\n\n<p>Installs default Apache modules based on what OS you are running</p>\n\n<pre><code>class { &#39;apache::default_mods&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::mod</code></h4>\n\n<p>Used to enable arbitrary Apache httpd modules for which there is no specific <code>apache::mod::[name]</code> class. The <code>apache::mod</code> defined type will also install the required packages to enable the module, if any.</p>\n\n<pre><code>apache::mod { &#39;rewrite&#39;: }\napache::mod { &#39;ldap&#39;: }\n</code></pre>\n\n<h4>Classes: <code>apache::mod::[name]</code></h4>\n\n<p>There are many <code>apache::mod::[name]</code> classes within this module that can be declared using <code>include</code>:</p>\n\n<ul>\n<li><code>alias</code></li>\n<li><code>auth_basic</code></li>\n<li><code>auth_kerb</code></li>\n<li><code>autoindex</code></li>\n<li><code>cache</code></li>\n<li><code>cgi</code></li>\n<li><code>cgid</code></li>\n<li><code>dav</code></li>\n<li><code>dav_fs</code></li>\n<li><code>deflate</code></li>\n<li><code>dir</code>*</li>\n<li><code>disk_cache</code></li>\n<li><code>fcgid</code></li>\n<li><code>info</code></li>\n<li><code>ldap</code></li>\n<li><code>mime</code></li>\n<li><code>mime_magic</code></li>\n<li><code>mpm_event</code></li>\n<li><code>negotiation</code></li>\n<li><code>passenger</code>*</li>\n<li><code>perl</code></li>\n<li><code>php</code> (requires <a href=\"#mpm_module\"><code>mpm_module</code></a> set to <code>prefork</code>)</li>\n<li><code>prefork</code>*</li>\n<li><code>proxy</code>*</li>\n<li><code>proxy_html</code></li>\n<li><code>proxy_http</code></li>\n<li><code>python</code></li>\n<li><code>reqtimeout</code></li>\n<li><code>setenvif</code></li>\n<li><code>ssl</code>* (see <a href=\"#class-apachemodssl\">apache::mod::ssl</a> below)</li>\n<li><code>status</code></li>\n<li><code>userdir</code>*</li>\n<li><code>worker</code>*</li>\n<li><code>wsgi</code></li>\n<li><code>xsendfile</code></li>\n</ul>\n\n<p>Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module&#39;s configuration. Most of the time, these parameters will not require any configuration or attention.</p>\n\n<p>The modules mentioned above, and other Apache modules that have templates, will cause template files to be dropped along with the mod install, and the module will not work without the template. Any mod without a template will install package but drop no files.</p>\n\n<h4>Class: <code>apache::mod::ssl</code></h4>\n\n<p>Installs Apache SSL capabilities and utilizes <code>ssl.conf.erb</code> template</p>\n\n<pre><code>class { &#39;apache::mod::ssl&#39;: }\n</code></pre>\n\n<p>To <em>use</em> SSL with a virtual host, you must either set the<code>default_ssl_vhost</code> parameter in <code>apache</code> to &#39;true&#39; or set the <code>ssl</code> parameter in <code>apache::vhost</code> to &#39;true&#39;.</p>\n\n<h4>Defined Type: <code>apache::vhost</code></h4>\n\n<p>The Apache module allows a lot of flexibility in the set up and configuration of virtual hosts. This flexibility is due, in part, to <code>vhost</code>&#39;s setup as a defined resource type, which allows it to be evaluated multiple times with different parameters.</p>\n\n<p>The <code>vhost</code> defined type allows you to have specialized configurations for virtual hosts that have requirements outside of the defaults. You can set up a default vhost within the base <code>apache</code> class as well as set a customized vhost setup as default. Your customized vhost (priority 10) will be privileged over the base class vhost (15).</p>\n\n<p>If you have a series of specific configurations and do not want a base <code>apache</code> class default vhost, make sure to set the base class default host to &#39;false&#39;.</p>\n\n<pre><code>class { &#39;apache&#39;:\n default_vhost =&gt; false,\n}\n</code></pre>\n\n<p><strong>Parameters within <code>apache::vhost</code>:</strong></p>\n\n<p>The default values for each parameter will vary based on operating system and type of virtual host.</p>\n\n<h5><code>access_log</code></h5>\n\n<p>Specifies whether <code>*_access.log</code> directives should be configured. Valid values are &#39;true&#39; and &#39;false&#39;. Defaults to &#39;true&#39;.</p>\n\n<h5><code>access_log_file</code></h5>\n\n<p>Points to the <code>*_access.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_pipe</code></h5>\n\n<p>Specifies a pipe to send access log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_format</code></h5>\n\n<p>Specifies either a LogFormat nickname or custom format string for access log. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>add_listen</code></h5>\n\n<p>Determines whether the vhost creates a listen statement. The default value is &#39;true&#39;.</p>\n\n<p>Setting <code>add_listen</code> to &#39;false&#39; stops the vhost from creating a listen statement, and this is important when you combine vhosts that are not passed an <code>ip</code> parameter with vhosts that <em>are</em> passed the <code>ip</code> parameter.</p>\n\n<h5><code>aliases</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>Alias</code> statements as per the <a href=\"http://httpd.apache.org/docs/current/mod/mod_alias.html\"><code>mod_alias</code> documentation</a>. Each hash is expected to be of the form:</p>\n\n<pre lang=\"ruby\"><code>aliases =&gt; [ { alias =&gt; &#39;/alias&#39;, path =&gt; &#39;/path/to/directory&#39; } ],\n</code></pre>\n\n<p>For <code>Alias</code> to work, each will need a corresponding <code>&lt;Directory /path/to/directory&gt;</code> or <code>&lt;Location /path/to/directory&gt;</code> block.</p>\n\n<p><strong>Note:</strong> If <code>apache::mod::passenger</code> is loaded and <code>PassengerHighPerformance true</code> is set, then <code>Alias</code> may have issues honouring the <code>PassengerEnabled off</code> statement. See <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">this article</a> for details.</p>\n\n<h5><code>block</code></h5>\n\n<p>Specifies the list of things Apache will block access to. The default is an empty set, &#39;[]&#39;. Currently, the only option is &#39;scm&#39;, which blocks web access to .svn, .git and .bzr directories. To add to this, please see the <a href=\"#development\">Development</a> section.</p>\n\n<h5><code>custom_fragment</code></h5>\n\n<p>Pass a string of custom configuration directives to be placed at the end of the vhost configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets a given <code>apache::vhost</code> as the default to serve requests that do not match any other <code>apache::vhost</code> definitions. The default value is &#39;false&#39;.</p>\n\n<h5><code>directories</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>&lt;Directory /path/to/directory&gt;...&lt;/Directory&gt;</code> directive blocks as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#directory\">Apache core documentation</a>. The <code>path</code> key is required in these hashes. Usage will typically look like:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [\n { path =&gt; &#39;/path/to/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n { path =&gt; &#39;/path/to/another/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n ],\n}\n</code></pre>\n\n<p><em>Note:</em> At least one directory should match <code>docroot</code> parameter, once you start declaring directories <code>apache::vhost</code> assumes that all required <code>&lt;Directory&gt;</code> blocks will be declared.</p>\n\n<p><em>Note:</em> If not defined a single default <code>&lt;Directory&gt;</code> block will be created that matches the <code>docroot</code> parameter.</p>\n\n<p>The directives will be embedded within the <code>Directory</code> directive block, missing directives should be undefined and not be added, resulting in their default vaules in Apache. Currently this is the list of supported directives:</p>\n\n<h6><code>addhandlers</code></h6>\n\n<p>Sets <code>AddHandler</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addhandler\">Apache Core documentation</a>. Accepts a list of hashes of the form <code>{ handler =&gt; &#39;handler-name&#39;, extensions =&gt; [&#39;extension&#39;]}</code>. Note that <code>extensions</code> is a list of extenstions being handled by the handler.\nAn example: </p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;,\n addhandlers =&gt; [ { handler =&gt; &#39;cgi-script&#39;, extensions =&gt; [&#39;.cgi&#39;]} ],\n } ],\n}\n</code></pre>\n\n<h6><code>allow</code></h6>\n\n<p>Sets an <code>Allow</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow\">Apache Core documentation</a>. An example:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow =&gt; &#39;from example.org&#39; } ],\n}\n</code></pre>\n\n<h6><code>allow_override</code></h6>\n\n<p>Sets the usage of <code>.htaccess</code> files as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride\">Apache core documentation</a>. Should accept in the form of a list or a string. An example:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow_override =&gt; [&#39;AuthConfig&#39;, &#39;Indexes&#39;] } ],\n}\n</code></pre>\n\n<h6><code>deny</code></h6>\n\n<p>Sets an <code>Deny</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#deny\">Apache Core documentation</a>. An example:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, deny =&gt; &#39;from example.org&#39; } ],\n}\n</code></pre>\n\n<h6><code>options</code></h6>\n\n<p>Lists the options for the given <code>&lt;Directory&gt;</code> block</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;] }],\n}\n</code></pre>\n\n<h6><code>order</code></h6>\n\n<p>Sets the order of processing <code>Allow</code> and <code>Deny</code> statements as per <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order\">Apache core documentation</a>. An example:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, order =&gt; &#39;Allow, Deny&#39; } ],\n}\n</code></pre>\n\n<h6><code>passenger_enabled</code></h6>\n\n<p>Sets the value for the <code>PassengerEnabled</code> directory to <code>on</code> or <code>off</code> as per the <a href=\"http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerEnabled\">Passenger documentation</a>.</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, passenger_enabled =&gt; &#39;off&#39; } ],\n}\n</code></pre>\n\n<p><strong>Note:</strong> This directive requires <code>apache::mod::passenger</code> to be active, Apache may not start with an unrecognised directive without it.</p>\n\n<p><strong>Note:</strong> Be aware that there is an <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">issue</a> using the <code>PassengerEnabled</code> directive with the <code>PassengerHighPerformance</code> directive.</p>\n\n<h5><code>docroot</code></h5>\n\n<p>Provides the DocumentRoot directive, identifying the directory Apache serves files from.</p>\n\n<h5><code>docroot_group</code></h5>\n\n<p>Sets group access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>docroot_owner</code></h5>\n\n<p>Sets individual user access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>error_log</code></h5>\n\n<p>Specifies whether <code>*_error.log</code> directives should be configured. Defaults to &#39;true&#39;.</p>\n\n<h5><code>error_log_file</code></h5>\n\n<p>Points to the <code>*_error.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_log_pipe</code></h5>\n\n<p>Specifies a pipe to send error log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ensure</code></h5>\n\n<p>Specifies if the vhost file is present or absent.</p>\n\n<h5><code>ip</code></h5>\n\n<p>The IP address the vhost listens on. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ip_based</code></h5>\n\n<p>Enables an IP-based vhost. This parameter inhibits the creation of a NameVirtualHost directive, since those are used to funnel requests to name-based vhosts. Defaults to &#39;false&#39;.</p>\n\n<h5><code>logroot</code></h5>\n\n<p>Specifies the location of the virtual host&#39;s logfiles. Defaults to <code>/var/log/&lt;apache log location&gt;/</code>.</p>\n\n<h5><code>no_proxy_uris</code></h5>\n\n<p>Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with <code>proxy_dest</code>.</p>\n\n<h5><code>options</code></h5>\n\n<p>Lists the options for the given virtual host</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;],\n}\n</code></pre>\n\n<h5><code>override</code></h5>\n\n<p>Sets the overrides for the given virtual host. Accepts an array of AllowOverride arguments.</p>\n\n<h5><code>port</code></h5>\n\n<p>Sets the port the host is configured on.</p>\n\n<h5><code>priority</code></h5>\n\n<p>Sets the relative load-order for Apache httpd VirtualHost configuration files. Defaults to &#39;25&#39;.</p>\n\n<p>If nothing matches the priority, the first name-based vhost will be used. Likewise, passing a higher priority will cause the alphabetically first name-based vhost to be used if no other names match.</p>\n\n<p><em>Note</em>: You should not need to use this parameter. However, if you do use it, be aware that the <code>default_vhost</code> parameter for <code>apache::vhost</code> passes a priority of &#39;15&#39;.</p>\n\n<h5><code>proxy_dest</code></h5>\n\n<p>Specifies the destination address of a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>proxy_pass</code></h5>\n\n<p>Specifies an array of path =&gt; uri for a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<p>Example:\n$proxy_pass = [\n { &#39;path&#39; =&gt; &#39;/a&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/&#39; },\n { &#39;path&#39; =&gt; &#39;/b&#39;, &#39;url&#39; =&gt; &#39;http://backend-b/&#39; },\n { &#39;path&#39; =&gt; &#39;/c&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/c&#39; },\n]</p>\n\n<p>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n proxy_pass =&gt; $proxy_pass,\n}</p>\n\n<h5><code>rack_base_uris</code></h5>\n\n<p>Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for passenger/rack in the <code>_rack.erb</code> template. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_dest</code></h5>\n\n<p>Specifies the address to redirect to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_source</code></h5>\n\n<p>Specifies the source items? that will redirect to the destination specified in <code>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>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_source =&gt; [&#39;/images&#39;,&#39;/downloads&#39;],\n redirect_dest =&gt; [&#39;http://img.example.com/&#39;,&#39;http://downloads.example.com/&#39;],\n}\n</code></pre>\n\n<h5><code>redirect_status</code></h5>\n\n<p>Specifies the status to append to the redirect. Defaults to &#39;undef&#39;.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_status =&gt; [&#39;temp&#39;,&#39;permanent&#39;],\n}\n</code></pre>\n\n<h5><code>request_headers</code></h5>\n\n<p>Specifies additional request headers.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n request_headers =&gt; [\n &#39;append MirrorID &quot;mirror 12&quot;&#39;,\n &#39;unset MirrorID&#39;,\n ],\n}\n</code></pre>\n\n<h5><code>rewrite_base</code></h5>\n\n<p>Limits the <code>rewrite_rule</code> to the specified base URL. Defaults to &#39;undef&#39;.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n rewrite_base =&gt; &#39;/blog/&#39;,\n}\n</code></pre>\n\n<p>The above example would limit the index.html -&gt; welcome.html rewrite to only something inside of <a href=\"http://example.com/blog/\">http://example.com/blog/</a>.</p>\n\n<h5><code>rewrite_cond</code></h5>\n\n<p>Rewrites a URL via <code>rewrite_rule</code> based on the truth of specified conditions. For example</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_cond =&gt; &#39;%{HTTP_USER_AGENT} ^MSIE&#39;,\n}\n</code></pre>\n\n<p>will rewrite URLs only if the visitor is using IE. Defaults to &#39;undef&#39;.</p>\n\n<p><em>Note</em>: At the moment, each vhost is limited to a single list of rewrite conditions. In the future, you will be able to specify multiple <code>rewrite_cond</code> and <code>rewrite_rules</code> per vhost, so that different conditions get different rewrites.</p>\n\n<h5><code>rewrite_rule</code></h5>\n\n<p>Creates URL rewrite rules. Defaults to &#39;undef&#39;. This parameter allows you to specify, for example, that anyone trying to access index.html will be served welcome.html.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n}\n</code></pre>\n\n<h5><code>scriptalias</code></h5>\n\n<p>Defines a directory of CGI scripts to be aliased to the path &#39;/cgi-bin&#39;</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Specifies the email address Apache will display when it renders one of its error pages.</p>\n\n<h5><code>serveraliases</code></h5>\n\n<p>Sets the server aliases of the site.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the primary name of the virtual host.</p>\n\n<h5><code>setenv</code></h5>\n\n<p>Used by HTTPD to set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>setenvif</code></h5>\n\n<p>Used by HTTPD to conditionally set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>ssl</code></h5>\n\n<p>Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are &#39;true&#39; or &#39;false&#39;.</p>\n\n<h5><code>ssl_ca</code></h5>\n\n<p>Specifies the certificate authority.</p>\n\n<h5><code>ssl_cert</code></h5>\n\n<p>Specifies the SSL certification.</p>\n\n<h5><code>ssl_certs_dir</code></h5>\n\n<p>Specifies the location of the SSL certification directory. Defaults to <code>/etc/ssl/certs</code>.</p>\n\n<h5><code>ssl_chain</code></h5>\n\n<p>Specifies the SSL chain.</p>\n\n<h5><code>ssl_crl</code></h5>\n\n<p>Specifies the certificate revocation list to use.</p>\n\n<h5><code>ssl_crl_path</code></h5>\n\n<p>Specifies the location of the certificate revocation list.</p>\n\n<h5><code>ssl_key</code></h5>\n\n<p>Specifies the SSL key.</p>\n\n<h5><code>vhost_name</code></h5>\n\n<p>This parameter is for use with name-based virtual hosting. Defaults to &#39;*&#39;.</p>\n\n<h3>Virtual Host Examples</h3>\n\n<p>The Apache module allows you to set up pretty much any configuration of virtual host you might desire. This section will address some common configurations. Please see the <a href=\"https://github.com/puppetlabs/puppetlabs-apache/tree/main/tests\">Tests section</a> for even more examples.</p>\n\n<p>Configure a vhost with a server administrator</p>\n\n<pre><code>apache::vhost { &#39;third.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n serveradmin =&gt; &#39;admin@example.com&#39;,\n}\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with aliased servers</p>\n\n<pre><code>apache::vhost { &#39;sixth.example.com&#39;:\n serveraliases =&gt; [\n &#39;sixth.example.org&#39;,\n &#39;sixth.example.net&#39;,\n ],\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n}\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost with a cgi-bin</p>\n\n<pre><code>apache::vhost { &#39;eleventh.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/eleventh&#39;,\n scriptalias =&gt; &#39;/usr/lib/cgi-bin&#39;,\n}\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with a rack configuration</p>\n\n<pre><code>apache::vhost { &#39;fifteenth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifteenth&#39;,\n rack_base_uris =&gt; [&#39;/rackapp1&#39;, &#39;/rackapp2&#39;],\n}\n</code></pre>\n\n<hr>\n\n<p>Set up a mix of SSL and non-SSL vhosts at the same domain</p>\n\n<pre><code>#The non-ssl vhost\napache::vhost { &#39;first.example.com non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n}\n\n#The SSL vhost at the same domain\napache::vhost { &#39;first.example.com ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost to redirect non-SSL connections to SSL</p>\n\n<pre><code>apache::vhost { &#39;sixteenth.example.com non-ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n redirect_status =&gt; &#39;permanent&#39;\n redirect_dest =&gt; &#39;https://sixteenth.example.com/&#39; \n}\napache::vhost { &#39;sixteenth.example.com ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<hr>\n\n<p>Set up IP-based vhosts on any listen port and have them respond to requests on specific IP addresses. In this example, we will set listening on ports 80 and 81. This is required because the example vhosts are not declared with a port parameter.</p>\n\n<pre><code>apache::listen { &#39;80&#39;: }\napache::listen { &#39;81&#39;: }\n</code></pre>\n\n<p>Then we will set up the IP-based vhosts</p>\n\n<pre><code>apache::vhost { &#39;first.example.com&#39;:\n ip =&gt; &#39;10.0.0.10&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ip_based =&gt; true,\n}\napache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.11&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n ip_based =&gt; true,\n}\n</code></pre>\n\n<hr>\n\n<p>Configure a mix of name-based and IP-based vhosts. First, we will add two IP-based vhosts on 10.0.0.10, one SSL and one non-SSL</p>\n\n<pre><code>apache::vhost { &#39;The first IP-based vhost, non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;80&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first&#39;,\n}\napache::vhost { &#39;The first IP-based vhost, ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;443&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first-ssl&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<p>Then, we will add two name-based vhosts listening on 10.0.0.20</p>\n\n<pre><code>apache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n}\napache::vhost { &#39;third.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n}\n</code></pre>\n\n<p>If you want to add two name-based vhosts so that they will answer on either 10.0.0.10 or 10.0.0.20, you <strong>MUST</strong> declare <code>add_listen =&gt; &#39;false&#39;</code> to disable the otherwise automatic &#39;Listen 80&#39;, as it will conflict with the preceding IP-based vhosts.</p>\n\n<pre><code>apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n add_listen =&gt; false,\n}\napache::vhost { &#39;fifth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n add_listen =&gt; false,\n}\n</code></pre>\n\n<h2>Implementation</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<h4>Class: <code>apache::dev</code></h4>\n\n<p>Installs Apache development libraries</p>\n\n<pre><code>class { &#39;apache::dev&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::listen</code></h4>\n\n<p>Controls which ports Apache binds to for listening based on the title:</p>\n\n<pre><code>apache::listen { &#39;80&#39;: }\napache::listen { &#39;443&#39;: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>Listen</code> directives to the <code>ports.conf</code> file in the Apache httpd configuration directory. <code>apache::listen</code> titles should always take the form of: <code>&lt;port&gt;</code>, <code>&lt;ipv4&gt;:&lt;port&gt;</code>, or <code>[&lt;ipv6&gt;]:&lt;port&gt;</code></p>\n\n<p>Apache httpd requires that <code>Listen</code> directives must be added for every port. The <code>apache::vhost</code> defined type will automatically add <code>Listen</code> directives unless the <code>apache::vhost</code> is passed <code>add_listen =&gt; false</code>.</p>\n\n<h4>Defined Type: <code>apache::namevirtualhost</code></h4>\n\n<p>Enables named-based hosting of a virtual host</p>\n\n<pre><code>class { &#39;apache::namevirtualhost`: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>NameVirtualHost</code> directives to the <code>ports.conf</code> file in the Apache https configuration directory. <code>apache::namevirtualhost</code> titles should always take the form of: <code>*</code>, <code>*:&lt;port&gt;</code>, <code>_default_:&lt;port&gt;</code>, <code>&lt;ip&gt;</code>, or <code>&lt;ip&gt;:&lt;port&gt;</code>.</p>\n\n<h4>Defined Type: <code>apache::balancermember</code></h4>\n\n<p>Define members of a proxy_balancer set (mod_proxy_balancer). Very useful when using exported resources.</p>\n\n<p>On every app server you can export a balancermember like this:</p>\n\n<pre><code> @@apache::balancermember { &quot;${::fqdn}-puppet00&quot;:\n balancer_cluster =&gt; &#39;puppet00&#39;,\n url =&gt; &quot;ajp://${::fqdn}:8009&quot;\n options =&gt; [&#39;ping=5&#39;, &#39;disablereuse=on&#39;, &#39;retry=5&#39;, &#39;ttl=120&#39;],\n }\n</code></pre>\n\n<p>And on the proxy itself you create the balancer cluster using the defined type apache::balancer:</p>\n\n<pre><code> apache::balancer { &#39;puppet00&#39;: }\n</code></pre>\n\n<p>If you need to use ProxySet in the balncer config you can do as so:</p>\n\n<pre><code> apache::balancer { &#39;puppet01&#39;:\n proxy_set =&gt; {&#39;stickysession&#39; =&gt; &#39;JSESSIONID&#39;},\n }\n</code></pre>\n\n<h3>Templates</h3>\n\n<p>The Apache module relies heavily on templates to enable the <code>vhost</code> and <code>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>\n\n<h2>Limitations</h2>\n\n<p>This has been tested on Ubuntu Precise, Debian Wheezy, and CentOS 5.8.</p>\n\n<h2>Development</h2>\n\n<h3>Overview</h3>\n\n<p>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>\n\n<p>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>\n\n<p>You can read the complete module contribution guide <a href=\"http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing\">on the Puppet Labs wiki.</a></p>\n\n<h3>Running tests</h3>\n\n<p>This project contains tests for both <a href=\"http://rspec-puppet.com/\">rspec-puppet</a> and <a href=\"https://github.com/puppetlabs/rspec-system\">rspec-system</a> to verify functionality. For in-depth information please see their respective documentation.</p>\n\n<p>Quickstart:</p>\n\n<pre><code>gem install bundler\nbundle install\nbundle exec rake spec\nbundle exec rake spec:system\n</code></pre>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.</p>\n</section>",
710
710
  "changelog": "<section class=\"plaintext\"><pre>2013-07-26 Release 0.8.1\nBugfixes:\n- Update `apache::mpm_module` detection for worker&#x2F;prefork\n- Update `apache::mod::cgi` and `apache::mod::cgid` detection for\nworker&#x2F;prefork\n\n2013-07-16 Release 0.8.0\nFeatures:\n- Add `servername` parameter to `apache` class\n- Add `proxy_set` parameter to `apache::balancer` define\n\nBugfixes:\n- Fix ordering for multiple `apache::balancer` clusters\n- Fix symlinking for sites-available on Debian-based OSs\n- Fix dependency ordering for recursive confdir management\n- Fix `apache::mod::*` to notify the service on config change\n- Documentation updates\n\n2013-07-09 Release 0.7.0\nChanges:\n- Essentially rewrite the module -- too many to list\n- `apache::vhost` has many abilities -- see README.md for details\n- `apache::mod::*` classes provide httpd mod-loading capabilities\n- `apache` base class is much more configurable\n\nBugfixes:\n- Many. And many more to come\n\n2013-03-2 Release 0.6.0\n- update travis tests (add more supported versions)\n- add access log_parameter\n- make purging of vhost dir configurable\n\n2012-08-24 Release 0.4.0\nChanges:\n- `include apache` is now required when using apache::mod::*\n\nBugfixes:\n- Fix syntax for validate_re\n- Fix formatting in vhost template\n- Fix spec tests such that they pass\n\n2012-05-08 Puppet Labs &lt;info@puppetlabs.com&gt; - 0.0.4\ne62e362 Fix broken tests for ssl, vhost, vhost::*\n42c6363 Changes to match style guide and pass puppet-lint without error\n42bc8ba changed name =&gt; path for file resources in order to name namevar by it&#x27;s name\n72e13de One end too much\n0739641 style guide fixes: &#x27;true&#x27; &lt;&gt; true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod&#x2F;a2dismo commands optional\n98d774e (#13860) Autorequire Package[&#x27;httpd&#x27;]\n05fcec5 (#13073) Add missing puppet spec tests\n541afda (#6899) Remove virtual a2mod definition\n976cb69 (#13072) Move mod python and wsgi package names to params\n323915a (#13060) Add .gitignore to repo\nfdf40af (#13060) Remove pkg directory from source tree\nfd90015 Add LICENSE file and update the ModuleFile\nd3d0d23 Re-enable local php class\nd7516c7 Make management of firewalls configurable for vhosts\n60f83ba Explicitly lookup scope of apache_name in templates.\nf4d287f (#12581) Add explicit ordering for vdir directory\n88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall\na776a8b (#11071) Fix to work with latest firewall module\n2b79e8b (#11070) Add support for Scientific Linux\n405b3e9 Fix for a2mod\n57b9048 Commit apache::vhost::redirect Manifest\n8862d01 Commit apache::vhost::proxy Manifest\nd5c1fd0 Commit apache::mod::wsgi Manifest\na825ac7 Commit apache::mod::python Manifest\nb77062f Commit Templates\n9a51b4a Vhost File Declarations\n6cf7312 Defaults for Parameters\n6a5b11a Ensure installed\nf672e46 a2mod fix\n8a56ee9 add pthon support to apache\n</pre></section>",
711
711
  "license": "<section class=\"plaintext\"><pre>Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n</pre></section>",
712
712
  "created_at": "2013-07-26 10:57:40 -0700",
@@ -1012,7 +1012,7 @@
1012
1012
  "file_size": 85004,
1013
1013
  "file_md5": "4036f35903264c9b6e3289455cfee225",
1014
1014
  "downloads": 6389,
1015
- "readme": "<section class=\"markdown\"><h1>apache</h1>\n\n<p><a href=\"https://travis-ci.org/puppetlabs/puppetlabs-apache\"><img src=\"https://travis-ci.org/puppetlabs/puppetlabs-apache.png?branch=master\" alt=\"Build Status\"></a></p>\n\n<h4>Table of Contents</h4>\n\n<ol>\n<li><a href=\"#overview\">Overview - What is the Apache module?</a></li>\n<li><a href=\"#module-description\">Module Description - What does the module do?</a></li>\n<li><a href=\"#setup\">Setup - The basics of getting started with Apache</a>\n\n<ul>\n<li><a href=\"#beginning-with-apache\">Beginning with Apache - Installation</a></li>\n<li><a href=\"#configure-a-virtual-host\">Configure a Virtual Host - Basic options for getting started</a></li>\n</ul></li>\n<li><a href=\"#usage\">Usage - The classes, defined types, and their parameters available for configuration</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a>\n\n<ul>\n<li><a href=\"#class-apache\">Class: apache</a></li>\n<li><a href=\"#classes-apachemodname\">Classes: apache::mod::*</a></li>\n<li><a href=\"#defined-type-apachevhost\">Defined Type: apache::vhost</a></li>\n</ul></li>\n<li><a href=\"#virtual-host-examples\">Virtual Host Examples - Demonstrations of some configuration options</a></li>\n</ul></li>\n<li><a href=\"#implementation\">Implementation - An under-the-hood peek at what the module is doing</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a></li>\n<li><a href=\"#templates\">Templates</a></li>\n</ul></li>\n<li><a href=\"#limitations\">Limitations - OS compatibility, etc.</a></li>\n<li><a href=\"#development\">Development - Guide for contributing to the module</a></li>\n<li><a href=\"#release-notes\">Release Notes - Notes on the most recent updates to the module</a></li>\n</ol>\n\n<h2>Overview</h2>\n\n<p>The Apache module allows you to set up virtual hosts and manage web services with minimal effort.</p>\n\n<h2>Module Description</h2>\n\n<p>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>\n\n<h2>Setup</h2>\n\n<p><strong>What Apache affects:</strong></p>\n\n<ul>\n<li>configuration files and directories (created and written to)\n\n<ul>\n<li><strong>NOTE</strong>: Configurations that are <em>not</em> managed by Puppet will be purged.</li>\n</ul></li>\n<li>package/service/configuration files for Apache</li>\n<li>Apache modules</li>\n<li>virtual hosts</li>\n<li>listened-to ports</li>\n<li><code>/etc/make.conf</code> on FreeBSD</li>\n</ul>\n\n<h3>Beginning with Apache</h3>\n\n<p>To install Apache with the default parameters</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;: }\n</code></pre>\n\n<p>The defaults are determined by your operating system (e.g. Debian systems have one set of defaults, RedHat systems have another). These defaults will work well in a testing environment, but are not suggested for production. To establish customized parameters</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;:\n default_mods =&gt; false,\n default_confd_files =&gt; false,\n }\n</code></pre>\n\n<h3>Configure a virtual host</h3>\n\n<p>Declaring the <code>apache</code> class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving <code>$apache::docroot</code>.</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;: }\n</code></pre>\n\n<p>To configure a very basic, name-based virtual host</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;first.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n }\n</code></pre>\n\n<p><em>Note:</em> The default priority is 15. If nothing matches this priority, the alphabetically first name-based vhost will be used. This is also true if you pass a higher priority and no names match anything else.</p>\n\n<p>A slightly more complicated example, which moves the docroot owner/group</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;second.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n docroot_owner =&gt; &#39;third&#39;,\n docroot_group =&gt; &#39;third&#39;,\n }\n</code></pre>\n\n<p>To set up a virtual host with SSL and default SSL certificates</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;ssl.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/ssl&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<p>To set up a virtual host with SSL and specific SSL certificates</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n ssl =&gt; true,\n ssl_cert =&gt; &#39;/etc/ssl/fourth.example.com.cert&#39;,\n ssl_key =&gt; &#39;/etc/ssl/fourth.example.com.key&#39;,\n }\n</code></pre>\n\n<p>To set up a virtual host with IP address different than &#39;*&#39;</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;subdomain.example.com&#39;:\n ip =&gt; &#39;127.0.0.1&#39;,\n port =&gt; &#39;80&#39;,\n docrout =&gt; &#39;/var/www/subdomain&#39;,\n }\n</code></pre>\n\n<p>To set up a virtual host with wildcard alias for subdomain mapped to same named directory\n<code>http://examle.com.loc =&gt; /var/www/example.com</code></p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;subdomain.loc&#39;:\n vhost_name =&gt; &#39;*&#39;,\n port =&gt; &#39;80&#39;,\n virtual_docroot&#39; =&gt; &#39;/var/www/%-2+&#39;,\n docroot =&gt; &#39;/var/www&#39;,\n serveraliases =&gt; [&#39;*.loc&#39;,],\n }\n</code></pre>\n\n<p>To set up a virtual host with suPHP</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;suphp.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/appuser/myphpapp&#39;,\n suphp_addhandler =&gt; &#39;x-httpd-php&#39;,\n suphp_engine =&gt; &#39;on&#39;,\n suphp_configpath =&gt; &#39;/etc/php5/apache2&#39;,\n directories =&gt; { path =&gt; &#39;/home/appuser/myphpapp&#39;,\n &#39;suphp&#39; =&gt; { user =&gt; &#39;myappuser&#39;, group =&gt; &#39;myappgroup&#39; },\n }\n }\n</code></pre>\n\n<p>To set up a virtual host with WSGI</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;wsgi.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/pythonapp&#39;,\n wsgi_daemon_process =&gt; &#39;wsgi&#39;,\n wsgi_daemon_process_options =&gt;\n { processes =&gt; &#39;2&#39;, threads =&gt; &#39;15&#39;, display-name =&gt; &#39;%{GROUP}&#39; },\n wsgi_process_group =&gt; &#39;wsgi&#39;,\n wsgi_script_aliases =&gt; { &#39;/&#39; =&gt; &#39;/var/www/demo.wsgi&#39; },\n }\n</code></pre>\n\n<p>Starting 2.2.16, httpd supports <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_dir.html#fallbackresource\">FallbackResource</a> which is a simple replace for common RewriteRules:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;wordpress.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/wordpress&#39;,\n fallbackresource =&gt; &#39;/index.php&#39;,\n }\n</code></pre>\n\n<p>Please note that the <code>disabled</code> argument to FallbackResource is only supported since 2.2.24.</p>\n\n<p>To see a list of all virtual host parameters, <a href=\"#defined-type-apachevhost\">please go here</a>. To see an extensive list of virtual host examples <a href=\"#virtual-host-examples\">please look here</a>.</p>\n\n<h2>Usage</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<p>This module modifies Apache configuration files and directories and will purge any configuration not managed by Puppet. Configuration of Apache should be managed by Puppet, as non-puppet configuration files can cause unexpected failures.</p>\n\n<p>It is possible to temporarily disable full Puppet management by setting the <code>purge_configs</code> parameter within the base <code>apache</code> class to &#39;false&#39;. This option should only be used as a temporary means of saving and relocating customized configurations.</p>\n\n<h4>Class: <code>apache</code></h4>\n\n<p>The Apache module&#39;s primary class, <code>apache</code>, guides the basic setup of Apache on your system.</p>\n\n<p>You may establish a default vhost in this class, the <code>vhost</code> class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the <code>vhost</code> type.</p>\n\n<p><strong>Parameters within <code>apache</code>:</strong></p>\n\n<h5><code>default_mods</code></h5>\n\n<p>Sets up Apache with default settings based on your OS. Defaults to &#39;true&#39;, set to &#39;false&#39; for customized configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets up a default virtual host. Defaults to &#39;true&#39;, set to &#39;false&#39; to set up <a href=\"#configure-a-virtual-host\">customized virtual hosts</a>.</p>\n\n<h5><code>default_confd_files</code></h5>\n\n<p>Generates default set of include-able apache configuration files under <code>${apache::confd_dir}</code> directory. These configuration files correspond to what is usually installed with apache package on given platform.</p>\n\n<h5><code>default_ssl_vhost</code></h5>\n\n<p>Sets up a default SSL virtual host. Defaults to &#39;false&#39;.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;default-ssl&#39;:\n port =&gt; 443,\n ssl =&gt; true,\n docroot =&gt; $docroot,\n scriptalias =&gt; $scriptalias,\n serveradmin =&gt; $serveradmin,\n access_log_file =&gt; &quot;ssl_${access_log_file}&quot;,\n }\n</code></pre>\n\n<p>SSL vhosts only respond to HTTPS queries.</p>\n\n<h5><code>default_ssl_cert</code></h5>\n\n<p>The default SSL certification, which is automatically set based on your operating system (<code>/etc/pki/tls/certs/localhost.crt</code> for RedHat, <code>/etc/ssl/certs/ssl-cert-snakeoil.pem</code> for Debian, <code>/usr/local/etc/apache22/server.crt</code> for FreeBSD). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_key</code></h5>\n\n<p>The default SSL key, which is automatically set based on your operating system (<code>/etc/pki/tls/private/localhost.key</code> for RedHat, <code>/etc/ssl/private/ssl-cert-snakeoil.key</code> for Debian, <code>/usr/local/etc/apache22/server.key</code> for FreeBSD). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_chain</code></h5>\n\n<p>The default SSL chain, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_ca</code></h5>\n\n<p>The default certificate authority, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl_path</code></h5>\n\n<p>The default certificate revocation list path, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl</code></h5>\n\n<p>The default certificate revocation list to use, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>service_name</code></h5>\n\n<p>Name of apache service to run. Defaults to: <code>&#39;httpd&#39;</code> on RedHat, <code>&#39;apache2&#39;</code> on Debian, and <code>&#39;apache22&#39;</code> on FreeBSD.</p>\n\n<h5><code>service_enable</code></h5>\n\n<p>Determines whether the &#39;httpd&#39; service is enabled when the machine is booted. Defaults to &#39;true&#39;.</p>\n\n<h5><code>service_ensure</code></h5>\n\n<p>Determines whether the service should be running. Can be set to &#39;undef&#39; which is useful when you want to let the service be managed by some other application like pacemaker. Defaults to &#39;running&#39;.</p>\n\n<h5><code>purge_configs</code></h5>\n\n<p>Removes all other apache configs and vhosts, which is automatically set 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>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Sets the server administrator. Defaults to &#39;root@localhost&#39;.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the servername. Defaults to fqdn provided by facter.</p>\n\n<h5><code>server_root</code></h5>\n\n<p>A value to be set as <code>ServerRoot</code> in main configuration file (<code>httpd.conf</code>). Defaults to <code>/etc/httpd</code> on RedHat, <code>/etc/apache2</code> on Debian and <code>/usr/local</code> on FreeBSD.</p>\n\n<h5><code>sendfile</code></h5>\n\n<p>Makes Apache use the Linux kernel &#39;sendfile&#39; to serve static files. Defaults to &#39;On&#39;.</p>\n\n<h5><code>server_root</code></h5>\n\n<p>A value to be set as <code>ServerRoot</code> in main configuration file (<code>httpd.conf</code>). Defaults to <code>/etc/httpd</code> on RedHat and <code>/etc/apache2</code> on Debian.</p>\n\n<h5><code>error_documents</code></h5>\n\n<p>Enables custom error documents. Defaults to &#39;false&#39;.</p>\n\n<h5><code>httpd_dir</code></h5>\n\n<p>Changes the base location of the configuration directories used for the service. This is useful for specially repackaged HTTPD builds but may have unintended consequences when used in combination with the default distribution packages. Default is based on your OS.</p>\n\n<h5><code>confd_dir</code></h5>\n\n<p>Changes the location of the configuration directory your custom configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>vhost_dir</code></h5>\n\n<p>Changes the location of the configuration directory your virtual host configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mod_dir</code></h5>\n\n<p>Changes the location of the configuration directory your Apache modules configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mpm_module</code></h5>\n\n<p>Configures which mpm module is loaded and configured for the httpd process by the <code>apache::mod::event</code>, <code>apache::mod::itk</code>, <code>apache::mod::peruser</code>, <code>apache::mod::prefork</code> and <code>apache::mod::worker</code> classes. Must be set to <code>false</code> to explicitly declare <code>apache::mod::event</code>, <code>apache::mod::itk</code>, <code>apache::mod::peruser</code>, <code>apache::mod::prefork</code> or <code>apache::mod::worker</code> classes with parameters. All possible values are <code>event</code>, <code>itk</code>, <code>peruser</code>, <code>prefork</code>, <code>worker</code> (valid values depend on agent&#39;s OS), or the boolean <code>false</code>. Defaults to <code>prefork</code> on RedHat and FreeBSD and <code>worker</code> on Debian. Note: on FreeBSD switching between different mpm modules is quite difficult (but possible). Before changing <code>$mpm_module</code> one has to deinstall all packages that depend on currently installed <code>apache</code>.</p>\n\n<h5><code>conf_template</code></h5>\n\n<p>Setting this allows you to override the template used for the main apache configuration file. This is a potentially risky thing to do as this module has been built around the concept of a minimal configuration file with most of the configuration coming in the form of conf.d/ entries. Defaults to &#39;apache/httpd.conf.erb&#39;.</p>\n\n<h5><code>keepalive</code></h5>\n\n<p>Setting this allows you to enable persistent connections.</p>\n\n<h5><code>keepalive_timeout</code></h5>\n\n<p>Amount of time the server will wait for subsequent requests on a persistent connection. Defaults to &#39;15&#39;.</p>\n\n<h5><code>logroot</code></h5>\n\n<p>Changes the location of the directory Apache log files are placed in. Defaut is based on your OS.</p>\n\n<h5><code>log_level</code></h5>\n\n<p>Changes the verbosity level of the error log. Defaults to &#39;warn&#39;. Valid values are <code>emerg</code>, <code>alert</code>, <code>crit</code>, <code>error</code>, <code>warn</code>, <code>notice</code>, <code>info</code> or <code>debug</code>.</p>\n\n<h5><code>ports_file</code></h5>\n\n<p>Changes the name of the file containing Apache ports configuration. Default is <code>${conf_dir}/ports.conf</code>.</p>\n\n<h5><code>server_tokens</code></h5>\n\n<p>Controls how much information Apache sends to the browser about itself and the operating system. See Apache documentation for &#39;ServerTokens&#39;. Defaults to &#39;OS&#39;.</p>\n\n<h5><code>server_signature</code></h5>\n\n<p>Allows the configuration of a trailing footer line under server-generated documents. See Apache documentation for &#39;ServerSignature&#39;. Defaults to &#39;On&#39;.</p>\n\n<h5><code>trace_enable</code></h5>\n\n<p>Controls, how TRACE requests per RFC 2616 are handled. See Apache documentation for &#39;TraceEnable&#39;. Defaults to &#39;On&#39;.</p>\n\n<h5><code>manage_user</code></h5>\n\n<p>Setting this to false will avoid the user resource to be created by this module. This is useful when you already have a user created in another puppet module and that you want to used it to run apache. Without this, it would result in a duplicate resource error.</p>\n\n<h5><code>manage_group</code></h5>\n\n<p>Setting this to false will avoid the group resource to be created by this module. This is useful when you already have a group created in another puppet module and that you want to used it for apache. Without this, it would result in a duplicate resource error.</p>\n\n<h5><code>package_ensure</code></h5>\n\n<p>Allow control over the package ensure statement. This is useful if you want to make sure apache is always at the latest version or whether it is only installed.</p>\n\n<h4>Class: <code>apache::default_mods</code></h4>\n\n<p>Installs default Apache modules based on what OS you are running</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::default_mods&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::mod</code></h4>\n\n<p>Used to enable arbitrary Apache httpd modules for which there is no specific <code>apache::mod::[name]</code> class. The <code>apache::mod</code> defined type will also install the required packages to enable the module, if any.</p>\n\n<pre lang=\"puppet\"><code> apache::mod { &#39;rewrite&#39;: }\n apache::mod { &#39;ldap&#39;: }\n</code></pre>\n\n<h4>Classes: <code>apache::mod::[name]</code></h4>\n\n<p>There are many <code>apache::mod::[name]</code> classes within this module that can be declared using <code>include</code>:</p>\n\n<ul>\n<li><code>alias</code></li>\n<li><code>auth_basic</code></li>\n<li><code>auth_kerb</code></li>\n<li><code>autoindex</code></li>\n<li><code>cache</code></li>\n<li><code>cgi</code></li>\n<li><code>cgid</code></li>\n<li><code>dav</code></li>\n<li><code>dav_fs</code></li>\n<li><code>dav_svn</code></li>\n<li><code>deflate</code></li>\n<li><code>dev</code></li>\n<li><code>dir</code>*</li>\n<li><code>disk_cache</code></li>\n<li><code>event</code></li>\n<li><code>fastcgi</code></li>\n<li><code>fcgid</code></li>\n<li><code>headers</code></li>\n<li><code>info</code></li>\n<li><code>itk</code></li>\n<li><code>ldap</code></li>\n<li><code>mime</code></li>\n<li><code>mime_magic</code>*</li>\n<li><code>mpm_event</code></li>\n<li><code>negotiation</code></li>\n<li><code>nss</code>*</li>\n<li><code>passenger</code>*</li>\n<li><code>perl</code></li>\n<li><code>peruser</code></li>\n<li><code>php</code> (requires <a href=\"#mpm_module\"><code>mpm_module</code></a> set to <code>prefork</code>)</li>\n<li><code>prefork</code>*</li>\n<li><code>proxy</code>*</li>\n<li><code>proxy_ajp</code></li>\n<li><code>proxy_html</code></li>\n<li><code>proxy_http</code></li>\n<li><code>python</code></li>\n<li><code>reqtimeout</code></li>\n<li><code>rewrite</code></li>\n<li><code>rpaf</code>*</li>\n<li><code>setenvif</code></li>\n<li><code>ssl</code>* (see <a href=\"#class-apachemodssl\">apache::mod::ssl</a> below)</li>\n<li><code>status</code>*</li>\n<li><code>suphp</code></li>\n<li><code>userdir</code>*</li>\n<li><code>vhost_alias</code></li>\n<li><code>worker</code>*</li>\n<li><code>wsgi</code> (see <a href=\"#class-apachemodwsgi\">apache::mod::wsgi</a> below)</li>\n<li><code>xsendfile</code></li>\n</ul>\n\n<p>Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module&#39;s configuration. Most of the time, these parameters will not require any configuration or attention.</p>\n\n<p>The modules mentioned above, and other Apache modules that have templates, will cause template files to be dropped along with the mod install, and the module will not work without the template. Any mod without a template will install package but drop no files.</p>\n\n<h4>Class: <code>apache::mod::ssl</code></h4>\n\n<p>Installs Apache SSL capabilities and utilizes <code>ssl.conf.erb</code> template. These are the defaults:</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::mod::ssl&#39;:\n ssl_compression =&gt; false,\n ssl_options =&gt; [ &#39;StdEnvVars&#39; ],\n }\n</code></pre>\n\n<p>To <em>use</em> SSL with a virtual host, you must either set the<code>default_ssl_vhost</code> parameter in <code>apache</code> to &#39;true&#39; or set the <code>ssl</code> parameter in <code>apache::vhost</code> to &#39;true&#39;.</p>\n\n<h4>Class: <code>apache::mod::wsgi</code></h4>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::mod::wsgi&#39;:\n wsgi_socket_prefix =&gt; &quot;\\${APACHE_RUN_DIR}WSGI&quot;,\n wsgi_python_home =&gt; &#39;/path/to/virtenv&#39;,\n wsgi_python_path =&gt; &#39;/path/to/virtenv/site-packages&#39;,\n }\n</code></pre>\n\n<h4>Defined Type: <code>apache::vhost</code></h4>\n\n<p>The Apache module allows a lot of flexibility in the set up and configuration of virtual hosts. This flexibility is due, in part, to <code>vhost</code>&#39;s setup as a defined resource type, which allows it to be evaluated multiple times with different parameters.</p>\n\n<p>The <code>vhost</code> defined type allows you to have specialized configurations for virtual hosts that have requirements outside of the defaults. You can set up a default vhost within the base <code>apache</code> class as well as set a customized vhost setup as default. Your customized vhost (priority 10) will be privileged over the base class vhost (15).</p>\n\n<p>If you have a series of specific configurations and do not want a base <code>apache</code> class default vhost, make sure to set the base class default host to &#39;false&#39;.</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;:\n default_vhost =&gt; false,\n }\n</code></pre>\n\n<p><strong>Parameters within <code>apache::vhost</code>:</strong></p>\n\n<p>The default values for each parameter will vary based on operating system and type of virtual host.</p>\n\n<h5><code>access_log</code></h5>\n\n<p>Specifies whether <code>*_access.log</code> directives should be configured. Valid values are &#39;true&#39; and &#39;false&#39;. Defaults to &#39;true&#39;.</p>\n\n<h5><code>access_log_file</code></h5>\n\n<p>Points to the <code>*_access.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_pipe</code></h5>\n\n<p>Specifies a pipe to send access log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_syslog</code></h5>\n\n<p>Sends all access log messages to syslog. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_format</code></h5>\n\n<p>Specifies either a LogFormat nickname or custom format string for access log. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>add_listen</code></h5>\n\n<p>Determines whether the vhost creates a listen statement. The default value is &#39;true&#39;.</p>\n\n<p>Setting <code>add_listen</code> to &#39;false&#39; stops the vhost from creating a listen statement, and this is important when you combine vhosts that are not passed an <code>ip</code> parameter with vhosts that <em>are</em> passed the <code>ip</code> parameter.</p>\n\n<h5><code>aliases</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>Alias</code> or <code>AliasMatch</code> statements as per the <a href=\"http://httpd.apache.org/docs/current/mod/mod_alias.html\"><code>mod_alias</code> documentation</a>. Each hash is expected to be of the form:</p>\n\n<pre><code>aliases =&gt; [\n { aliasmatch =&gt; &#39;^/image/(.*)\\.jpg$&#39;, path =&gt; &#39;/files/jpg.images/$1.jpg&#39; }\n { alias =&gt; &#39;/image&#39;, path =&gt; &#39;/ftp/pub/image&#39; },\n],\n</code></pre>\n\n<p>For <code>Alias</code> and <code>AliasMatch</code> to work, each will need a corresponding <code>&lt;Directory /path/to/directory&gt;</code> or <code>&lt;Location /path/to/directory&gt;</code> block. The <code>Alias</code> and <code>AliasMatch</code> directives are created in the order specified in the <code>aliases</code> paramter. As described in the <a href=\"http://httpd.apache.org/docs/current/mod/mod_alias.html\"><code>mod_alias</code> documentation</a> more specific <code>Alias</code> or <code>AliasMatch</code> directives should come before the more general ones to avoid shadowing.</p>\n\n<p><strong>Note:</strong> If <code>apache::mod::passenger</code> is loaded and <code>PassengerHighPerformance true</code> is set, then <code>Alias</code> may have issues honouring the <code>PassengerEnabled off</code> statement. See <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">this article</a> for details.</p>\n\n<h5><code>block</code></h5>\n\n<p>Specifies the list of things Apache will block access to. The default is an empty set, &#39;[]&#39;. Currently, the only option is &#39;scm&#39;, which blocks web access to .svn, .git and .bzr directories. To add to this, please see the <a href=\"#development\">Development</a> section.</p>\n\n<h5><code>custom_fragment</code></h5>\n\n<p>Pass a string of custom configuration directives to be placed at the end of the vhost configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets a given <code>apache::vhost</code> as the default to serve requests that do not match any other <code>apache::vhost</code> definitions. The default value is &#39;false&#39;.</p>\n\n<h5><code>directories</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>&lt;Directory /path/to/directory&gt;...&lt;/Directory&gt;</code> directive blocks as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#directory\">Apache core documentation</a>. The <code>path</code> key is required in these hashes. An optional <code>provider</code> defaults to <code>directory</code>. Usage will typically look like:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [\n { path =&gt; &#39;/path/to/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n { path =&gt; &#39;/path/to/another/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n ],\n }\n</code></pre>\n\n<p><em>Note:</em> At least one directory should match <code>docroot</code> parameter, once you start declaring directories <code>apache::vhost</code> assumes that all required <code>&lt;Directory&gt;</code> blocks will be declared.</p>\n\n<p><em>Note:</em> If not defined a single default <code>&lt;Directory&gt;</code> block will be created that matches the <code>docroot</code> parameter.</p>\n\n<p><code>provider</code> can be set to any of <code>directory</code>, <code>files</code>, or <code>location</code>. If the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#files\">pathspec starts with a <code>~</code></a>, httpd will interpret this as the equivalent of <code>DirectoryMatch</code>, <code>FilesMatch</code>, or <code>LocationMatch</code>, respectively.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;files.example.net&#39;:\n docroot =&gt; &#39;/var/www/files&#39;,\n directories =&gt; [\n { path =&gt; &#39;~ (\\.swp|\\.bak|~)$&#39;, &#39;provider&#39; =&gt; &#39;files&#39;, &#39;deny&#39; =&gt; &#39;from all&#39; },\n ],\n }\n</code></pre>\n\n<p>The directives will be embedded within the <code>Directory</code> (<code>Files</code>, or <code>Location</code>) directive block, missing directives should be undefined and not be added, resulting in their default vaules in Apache. Currently this is the list of supported directives:</p>\n\n<h6><code>addhandlers</code></h6>\n\n<p>Sets <code>AddHandler</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addhandler\">Apache Core documentation</a>. Accepts a list of hashes of the form <code>{ handler =&gt; &#39;handler-name&#39;, extensions =&gt; [&#39;extension&#39;]}</code>. Note that <code>extensions</code> is a list of extenstions being handled by the handler.\nAn example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;,\n addhandlers =&gt; [ { handler =&gt; &#39;cgi-script&#39;, extensions =&gt; [&#39;.cgi&#39;]} ],\n } ],\n }\n</code></pre>\n\n<h6><code>allow</code></h6>\n\n<p>Sets an <code>Allow</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow\">Apache Core documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow =&gt; &#39;from example.org&#39; } ],\n }\n</code></pre>\n\n<h6><code>allow_override</code></h6>\n\n<p>Sets the usage of <code>.htaccess</code> files as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride\">Apache core documentation</a>. Should accept in the form of a list or a string. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow_override =&gt; [&#39;AuthConfig&#39;, &#39;Indexes&#39;] } ],\n }\n</code></pre>\n\n<h6><code>deny</code></h6>\n\n<p>Sets an <code>Deny</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#deny\">Apache Core documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, deny =&gt; &#39;from example.org&#39; } ],\n }\n</code></pre>\n\n<h6><code>error_documents</code></h6>\n\n<p>A list of hashes which can be used to override the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#errordocument\">ErrorDocument</a> settings for this directory. Example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n directories =&gt; [ { path =&gt; &#39;/srv/www&#39;\n error_documents =&gt; [\n { &#39;error_code&#39; =&gt; &#39;503&#39;, &#39;document&#39; =&gt; &#39;/service-unavail&#39; },\n ],\n }]\n }\n</code></pre>\n\n<h6><code>headers</code></h6>\n\n<p>Adds lines for <code>Header</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_headers.html#header\">Apache Header documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; {\n path =&gt; &#39;/path/to/directory&#39;,\n headers =&gt; &#39;Set X-Robots-Tag &quot;noindex, noarchive, nosnippet&quot;&#39;,\n },\n }\n</code></pre>\n\n<h6><code>options</code></h6>\n\n<p>Lists the options for the given <code>&lt;Directory&gt;</code> block</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;] }],\n }\n</code></pre>\n\n<h6><code>index_options</code></h6>\n\n<p>Styles the list</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;], index_options =&gt; [&#39;IgnoreCase&#39;, &#39;FancyIndexing&#39;, &#39;FoldersFirst&#39;, &#39;NameWidth=*&#39;, &#39;DescriptionWidth=*&#39;, &#39;SuppressHTMLPreamble&#39;] }],\n }\n</code></pre>\n\n<h6><code>index_order_default</code></h6>\n\n<p>Sets the order of the list </p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, order =&gt; &#39;Allow,Deny&#39;, index_order_default =&gt; [&#39;Descending&#39;, &#39;Date&#39;]}, ],\n }\n</code></pre>\n\n<h6><code>order</code></h6>\n\n<p>Sets the order of processing <code>Allow</code> and <code>Deny</code> statements as per <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order\">Apache core documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, order =&gt; &#39;Allow,Deny&#39; } ],\n }\n</code></pre>\n\n<h6><code>auth_type</code></h6>\n\n<p>Sets the value for <code>AuthType</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#authtype\">Apache AuthType\ndocumentation</a>.</p>\n\n<h6><code>auth_name</code></h6>\n\n<p>Sets the value for <code>AuthName</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#authname\">Apache AuthName\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_algorithm</code></h6>\n\n<p>Sets the value for <code>AuthDigestAlgorithm</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestalgorithm\">Apache\nAuthDigestAlgorithm\ndocumentation</a></p>\n\n<h6><code>auth_digest_domain</code></h6>\n\n<p>Sets the value for <code>AuthDigestDomain</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestdomain\">Apache AuthDigestDomain\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_nonce_lifetime</code></h6>\n\n<p>Sets the value for <code>AuthDigestNonceLifetime</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestnoncelifetime\">Apache\nAuthDigestNonceLifetime\ndocumentation</a></p>\n\n<h6><code>auth_digest_provider</code></h6>\n\n<p>Sets the value for <code>AuthDigestProvider</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestprovider\">Apache AuthDigestProvider\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_qop</code></h6>\n\n<p>Sets the value for <code>AuthDigestQop</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestqop\">Apache AuthDigestQop\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_shmem_size</code></h6>\n\n<p>Sets the value for <code>AuthAuthDigestShmemSize</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestshmemsize\">Apache AuthDigestShmemSize\ndocumentation</a>.</p>\n\n<h6><code>auth_basic_authoritative</code></h6>\n\n<p>Sets the value for <code>AuthBasicAuthoritative</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_basic.html#authbasicauthoritative\">Apache\nAuthBasicAuthoritative\ndocumentation</a>.</p>\n\n<h6><code>auth_basic_fake</code></h6>\n\n<p>Sets the value for <code>AuthBasicFake</code> as per the <a href=\"https://httpd.apache.org/docs/trunk/mod/mod_auth_basic.html#authbasicfake\">Apache AuthBasicFake\ndocumentation</a>.</p>\n\n<h6><code>auth_basic_provider</code></h6>\n\n<p>Sets the value for <code>AuthBasicProvider</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_basic.html#authbasicprovider\">Apache AuthBasicProvider\ndocumentation</a>.</p>\n\n<h6><code>auth_user_file</code></h6>\n\n<p>Sets the value for <code>AuthUserFile</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_authn_file.html#authuserfile\">Apache AuthUserFile\ndocumentation</a>.</p>\n\n<h6><code>auth_require</code></h6>\n\n<p>Sets the value for <code>AuthName</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#require\">Apache Require\ndocumentation</a></p>\n\n<h6><code>passenger_enabled</code></h6>\n\n<p>Sets the value for the <code>PassengerEnabled</code> directory to <code>on</code> or <code>off</code> as per the <a href=\"http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerEnabled\">Passenger documentation</a>.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, passenger_enabled =&gt; &#39;off&#39; } ],\n }\n</code></pre>\n\n<p><strong>Note:</strong> This directive requires <code>apache::mod::passenger</code> to be active, Apache may not start with an unrecognised directive without it.</p>\n\n<p><strong>Note:</strong> Be aware that there is an <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">issue</a> using the <code>PassengerEnabled</code> directive with the <code>PassengerHighPerformance</code> directive.</p>\n\n<h6><code>ssl_options</code></h6>\n\n<p>String or list of <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_ssl.html#ssloptions\"><code>SSLOptions</code></a> for the given <code>&lt;Directory&gt;</code> block. This overrides, or refines the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_ssl.html#ssloptions\"><code>SSLOptions</code></a> of the parent block (either vhost, or server).</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;secure.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [\n { path =&gt; &#39;/path/to/directory&#39;, ssl_options =&gt; &#39;+ExportCertData&#39; }\n { path =&gt; &#39;/path/to/different/dir&#39;, ssl_options =&gt; [ &#39;-StdEnvVars&#39;, &#39;+ExportCertData&#39;] },\n ],\n }\n</code></pre>\n\n<h6><code>suphp</code></h6>\n\n<p>An array containing two values: User and group for the <a href=\"http://www.suphp.org/DocumentationView.html?file=apache/CONFIG\">suPHP_UserGroup</a> setting.\nThis directive must be used with <code>suphp_engine =&gt; on</code> in the vhost declaration. This directive only works in <code>&lt;Directory&gt;</code> or <code>&lt;Location&gt;</code>.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;secure.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [\n { path =&gt; &#39;/path/to/directory&#39;, suphp =&gt; { user =&gt; &#39;myappuser&#39;, group =&gt; &#39;myappgroup&#39; }\n ],\n }\n</code></pre>\n\n<h6><code>custom_fragment</code></h6>\n\n<p>Pass a string of custom configuration directives to be placed at the end of the\ndirectory configuration.</p>\n\n<h5><code>directoryindex</code></h5>\n\n<p>Set a DirectoryIndex directive, to set the list of resources to look for, when the client requests an index of the directory by specifying a / at the end of the directory name..</p>\n\n<h5><code>docroot</code></h5>\n\n<p>Provides the DocumentRoot directive, identifying the directory Apache serves files from.</p>\n\n<h5><code>docroot_group</code></h5>\n\n<p>Sets group access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>docroot_owner</code></h5>\n\n<p>Sets individual user access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>error_log</code></h5>\n\n<p>Specifies whether <code>*_error.log</code> directives should be configured. Defaults to &#39;true&#39;.</p>\n\n<h5><code>error_log_file</code></h5>\n\n<p>Points to the <code>*_error.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_log_pipe</code></h5>\n\n<p>Specifies a pipe to send error log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_log_syslog</code></h5>\n\n<p>Sends all error log messages to syslog. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_documents</code></h5>\n\n<p>A list of hashes which can be used to override the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#errordocument\">ErrorDocument</a> settings for this vhost. Defaults to <code>[]</code>. Example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n error_documents =&gt; [\n { &#39;error_code&#39; =&gt; &#39;503&#39;, &#39;document&#39; =&gt; &#39;/service-unavail&#39; },\n { &#39;error_code&#39; =&gt; &#39;407&#39;, &#39;document&#39; =&gt; &#39;https://example.com/proxy/login&#39; },\n ],\n }\n</code></pre>\n\n<h5><code>ensure</code></h5>\n\n<p>Specifies if the vhost file is present or absent.</p>\n\n<h5><code>fastcgi_server</code></h5>\n\n<p>Specifies the filename as an external FastCGI application. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>fastcgi_socket</code></h5>\n\n<p>Filename used to communicate with the web server. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>fastcgi_dir</code></h5>\n\n<p>Directory to enable for FastCGI. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>additional_includes</code></h5>\n\n<p>Specifies paths to additional static vhost-specific Apache configuration files.\nThis option is useful when you need to implement a unique and/or custom\nconfiguration not supported by this module.</p>\n\n<h5><code>ip</code></h5>\n\n<p>The IP address the vhost listens on. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ip_based</code></h5>\n\n<p>Enables an IP-based vhost. This parameter inhibits the creation of a NameVirtualHost directive, since those are used to funnel requests to name-based vhosts. Defaults to &#39;false&#39;.</p>\n\n<h5><code>logroot</code></h5>\n\n<p>Specifies the location of the virtual host&#39;s logfiles. Defaults to <code>/var/log/&lt;apache log location&gt;/</code>.</p>\n\n<h5><code>log_level</code></h5>\n\n<p>Specifies the verbosity level of the error log. Defaults to <code>warn</code> for the global server configuration and can be overridden on a per-vhost basis using this parameter. Valid value for <code>log_level</code> is one of <code>emerg</code>, <code>alert</code>, <code>crit</code>, <code>error</code>, <code>warn</code>, <code>notice</code>, <code>info</code> or <code>debug</code>.</p>\n\n<h5><code>no_proxy_uris</code></h5>\n\n<p>Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with <code>proxy_dest</code>.</p>\n\n<h5><code>options</code></h5>\n\n<p>Lists the options for the given virtual host</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;],\n }\n</code></pre>\n\n<h5><code>override</code></h5>\n\n<p>Sets the overrides for the given virtual host. Accepts an array of AllowOverride arguments.</p>\n\n<h5><code>port</code></h5>\n\n<p>Sets the port the host is configured on.</p>\n\n<h5><code>priority</code></h5>\n\n<p>Sets the relative load-order for Apache httpd VirtualHost configuration files. Defaults to &#39;25&#39;.</p>\n\n<p>If nothing matches the priority, the first name-based vhost will be used. Likewise, passing a higher priority will cause the alphabetically first name-based vhost to be used if no other names match.</p>\n\n<p><em>Note</em>: You should not need to use this parameter. However, if you do use it, be aware that the <code>default_vhost</code> parameter for <code>apache::vhost</code> passes a priority of &#39;15&#39;.</p>\n\n<h5><code>proxy_dest</code></h5>\n\n<p>Specifies the destination address of a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>proxy_pass</code></h5>\n\n<p>Specifies an array of path =&gt; uri for a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<p>Example:</p>\n\n<pre lang=\"puppet\"><code>$proxy_pass = [\n { &#39;path&#39; =&gt; &#39;/a&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/&#39; },\n { &#39;path&#39; =&gt; &#39;/b&#39;, &#39;url&#39; =&gt; &#39;http://backend-b/&#39; },\n { &#39;path&#39; =&gt; &#39;/c&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/c&#39; }\n]\n\napache::vhost { &#39;site.name.fdqn&#39;:\n …\n proxy_pass =&gt; $proxy_pass,\n}\n</code></pre>\n\n<h5><code>rack_base_uris</code></h5>\n\n<p>Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for passenger/rack in the <code>_rack.erb</code> template. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_dest</code></h5>\n\n<p>Specifies the address to redirect to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_source</code></h5>\n\n<p>Specifies the source items? that will redirect to the destination specified in <code>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>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_source =&gt; [&#39;/images&#39;,&#39;/downloads&#39;],\n redirect_dest =&gt; [&#39;http://img.example.com/&#39;,&#39;http://downloads.example.com/&#39;],\n }\n</code></pre>\n\n<h5><code>redirect_status</code></h5>\n\n<p>Specifies the status to append to the redirect. Defaults to &#39;undef&#39;.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_status =&gt; [&#39;temp&#39;,&#39;permanent&#39;],\n }\n</code></pre>\n\n<h5><code>request_headers</code></h5>\n\n<p>Specifies additional request headers.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n request_headers =&gt; [\n &#39;append MirrorID &quot;mirror 12&quot;&#39;,\n &#39;unset MirrorID&#39;,\n ],\n }\n</code></pre>\n\n<h5><code>rewrite_base</code></h5>\n\n<p>Limits the <code>rewrite_rule</code> to the specified base URL. Defaults to &#39;undef&#39;.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n rewrite_base =&gt; &#39;/blog/&#39;,\n }\n</code></pre>\n\n<p>The above example would limit the index.html -&gt; welcome.html rewrite to only something inside of <a href=\"http://example.com/blog/\">http://example.com/blog/</a>.</p>\n\n<h5><code>rewrite_cond</code></h5>\n\n<p>Rewrites a URL via <code>rewrite_rule</code> based on the truth of specified conditions. For example</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_cond =&gt; &#39;%{HTTP_USER_AGENT} ^MSIE&#39;,\n }\n</code></pre>\n\n<p>will rewrite URLs only if the visitor is using IE. Defaults to &#39;undef&#39;.</p>\n\n<p><em>Note</em>: At the moment, each vhost is limited to a single list of rewrite conditions. In the future, you will be able to specify multiple <code>rewrite_cond</code> and <code>rewrite_rules</code> per vhost, so that different conditions get different rewrites.</p>\n\n<h5><code>rewrite_rule</code></h5>\n\n<p>Creates URL rewrite rules. Defaults to &#39;undef&#39;. This parameter allows you to specify, for example, that anyone trying to access index.html will be served welcome.html.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n }\n</code></pre>\n\n<h5><code>scriptalias</code></h5>\n\n<p>Defines a directory of CGI scripts to be aliased to the path &#39;/cgi-bin&#39;</p>\n\n<h5><code>scriptaliases</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>ScriptAlias</code> or <code>ScriptAliasMatch</code> statements as per the <a href=\"http://httpd.apache.org/docs/current/mod/mod_alias.html\"><code>mod_alias</code> documentation</a>. Each hash is expected to be of the form:</p>\n\n<pre lang=\"puppet\"><code> scriptaliases =&gt; [\n {\n alias =&gt; &#39;/myscript&#39;,\n path =&gt; &#39;/usr/share/myscript&#39;,\n },\n {\n aliasmatch =&gt; &#39;^/foo(.*)&#39;,\n path =&gt; &#39;/usr/share/fooscripts$1&#39;,\n },\n {\n aliasmatch =&gt; &#39;^/bar/(.*)&#39;,\n path =&gt; &#39;/usr/share/bar/wrapper.sh/$1&#39;,\n },\n {\n alias =&gt; &#39;/neatscript&#39;,\n path =&gt; &#39;/usr/share/neatscript&#39;,\n },\n ]\n</code></pre>\n\n<p>These directives are created in the order specified. As with <code>Alias</code> and <code>AliasMatch</code> directives the more specific aliases should come before the more general ones to avoid shadowing.</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Specifies the email address Apache will display when it renders one of its error pages.</p>\n\n<h5><code>serveraliases</code></h5>\n\n<p>Sets the server aliases of the site.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the primary name of the virtual host.</p>\n\n<h5><code>setenv</code></h5>\n\n<p>Used by HTTPD to set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>setenvif</code></h5>\n\n<p>Used by HTTPD to conditionally set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>ssl</code></h5>\n\n<p>Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are &#39;true&#39; or &#39;false&#39;.</p>\n\n<h5><code>ssl_ca</code></h5>\n\n<p>Specifies the certificate authority.</p>\n\n<h5><code>ssl_cert</code></h5>\n\n<p>Specifies the SSL certification.</p>\n\n<h5><code>ssl_protocol</code></h5>\n\n<p>Specifies the SSL Protocol (SSLProtocol).</p>\n\n<h5><code>ssl_cipher</code></h5>\n\n<p>Specifies the SSLCipherSuite.</p>\n\n<h5><code>ssl_honorcipherorder</code></h5>\n\n<p>Sets SSLHonorCipherOrder directive, used to prefer the server&#39;s cipher preference order</p>\n\n<h5><code>ssl_certs_dir</code></h5>\n\n<p>Specifies the location of the SSL certification directory. Defaults to <code>/etc/ssl/certs</code> on Debian and <code>/etc/pki/tls/certs</code> on RedHat.</p>\n\n<h5><code>ssl_chain</code></h5>\n\n<p>Specifies the SSL chain.</p>\n\n<h5><code>ssl_crl</code></h5>\n\n<p>Specifies the certificate revocation list to use.</p>\n\n<h5><code>ssl_crl_path</code></h5>\n\n<p>Specifies the location of the certificate revocation list.</p>\n\n<h5><code>ssl_key</code></h5>\n\n<p>Specifies the SSL key.</p>\n\n<h5><code>ssl_verify_client</code></h5>\n\n<p>Sets <code>SSLVerifyClient</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslverifyclient\">Apache Core documentation</a>. Defaults to undef.\nAn example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n …\n ssl_verify_client =&gt; &#39;optional&#39;,\n }\n</code></pre>\n\n<h5><code>ssl_verify_depth</code></h5>\n\n<p>Sets <code>SSLVerifyDepth</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslverifydepth\">Apache Core documentation</a>. Defaults to undef.\nAn example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n …\n ssl_verify_depth =&gt; 1,\n }\n</code></pre>\n\n<h5><code>ssl_options</code></h5>\n\n<p>Sets <code>SSLOptions</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#ssloptions\">Apache Core documentation</a>. This is the global setting for the vhost and can be a string or an array. Defaults to undef. A single string example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n …\n ssl_options =&gt; &#39;+ExportCertData&#39;,\n }\n</code></pre>\n\n<p>An array of strings example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n …\n ssl_options =&gt; [ &#39;+StrictRequire&#39;, &#39;+ExportCertData&#39; ],\n }\n</code></pre>\n\n<h5><code>ssl_proxyengine</code></h5>\n\n<p>Specifies whether to use <code>SSLProxyEngine</code> or not. Defaults to <code>false</code>.</p>\n\n<h5><code>vhost_name</code></h5>\n\n<p>This parameter is for use with name-based virtual hosting. Defaults to &#39;*&#39;.</p>\n\n<h5><code>itk</code></h5>\n\n<p>Hash containing infos to configure itk as per the <a href=\"http://mpm-itk.sesse.net/\">ITK documentation</a>.</p>\n\n<p>Keys could be:</p>\n\n<ul>\n<li>user + group</li>\n<li>assignuseridexpr</li>\n<li>assigngroupidexpr</li>\n<li>maxclientvhost</li>\n<li>nice</li>\n<li>limituidrange (Linux 3.5.0 or newer)</li>\n<li>limitgidrange (Linux 3.5.0 or newer)</li>\n</ul>\n\n<p>Usage will typically look like:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n itk =&gt; {\n user =&gt; &#39;someuser&#39;,\n group =&gt; &#39;somegroup&#39;,\n },\n }\n</code></pre>\n\n<h3>Virtual Host Examples</h3>\n\n<p>The Apache module allows you to set up pretty much any configuration of virtual host you might desire. This section will address some common configurations. Please see the <a href=\"https://github.com/puppetlabs/puppetlabs-apache/tree/master/tests\">Tests section</a> for even more examples.</p>\n\n<p>Configure a vhost with a server administrator</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;third.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n serveradmin =&gt; &#39;admin@example.com&#39;,\n }\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with aliased servers</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sixth.example.com&#39;:\n serveraliases =&gt; [\n &#39;sixth.example.org&#39;,\n &#39;sixth.example.net&#39;,\n ],\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n }\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost with a cgi-bin</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;eleventh.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/eleventh&#39;,\n scriptalias =&gt; &#39;/usr/lib/cgi-bin&#39;,\n }\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with a rack configuration</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;fifteenth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifteenth&#39;,\n rack_base_uris =&gt; [&#39;/rackapp1&#39;, &#39;/rackapp2&#39;],\n }\n</code></pre>\n\n<hr>\n\n<p>Set up a mix of SSL and non-SSL vhosts at the same domain</p>\n\n<pre lang=\"puppet\"><code> #The non-ssl vhost\n apache::vhost { &#39;first.example.com non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n }\n\n #The SSL vhost at the same domain\n apache::vhost { &#39;first.example.com ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost to redirect non-SSL connections to SSL</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sixteenth.example.com non-ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n redirect_status =&gt; &#39;permanent&#39;\n redirect_dest =&gt; &#39;https://sixteenth.example.com/&#39;\n }\n apache::vhost { &#39;sixteenth.example.com ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<hr>\n\n<p>Set up IP-based vhosts on any listen port and have them respond to requests on specific IP addresses. In this example, we will set listening on ports 80 and 81. This is required because the example vhosts are not declared with a port parameter.</p>\n\n<pre lang=\"puppet\"><code> apache::listen { &#39;80&#39;: }\n apache::listen { &#39;81&#39;: }\n</code></pre>\n\n<p>Then we will set up the IP-based vhosts</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;first.example.com&#39;:\n ip =&gt; &#39;10.0.0.10&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ip_based =&gt; true,\n }\n apache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.11&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n ip_based =&gt; true,\n }\n</code></pre>\n\n<hr>\n\n<p>Configure a mix of name-based and IP-based vhosts. First, we will add two IP-based vhosts on 10.0.0.10, one SSL and one non-SSL</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;The first IP-based vhost, non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;80&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first&#39;,\n }\n apache::vhost { &#39;The first IP-based vhost, ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;443&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first-ssl&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<p>Then, we will add two name-based vhosts listening on 10.0.0.20</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n }\n apache::vhost { &#39;third.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n }\n</code></pre>\n\n<p>If you want to add two name-based vhosts so that they will answer on either 10.0.0.10 or 10.0.0.20, you <strong>MUST</strong> declare <code>add_listen =&gt; &#39;false&#39;</code> to disable the otherwise automatic &#39;Listen 80&#39;, as it will conflict with the preceding IP-based vhosts.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n add_listen =&gt; false,\n }\n apache::vhost { &#39;fifth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n add_listen =&gt; false,\n }\n</code></pre>\n\n<h2>Implementation</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<h4>Class: <code>apache::dev</code></h4>\n\n<p>Installs Apache development libraries</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::dev&#39;: }\n</code></pre>\n\n<p>On FreeBSD you&#39;re required to define <code>apache::package</code> or <code>apache</code> class before <code>apache::dev</code>.</p>\n\n<h4>Defined Type: <code>apache::listen</code></h4>\n\n<p>Controls which ports Apache binds to for listening based on the title:</p>\n\n<pre lang=\"puppet\"><code> apache::listen { &#39;80&#39;: }\n apache::listen { &#39;443&#39;: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>Listen</code> directives to the <code>ports.conf</code> file in the Apache httpd configuration directory. <code>apache::listen</code> titles should always take the form of: <code>&lt;port&gt;</code>, <code>&lt;ipv4&gt;:&lt;port&gt;</code>, or <code>[&lt;ipv6&gt;]:&lt;port&gt;</code></p>\n\n<p>Apache httpd requires that <code>Listen</code> directives must be added for every port. The <code>apache::vhost</code> defined type will automatically add <code>Listen</code> directives unless the <code>apache::vhost</code> is passed <code>add_listen =&gt; false</code>.</p>\n\n<h4>Defined Type: <code>apache::namevirtualhost</code></h4>\n\n<p>Enables named-based hosting of a virtual host</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::namevirtualhost`: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>NameVirtualHost</code> directives to the <code>ports.conf</code> file in the Apache https configuration directory. <code>apache::namevirtualhost</code> titles should always take the form of: <code>*</code>, <code>*:&lt;port&gt;</code>, <code>_default_:&lt;port&gt;</code>, <code>&lt;ip&gt;</code>, or <code>&lt;ip&gt;:&lt;port&gt;</code>.</p>\n\n<h4>Defined Type: <code>apache::balancermember</code></h4>\n\n<p>Define members of a proxy_balancer set (mod_proxy_balancer). Very useful when using exported resources.</p>\n\n<p>On every app server you can export a balancermember like this:</p>\n\n<pre lang=\"puppet\"><code> @@apache::balancermember { &quot;${::fqdn}-puppet00&quot;:\n balancer_cluster =&gt; &#39;puppet00&#39;,\n url =&gt; &quot;ajp://${::fqdn}:8009&quot;\n options =&gt; [&#39;ping=5&#39;, &#39;disablereuse=on&#39;, &#39;retry=5&#39;, &#39;ttl=120&#39;],\n }\n</code></pre>\n\n<p>And on the proxy itself you create the balancer cluster using the defined type apache::balancer:</p>\n\n<pre lang=\"puppet\"><code> apache::balancer { &#39;puppet00&#39;: }\n</code></pre>\n\n<p>If you need to use ProxySet in the balncer config you can do as so:</p>\n\n<pre lang=\"puppet\"><code> apache::balancer { &#39;puppet01&#39;:\n proxy_set =&gt; {&#39;stickysession&#39; =&gt; &#39;JSESSIONID&#39;},\n }\n</code></pre>\n\n<h3>Templates</h3>\n\n<p>The Apache module relies heavily on templates to enable the <code>vhost</code> and <code>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>\n\n<h2>Limitations</h2>\n\n<p>This has been tested on Ubuntu Precise, Debian Wheezy, CentOS 5.8, and FreeBSD 9.1.</p>\n\n<h2>Development</h2>\n\n<h3>Overview</h3>\n\n<p>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>\n\n<p>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>\n\n<p>You can read the complete module contribution guide <a href=\"http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing\">on the Puppet Labs wiki.</a></p>\n\n<h3>Running tests</h3>\n\n<p>This project contains tests for both <a href=\"http://rspec-puppet.com/\">rspec-puppet</a> and <a href=\"https://github.com/puppetlabs/rspec-system\">rspec-system</a> to verify functionality. For in-depth information please see their respective documentation.</p>\n\n<p>Quickstart:</p>\n\n<pre><code>gem install bundler\nbundle install\nbundle exec rake spec\nbundle exec rake spec:system\n</code></pre>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.</p>\n</section>",
1015
+ "readme": "<section class=\"markdown\"><h1>apache</h1>\n\n<p><a href=\"https://travis-ci.org/puppetlabs/puppetlabs-apache\"><img src=\"https://travis-ci.org/puppetlabs/puppetlabs-apache.png?branch=main\" alt=\"Build Status\"></a></p>\n\n<h4>Table of Contents</h4>\n\n<ol>\n<li><a href=\"#overview\">Overview - What is the Apache module?</a></li>\n<li><a href=\"#module-description\">Module Description - What does the module do?</a></li>\n<li><a href=\"#setup\">Setup - The basics of getting started with Apache</a>\n\n<ul>\n<li><a href=\"#beginning-with-apache\">Beginning with Apache - Installation</a></li>\n<li><a href=\"#configure-a-virtual-host\">Configure a Virtual Host - Basic options for getting started</a></li>\n</ul></li>\n<li><a href=\"#usage\">Usage - The classes, defined types, and their parameters available for configuration</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a>\n\n<ul>\n<li><a href=\"#class-apache\">Class: apache</a></li>\n<li><a href=\"#classes-apachemodname\">Classes: apache::mod::*</a></li>\n<li><a href=\"#defined-type-apachevhost\">Defined Type: apache::vhost</a></li>\n</ul></li>\n<li><a href=\"#virtual-host-examples\">Virtual Host Examples - Demonstrations of some configuration options</a></li>\n</ul></li>\n<li><a href=\"#implementation\">Implementation - An under-the-hood peek at what the module is doing</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a></li>\n<li><a href=\"#templates\">Templates</a></li>\n</ul></li>\n<li><a href=\"#limitations\">Limitations - OS compatibility, etc.</a></li>\n<li><a href=\"#development\">Development - Guide for contributing to the module</a></li>\n<li><a href=\"#release-notes\">Release Notes - Notes on the most recent updates to the module</a></li>\n</ol>\n\n<h2>Overview</h2>\n\n<p>The Apache module allows you to set up virtual hosts and manage web services with minimal effort.</p>\n\n<h2>Module Description</h2>\n\n<p>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>\n\n<h2>Setup</h2>\n\n<p><strong>What Apache affects:</strong></p>\n\n<ul>\n<li>configuration files and directories (created and written to)\n\n<ul>\n<li><strong>NOTE</strong>: Configurations that are <em>not</em> managed by Puppet will be purged.</li>\n</ul></li>\n<li>package/service/configuration files for Apache</li>\n<li>Apache modules</li>\n<li>virtual hosts</li>\n<li>listened-to ports</li>\n<li><code>/etc/make.conf</code> on FreeBSD</li>\n</ul>\n\n<h3>Beginning with Apache</h3>\n\n<p>To install Apache with the default parameters</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;: }\n</code></pre>\n\n<p>The defaults are determined by your operating system (e.g. Debian systems have one set of defaults, RedHat systems have another). These defaults will work well in a testing environment, but are not suggested for production. To establish customized parameters</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;:\n default_mods =&gt; false,\n default_confd_files =&gt; false,\n }\n</code></pre>\n\n<h3>Configure a virtual host</h3>\n\n<p>Declaring the <code>apache</code> class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving <code>$apache::docroot</code>.</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;: }\n</code></pre>\n\n<p>To configure a very basic, name-based virtual host</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;first.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n }\n</code></pre>\n\n<p><em>Note:</em> The default priority is 15. If nothing matches this priority, the alphabetically first name-based vhost will be used. This is also true if you pass a higher priority and no names match anything else.</p>\n\n<p>A slightly more complicated example, which moves the docroot owner/group</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;second.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n docroot_owner =&gt; &#39;third&#39;,\n docroot_group =&gt; &#39;third&#39;,\n }\n</code></pre>\n\n<p>To set up a virtual host with SSL and default SSL certificates</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;ssl.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/ssl&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<p>To set up a virtual host with SSL and specific SSL certificates</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n ssl =&gt; true,\n ssl_cert =&gt; &#39;/etc/ssl/fourth.example.com.cert&#39;,\n ssl_key =&gt; &#39;/etc/ssl/fourth.example.com.key&#39;,\n }\n</code></pre>\n\n<p>To set up a virtual host with IP address different than &#39;*&#39;</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;subdomain.example.com&#39;:\n ip =&gt; &#39;127.0.0.1&#39;,\n port =&gt; &#39;80&#39;,\n docrout =&gt; &#39;/var/www/subdomain&#39;,\n }\n</code></pre>\n\n<p>To set up a virtual host with wildcard alias for subdomain mapped to same named directory\n<code>http://examle.com.loc =&gt; /var/www/example.com</code></p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;subdomain.loc&#39;:\n vhost_name =&gt; &#39;*&#39;,\n port =&gt; &#39;80&#39;,\n virtual_docroot&#39; =&gt; &#39;/var/www/%-2+&#39;,\n docroot =&gt; &#39;/var/www&#39;,\n serveraliases =&gt; [&#39;*.loc&#39;,],\n }\n</code></pre>\n\n<p>To set up a virtual host with suPHP</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;suphp.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/appuser/myphpapp&#39;,\n suphp_addhandler =&gt; &#39;x-httpd-php&#39;,\n suphp_engine =&gt; &#39;on&#39;,\n suphp_configpath =&gt; &#39;/etc/php5/apache2&#39;,\n directories =&gt; { path =&gt; &#39;/home/appuser/myphpapp&#39;,\n &#39;suphp&#39; =&gt; { user =&gt; &#39;myappuser&#39;, group =&gt; &#39;myappgroup&#39; },\n }\n }\n</code></pre>\n\n<p>To set up a virtual host with WSGI</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;wsgi.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/pythonapp&#39;,\n wsgi_daemon_process =&gt; &#39;wsgi&#39;,\n wsgi_daemon_process_options =&gt;\n { processes =&gt; &#39;2&#39;, threads =&gt; &#39;15&#39;, display-name =&gt; &#39;%{GROUP}&#39; },\n wsgi_process_group =&gt; &#39;wsgi&#39;,\n wsgi_script_aliases =&gt; { &#39;/&#39; =&gt; &#39;/var/www/demo.wsgi&#39; },\n }\n</code></pre>\n\n<p>Starting 2.2.16, httpd supports <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_dir.html#fallbackresource\">FallbackResource</a> which is a simple replace for common RewriteRules:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;wordpress.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/wordpress&#39;,\n fallbackresource =&gt; &#39;/index.php&#39;,\n }\n</code></pre>\n\n<p>Please note that the <code>disabled</code> argument to FallbackResource is only supported since 2.2.24.</p>\n\n<p>To see a list of all virtual host parameters, <a href=\"#defined-type-apachevhost\">please go here</a>. To see an extensive list of virtual host examples <a href=\"#virtual-host-examples\">please look here</a>.</p>\n\n<h2>Usage</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<p>This module modifies Apache configuration files and directories and will purge any configuration not managed by Puppet. Configuration of Apache should be managed by Puppet, as non-puppet configuration files can cause unexpected failures.</p>\n\n<p>It is possible to temporarily disable full Puppet management by setting the <code>purge_configs</code> parameter within the base <code>apache</code> class to &#39;false&#39;. This option should only be used as a temporary means of saving and relocating customized configurations.</p>\n\n<h4>Class: <code>apache</code></h4>\n\n<p>The Apache module&#39;s primary class, <code>apache</code>, guides the basic setup of Apache on your system.</p>\n\n<p>You may establish a default vhost in this class, the <code>vhost</code> class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the <code>vhost</code> type.</p>\n\n<p><strong>Parameters within <code>apache</code>:</strong></p>\n\n<h5><code>default_mods</code></h5>\n\n<p>Sets up Apache with default settings based on your OS. Defaults to &#39;true&#39;, set to &#39;false&#39; for customized configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets up a default virtual host. Defaults to &#39;true&#39;, set to &#39;false&#39; to set up <a href=\"#configure-a-virtual-host\">customized virtual hosts</a>.</p>\n\n<h5><code>default_confd_files</code></h5>\n\n<p>Generates default set of include-able apache configuration files under <code>${apache::confd_dir}</code> directory. These configuration files correspond to what is usually installed with apache package on given platform.</p>\n\n<h5><code>default_ssl_vhost</code></h5>\n\n<p>Sets up a default SSL virtual host. Defaults to &#39;false&#39;.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;default-ssl&#39;:\n port =&gt; 443,\n ssl =&gt; true,\n docroot =&gt; $docroot,\n scriptalias =&gt; $scriptalias,\n serveradmin =&gt; $serveradmin,\n access_log_file =&gt; &quot;ssl_${access_log_file}&quot;,\n }\n</code></pre>\n\n<p>SSL vhosts only respond to HTTPS queries.</p>\n\n<h5><code>default_ssl_cert</code></h5>\n\n<p>The default SSL certification, which is automatically set based on your operating system (<code>/etc/pki/tls/certs/localhost.crt</code> for RedHat, <code>/etc/ssl/certs/ssl-cert-snakeoil.pem</code> for Debian, <code>/usr/local/etc/apache22/server.crt</code> for FreeBSD). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_key</code></h5>\n\n<p>The default SSL key, which is automatically set based on your operating system (<code>/etc/pki/tls/private/localhost.key</code> for RedHat, <code>/etc/ssl/private/ssl-cert-snakeoil.key</code> for Debian, <code>/usr/local/etc/apache22/server.key</code> for FreeBSD). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_chain</code></h5>\n\n<p>The default SSL chain, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_ca</code></h5>\n\n<p>The default certificate authority, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl_path</code></h5>\n\n<p>The default certificate revocation list path, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl</code></h5>\n\n<p>The default certificate revocation list to use, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>service_name</code></h5>\n\n<p>Name of apache service to run. Defaults to: <code>&#39;httpd&#39;</code> on RedHat, <code>&#39;apache2&#39;</code> on Debian, and <code>&#39;apache22&#39;</code> on FreeBSD.</p>\n\n<h5><code>service_enable</code></h5>\n\n<p>Determines whether the &#39;httpd&#39; service is enabled when the machine is booted. Defaults to &#39;true&#39;.</p>\n\n<h5><code>service_ensure</code></h5>\n\n<p>Determines whether the service should be running. Can be set to &#39;undef&#39; which is useful when you want to let the service be managed by some other application like pacemaker. Defaults to &#39;running&#39;.</p>\n\n<h5><code>purge_configs</code></h5>\n\n<p>Removes all other apache configs and vhosts, which is automatically set 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>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Sets the server administrator. Defaults to &#39;root@localhost&#39;.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the servername. Defaults to fqdn provided by facter.</p>\n\n<h5><code>server_root</code></h5>\n\n<p>A value to be set as <code>ServerRoot</code> in main configuration file (<code>httpd.conf</code>). Defaults to <code>/etc/httpd</code> on RedHat, <code>/etc/apache2</code> on Debian and <code>/usr/local</code> on FreeBSD.</p>\n\n<h5><code>sendfile</code></h5>\n\n<p>Makes Apache use the Linux kernel &#39;sendfile&#39; to serve static files. Defaults to &#39;On&#39;.</p>\n\n<h5><code>server_root</code></h5>\n\n<p>A value to be set as <code>ServerRoot</code> in main configuration file (<code>httpd.conf</code>). Defaults to <code>/etc/httpd</code> on RedHat and <code>/etc/apache2</code> on Debian.</p>\n\n<h5><code>error_documents</code></h5>\n\n<p>Enables custom error documents. Defaults to &#39;false&#39;.</p>\n\n<h5><code>httpd_dir</code></h5>\n\n<p>Changes the base location of the configuration directories used for the service. This is useful for specially repackaged HTTPD builds but may have unintended consequences when used in combination with the default distribution packages. Default is based on your OS.</p>\n\n<h5><code>confd_dir</code></h5>\n\n<p>Changes the location of the configuration directory your custom configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>vhost_dir</code></h5>\n\n<p>Changes the location of the configuration directory your virtual host configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mod_dir</code></h5>\n\n<p>Changes the location of the configuration directory your Apache modules configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mpm_module</code></h5>\n\n<p>Configures which mpm module is loaded and configured for the httpd process by the <code>apache::mod::event</code>, <code>apache::mod::itk</code>, <code>apache::mod::peruser</code>, <code>apache::mod::prefork</code> and <code>apache::mod::worker</code> classes. Must be set to <code>false</code> to explicitly declare <code>apache::mod::event</code>, <code>apache::mod::itk</code>, <code>apache::mod::peruser</code>, <code>apache::mod::prefork</code> or <code>apache::mod::worker</code> classes with parameters. All possible values are <code>event</code>, <code>itk</code>, <code>peruser</code>, <code>prefork</code>, <code>worker</code> (valid values depend on agent&#39;s OS), or the boolean <code>false</code>. Defaults to <code>prefork</code> on RedHat and FreeBSD and <code>worker</code> on Debian. Note: on FreeBSD switching between different mpm modules is quite difficult (but possible). Before changing <code>$mpm_module</code> one has to deinstall all packages that depend on currently installed <code>apache</code>.</p>\n\n<h5><code>conf_template</code></h5>\n\n<p>Setting this allows you to override the template used for the main apache configuration file. This is a potentially risky thing to do as this module has been built around the concept of a minimal configuration file with most of the configuration coming in the form of conf.d/ entries. Defaults to &#39;apache/httpd.conf.erb&#39;.</p>\n\n<h5><code>keepalive</code></h5>\n\n<p>Setting this allows you to enable persistent connections.</p>\n\n<h5><code>keepalive_timeout</code></h5>\n\n<p>Amount of time the server will wait for subsequent requests on a persistent connection. Defaults to &#39;15&#39;.</p>\n\n<h5><code>logroot</code></h5>\n\n<p>Changes the location of the directory Apache log files are placed in. Defaut is based on your OS.</p>\n\n<h5><code>log_level</code></h5>\n\n<p>Changes the verbosity level of the error log. Defaults to &#39;warn&#39;. Valid values are <code>emerg</code>, <code>alert</code>, <code>crit</code>, <code>error</code>, <code>warn</code>, <code>notice</code>, <code>info</code> or <code>debug</code>.</p>\n\n<h5><code>ports_file</code></h5>\n\n<p>Changes the name of the file containing Apache ports configuration. Default is <code>${conf_dir}/ports.conf</code>.</p>\n\n<h5><code>server_tokens</code></h5>\n\n<p>Controls how much information Apache sends to the browser about itself and the operating system. See Apache documentation for &#39;ServerTokens&#39;. Defaults to &#39;OS&#39;.</p>\n\n<h5><code>server_signature</code></h5>\n\n<p>Allows the configuration of a trailing footer line under server-generated documents. See Apache documentation for &#39;ServerSignature&#39;. Defaults to &#39;On&#39;.</p>\n\n<h5><code>trace_enable</code></h5>\n\n<p>Controls, how TRACE requests per RFC 2616 are handled. See Apache documentation for &#39;TraceEnable&#39;. Defaults to &#39;On&#39;.</p>\n\n<h5><code>manage_user</code></h5>\n\n<p>Setting this to false will avoid the user resource to be created by this module. This is useful when you already have a user created in another puppet module and that you want to used it to run apache. Without this, it would result in a duplicate resource error.</p>\n\n<h5><code>manage_group</code></h5>\n\n<p>Setting this to false will avoid the group resource to be created by this module. This is useful when you already have a group created in another puppet module and that you want to used it for apache. Without this, it would result in a duplicate resource error.</p>\n\n<h5><code>package_ensure</code></h5>\n\n<p>Allow control over the package ensure statement. This is useful if you want to make sure apache is always at the latest version or whether it is only installed.</p>\n\n<h4>Class: <code>apache::default_mods</code></h4>\n\n<p>Installs default Apache modules based on what OS you are running</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::default_mods&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::mod</code></h4>\n\n<p>Used to enable arbitrary Apache httpd modules for which there is no specific <code>apache::mod::[name]</code> class. The <code>apache::mod</code> defined type will also install the required packages to enable the module, if any.</p>\n\n<pre lang=\"puppet\"><code> apache::mod { &#39;rewrite&#39;: }\n apache::mod { &#39;ldap&#39;: }\n</code></pre>\n\n<h4>Classes: <code>apache::mod::[name]</code></h4>\n\n<p>There are many <code>apache::mod::[name]</code> classes within this module that can be declared using <code>include</code>:</p>\n\n<ul>\n<li><code>alias</code></li>\n<li><code>auth_basic</code></li>\n<li><code>auth_kerb</code></li>\n<li><code>autoindex</code></li>\n<li><code>cache</code></li>\n<li><code>cgi</code></li>\n<li><code>cgid</code></li>\n<li><code>dav</code></li>\n<li><code>dav_fs</code></li>\n<li><code>dav_svn</code></li>\n<li><code>deflate</code></li>\n<li><code>dev</code></li>\n<li><code>dir</code>*</li>\n<li><code>disk_cache</code></li>\n<li><code>event</code></li>\n<li><code>fastcgi</code></li>\n<li><code>fcgid</code></li>\n<li><code>headers</code></li>\n<li><code>info</code></li>\n<li><code>itk</code></li>\n<li><code>ldap</code></li>\n<li><code>mime</code></li>\n<li><code>mime_magic</code>*</li>\n<li><code>mpm_event</code></li>\n<li><code>negotiation</code></li>\n<li><code>nss</code>*</li>\n<li><code>passenger</code>*</li>\n<li><code>perl</code></li>\n<li><code>peruser</code></li>\n<li><code>php</code> (requires <a href=\"#mpm_module\"><code>mpm_module</code></a> set to <code>prefork</code>)</li>\n<li><code>prefork</code>*</li>\n<li><code>proxy</code>*</li>\n<li><code>proxy_ajp</code></li>\n<li><code>proxy_html</code></li>\n<li><code>proxy_http</code></li>\n<li><code>python</code></li>\n<li><code>reqtimeout</code></li>\n<li><code>rewrite</code></li>\n<li><code>rpaf</code>*</li>\n<li><code>setenvif</code></li>\n<li><code>ssl</code>* (see <a href=\"#class-apachemodssl\">apache::mod::ssl</a> below)</li>\n<li><code>status</code>*</li>\n<li><code>suphp</code></li>\n<li><code>userdir</code>*</li>\n<li><code>vhost_alias</code></li>\n<li><code>worker</code>*</li>\n<li><code>wsgi</code> (see <a href=\"#class-apachemodwsgi\">apache::mod::wsgi</a> below)</li>\n<li><code>xsendfile</code></li>\n</ul>\n\n<p>Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module&#39;s configuration. Most of the time, these parameters will not require any configuration or attention.</p>\n\n<p>The modules mentioned above, and other Apache modules that have templates, will cause template files to be dropped along with the mod install, and the module will not work without the template. Any mod without a template will install package but drop no files.</p>\n\n<h4>Class: <code>apache::mod::ssl</code></h4>\n\n<p>Installs Apache SSL capabilities and utilizes <code>ssl.conf.erb</code> template. These are the defaults:</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::mod::ssl&#39;:\n ssl_compression =&gt; false,\n ssl_options =&gt; [ &#39;StdEnvVars&#39; ],\n }\n</code></pre>\n\n<p>To <em>use</em> SSL with a virtual host, you must either set the<code>default_ssl_vhost</code> parameter in <code>apache</code> to &#39;true&#39; or set the <code>ssl</code> parameter in <code>apache::vhost</code> to &#39;true&#39;.</p>\n\n<h4>Class: <code>apache::mod::wsgi</code></h4>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::mod::wsgi&#39;:\n wsgi_socket_prefix =&gt; &quot;\\${APACHE_RUN_DIR}WSGI&quot;,\n wsgi_python_home =&gt; &#39;/path/to/virtenv&#39;,\n wsgi_python_path =&gt; &#39;/path/to/virtenv/site-packages&#39;,\n }\n</code></pre>\n\n<h4>Defined Type: <code>apache::vhost</code></h4>\n\n<p>The Apache module allows a lot of flexibility in the set up and configuration of virtual hosts. This flexibility is due, in part, to <code>vhost</code>&#39;s setup as a defined resource type, which allows it to be evaluated multiple times with different parameters.</p>\n\n<p>The <code>vhost</code> defined type allows you to have specialized configurations for virtual hosts that have requirements outside of the defaults. You can set up a default vhost within the base <code>apache</code> class as well as set a customized vhost setup as default. Your customized vhost (priority 10) will be privileged over the base class vhost (15).</p>\n\n<p>If you have a series of specific configurations and do not want a base <code>apache</code> class default vhost, make sure to set the base class default host to &#39;false&#39;.</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache&#39;:\n default_vhost =&gt; false,\n }\n</code></pre>\n\n<p><strong>Parameters within <code>apache::vhost</code>:</strong></p>\n\n<p>The default values for each parameter will vary based on operating system and type of virtual host.</p>\n\n<h5><code>access_log</code></h5>\n\n<p>Specifies whether <code>*_access.log</code> directives should be configured. Valid values are &#39;true&#39; and &#39;false&#39;. Defaults to &#39;true&#39;.</p>\n\n<h5><code>access_log_file</code></h5>\n\n<p>Points to the <code>*_access.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_pipe</code></h5>\n\n<p>Specifies a pipe to send access log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_syslog</code></h5>\n\n<p>Sends all access log messages to syslog. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_format</code></h5>\n\n<p>Specifies either a LogFormat nickname or custom format string for access log. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>add_listen</code></h5>\n\n<p>Determines whether the vhost creates a listen statement. The default value is &#39;true&#39;.</p>\n\n<p>Setting <code>add_listen</code> to &#39;false&#39; stops the vhost from creating a listen statement, and this is important when you combine vhosts that are not passed an <code>ip</code> parameter with vhosts that <em>are</em> passed the <code>ip</code> parameter.</p>\n\n<h5><code>aliases</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>Alias</code> or <code>AliasMatch</code> statements as per the <a href=\"http://httpd.apache.org/docs/current/mod/mod_alias.html\"><code>mod_alias</code> documentation</a>. Each hash is expected to be of the form:</p>\n\n<pre><code>aliases =&gt; [\n { aliasmatch =&gt; &#39;^/image/(.*)\\.jpg$&#39;, path =&gt; &#39;/files/jpg.images/$1.jpg&#39; }\n { alias =&gt; &#39;/image&#39;, path =&gt; &#39;/ftp/pub/image&#39; },\n],\n</code></pre>\n\n<p>For <code>Alias</code> and <code>AliasMatch</code> to work, each will need a corresponding <code>&lt;Directory /path/to/directory&gt;</code> or <code>&lt;Location /path/to/directory&gt;</code> block. The <code>Alias</code> and <code>AliasMatch</code> directives are created in the order specified in the <code>aliases</code> paramter. As described in the <a href=\"http://httpd.apache.org/docs/current/mod/mod_alias.html\"><code>mod_alias</code> documentation</a> more specific <code>Alias</code> or <code>AliasMatch</code> directives should come before the more general ones to avoid shadowing.</p>\n\n<p><strong>Note:</strong> If <code>apache::mod::passenger</code> is loaded and <code>PassengerHighPerformance true</code> is set, then <code>Alias</code> may have issues honouring the <code>PassengerEnabled off</code> statement. See <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">this article</a> for details.</p>\n\n<h5><code>block</code></h5>\n\n<p>Specifies the list of things Apache will block access to. The default is an empty set, &#39;[]&#39;. Currently, the only option is &#39;scm&#39;, which blocks web access to .svn, .git and .bzr directories. To add to this, please see the <a href=\"#development\">Development</a> section.</p>\n\n<h5><code>custom_fragment</code></h5>\n\n<p>Pass a string of custom configuration directives to be placed at the end of the vhost configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets a given <code>apache::vhost</code> as the default to serve requests that do not match any other <code>apache::vhost</code> definitions. The default value is &#39;false&#39;.</p>\n\n<h5><code>directories</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>&lt;Directory /path/to/directory&gt;...&lt;/Directory&gt;</code> directive blocks as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#directory\">Apache core documentation</a>. The <code>path</code> key is required in these hashes. An optional <code>provider</code> defaults to <code>directory</code>. Usage will typically look like:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [\n { path =&gt; &#39;/path/to/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n { path =&gt; &#39;/path/to/another/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n ],\n }\n</code></pre>\n\n<p><em>Note:</em> At least one directory should match <code>docroot</code> parameter, once you start declaring directories <code>apache::vhost</code> assumes that all required <code>&lt;Directory&gt;</code> blocks will be declared.</p>\n\n<p><em>Note:</em> If not defined a single default <code>&lt;Directory&gt;</code> block will be created that matches the <code>docroot</code> parameter.</p>\n\n<p><code>provider</code> can be set to any of <code>directory</code>, <code>files</code>, or <code>location</code>. If the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#files\">pathspec starts with a <code>~</code></a>, httpd will interpret this as the equivalent of <code>DirectoryMatch</code>, <code>FilesMatch</code>, or <code>LocationMatch</code>, respectively.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;files.example.net&#39;:\n docroot =&gt; &#39;/var/www/files&#39;,\n directories =&gt; [\n { path =&gt; &#39;~ (\\.swp|\\.bak|~)$&#39;, &#39;provider&#39; =&gt; &#39;files&#39;, &#39;deny&#39; =&gt; &#39;from all&#39; },\n ],\n }\n</code></pre>\n\n<p>The directives will be embedded within the <code>Directory</code> (<code>Files</code>, or <code>Location</code>) directive block, missing directives should be undefined and not be added, resulting in their default vaules in Apache. Currently this is the list of supported directives:</p>\n\n<h6><code>addhandlers</code></h6>\n\n<p>Sets <code>AddHandler</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addhandler\">Apache Core documentation</a>. Accepts a list of hashes of the form <code>{ handler =&gt; &#39;handler-name&#39;, extensions =&gt; [&#39;extension&#39;]}</code>. Note that <code>extensions</code> is a list of extenstions being handled by the handler.\nAn example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;,\n addhandlers =&gt; [ { handler =&gt; &#39;cgi-script&#39;, extensions =&gt; [&#39;.cgi&#39;]} ],\n } ],\n }\n</code></pre>\n\n<h6><code>allow</code></h6>\n\n<p>Sets an <code>Allow</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow\">Apache Core documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow =&gt; &#39;from example.org&#39; } ],\n }\n</code></pre>\n\n<h6><code>allow_override</code></h6>\n\n<p>Sets the usage of <code>.htaccess</code> files as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride\">Apache core documentation</a>. Should accept in the form of a list or a string. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow_override =&gt; [&#39;AuthConfig&#39;, &#39;Indexes&#39;] } ],\n }\n</code></pre>\n\n<h6><code>deny</code></h6>\n\n<p>Sets an <code>Deny</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#deny\">Apache Core documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, deny =&gt; &#39;from example.org&#39; } ],\n }\n</code></pre>\n\n<h6><code>error_documents</code></h6>\n\n<p>A list of hashes which can be used to override the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#errordocument\">ErrorDocument</a> settings for this directory. Example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n directories =&gt; [ { path =&gt; &#39;/srv/www&#39;\n error_documents =&gt; [\n { &#39;error_code&#39; =&gt; &#39;503&#39;, &#39;document&#39; =&gt; &#39;/service-unavail&#39; },\n ],\n }]\n }\n</code></pre>\n\n<h6><code>headers</code></h6>\n\n<p>Adds lines for <code>Header</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_headers.html#header\">Apache Header documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; {\n path =&gt; &#39;/path/to/directory&#39;,\n headers =&gt; &#39;Set X-Robots-Tag &quot;noindex, noarchive, nosnippet&quot;&#39;,\n },\n }\n</code></pre>\n\n<h6><code>options</code></h6>\n\n<p>Lists the options for the given <code>&lt;Directory&gt;</code> block</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;] }],\n }\n</code></pre>\n\n<h6><code>index_options</code></h6>\n\n<p>Styles the list</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;], index_options =&gt; [&#39;IgnoreCase&#39;, &#39;FancyIndexing&#39;, &#39;FoldersFirst&#39;, &#39;NameWidth=*&#39;, &#39;DescriptionWidth=*&#39;, &#39;SuppressHTMLPreamble&#39;] }],\n }\n</code></pre>\n\n<h6><code>index_order_default</code></h6>\n\n<p>Sets the order of the list </p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, order =&gt; &#39;Allow,Deny&#39;, index_order_default =&gt; [&#39;Descending&#39;, &#39;Date&#39;]}, ],\n }\n</code></pre>\n\n<h6><code>order</code></h6>\n\n<p>Sets the order of processing <code>Allow</code> and <code>Deny</code> statements as per <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order\">Apache core documentation</a>. An example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, order =&gt; &#39;Allow,Deny&#39; } ],\n }\n</code></pre>\n\n<h6><code>auth_type</code></h6>\n\n<p>Sets the value for <code>AuthType</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#authtype\">Apache AuthType\ndocumentation</a>.</p>\n\n<h6><code>auth_name</code></h6>\n\n<p>Sets the value for <code>AuthName</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#authname\">Apache AuthName\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_algorithm</code></h6>\n\n<p>Sets the value for <code>AuthDigestAlgorithm</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestalgorithm\">Apache\nAuthDigestAlgorithm\ndocumentation</a></p>\n\n<h6><code>auth_digest_domain</code></h6>\n\n<p>Sets the value for <code>AuthDigestDomain</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestdomain\">Apache AuthDigestDomain\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_nonce_lifetime</code></h6>\n\n<p>Sets the value for <code>AuthDigestNonceLifetime</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestnoncelifetime\">Apache\nAuthDigestNonceLifetime\ndocumentation</a></p>\n\n<h6><code>auth_digest_provider</code></h6>\n\n<p>Sets the value for <code>AuthDigestProvider</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestprovider\">Apache AuthDigestProvider\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_qop</code></h6>\n\n<p>Sets the value for <code>AuthDigestQop</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestqop\">Apache AuthDigestQop\ndocumentation</a>.</p>\n\n<h6><code>auth_digest_shmem_size</code></h6>\n\n<p>Sets the value for <code>AuthAuthDigestShmemSize</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html#authdigestshmemsize\">Apache AuthDigestShmemSize\ndocumentation</a>.</p>\n\n<h6><code>auth_basic_authoritative</code></h6>\n\n<p>Sets the value for <code>AuthBasicAuthoritative</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_basic.html#authbasicauthoritative\">Apache\nAuthBasicAuthoritative\ndocumentation</a>.</p>\n\n<h6><code>auth_basic_fake</code></h6>\n\n<p>Sets the value for <code>AuthBasicFake</code> as per the <a href=\"https://httpd.apache.org/docs/trunk/mod/mod_auth_basic.html#authbasicfake\">Apache AuthBasicFake\ndocumentation</a>.</p>\n\n<h6><code>auth_basic_provider</code></h6>\n\n<p>Sets the value for <code>AuthBasicProvider</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_auth_basic.html#authbasicprovider\">Apache AuthBasicProvider\ndocumentation</a>.</p>\n\n<h6><code>auth_user_file</code></h6>\n\n<p>Sets the value for <code>AuthUserFile</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_authn_file.html#authuserfile\">Apache AuthUserFile\ndocumentation</a>.</p>\n\n<h6><code>auth_require</code></h6>\n\n<p>Sets the value for <code>AuthName</code> as per the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#require\">Apache Require\ndocumentation</a></p>\n\n<h6><code>passenger_enabled</code></h6>\n\n<p>Sets the value for the <code>PassengerEnabled</code> directory to <code>on</code> or <code>off</code> as per the <a href=\"http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerEnabled\">Passenger documentation</a>.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, passenger_enabled =&gt; &#39;off&#39; } ],\n }\n</code></pre>\n\n<p><strong>Note:</strong> This directive requires <code>apache::mod::passenger</code> to be active, Apache may not start with an unrecognised directive without it.</p>\n\n<p><strong>Note:</strong> Be aware that there is an <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">issue</a> using the <code>PassengerEnabled</code> directive with the <code>PassengerHighPerformance</code> directive.</p>\n\n<h6><code>ssl_options</code></h6>\n\n<p>String or list of <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_ssl.html#ssloptions\"><code>SSLOptions</code></a> for the given <code>&lt;Directory&gt;</code> block. This overrides, or refines the <a href=\"https://httpd.apache.org/docs/2.2/mod/mod_ssl.html#ssloptions\"><code>SSLOptions</code></a> of the parent block (either vhost, or server).</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;secure.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [\n { path =&gt; &#39;/path/to/directory&#39;, ssl_options =&gt; &#39;+ExportCertData&#39; }\n { path =&gt; &#39;/path/to/different/dir&#39;, ssl_options =&gt; [ &#39;-StdEnvVars&#39;, &#39;+ExportCertData&#39;] },\n ],\n }\n</code></pre>\n\n<h6><code>suphp</code></h6>\n\n<p>An array containing two values: User and group for the <a href=\"http://www.suphp.org/DocumentationView.html?file=apache/CONFIG\">suPHP_UserGroup</a> setting.\nThis directive must be used with <code>suphp_engine =&gt; on</code> in the vhost declaration. This directive only works in <code>&lt;Directory&gt;</code> or <code>&lt;Location&gt;</code>.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;secure.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [\n { path =&gt; &#39;/path/to/directory&#39;, suphp =&gt; { user =&gt; &#39;myappuser&#39;, group =&gt; &#39;myappgroup&#39; }\n ],\n }\n</code></pre>\n\n<h6><code>custom_fragment</code></h6>\n\n<p>Pass a string of custom configuration directives to be placed at the end of the\ndirectory configuration.</p>\n\n<h5><code>directoryindex</code></h5>\n\n<p>Set a DirectoryIndex directive, to set the list of resources to look for, when the client requests an index of the directory by specifying a / at the end of the directory name..</p>\n\n<h5><code>docroot</code></h5>\n\n<p>Provides the DocumentRoot directive, identifying the directory Apache serves files from.</p>\n\n<h5><code>docroot_group</code></h5>\n\n<p>Sets group access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>docroot_owner</code></h5>\n\n<p>Sets individual user access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>error_log</code></h5>\n\n<p>Specifies whether <code>*_error.log</code> directives should be configured. Defaults to &#39;true&#39;.</p>\n\n<h5><code>error_log_file</code></h5>\n\n<p>Points to the <code>*_error.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_log_pipe</code></h5>\n\n<p>Specifies a pipe to send error log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_log_syslog</code></h5>\n\n<p>Sends all error log messages to syslog. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_documents</code></h5>\n\n<p>A list of hashes which can be used to override the <a href=\"https://httpd.apache.org/docs/2.2/mod/core.html#errordocument\">ErrorDocument</a> settings for this vhost. Defaults to <code>[]</code>. Example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n error_documents =&gt; [\n { &#39;error_code&#39; =&gt; &#39;503&#39;, &#39;document&#39; =&gt; &#39;/service-unavail&#39; },\n { &#39;error_code&#39; =&gt; &#39;407&#39;, &#39;document&#39; =&gt; &#39;https://example.com/proxy/login&#39; },\n ],\n }\n</code></pre>\n\n<h5><code>ensure</code></h5>\n\n<p>Specifies if the vhost file is present or absent.</p>\n\n<h5><code>fastcgi_server</code></h5>\n\n<p>Specifies the filename as an external FastCGI application. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>fastcgi_socket</code></h5>\n\n<p>Filename used to communicate with the web server. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>fastcgi_dir</code></h5>\n\n<p>Directory to enable for FastCGI. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>additional_includes</code></h5>\n\n<p>Specifies paths to additional static vhost-specific Apache configuration files.\nThis option is useful when you need to implement a unique and/or custom\nconfiguration not supported by this module.</p>\n\n<h5><code>ip</code></h5>\n\n<p>The IP address the vhost listens on. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ip_based</code></h5>\n\n<p>Enables an IP-based vhost. This parameter inhibits the creation of a NameVirtualHost directive, since those are used to funnel requests to name-based vhosts. Defaults to &#39;false&#39;.</p>\n\n<h5><code>logroot</code></h5>\n\n<p>Specifies the location of the virtual host&#39;s logfiles. Defaults to <code>/var/log/&lt;apache log location&gt;/</code>.</p>\n\n<h5><code>log_level</code></h5>\n\n<p>Specifies the verbosity level of the error log. Defaults to <code>warn</code> for the global server configuration and can be overridden on a per-vhost basis using this parameter. Valid value for <code>log_level</code> is one of <code>emerg</code>, <code>alert</code>, <code>crit</code>, <code>error</code>, <code>warn</code>, <code>notice</code>, <code>info</code> or <code>debug</code>.</p>\n\n<h5><code>no_proxy_uris</code></h5>\n\n<p>Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with <code>proxy_dest</code>.</p>\n\n<h5><code>options</code></h5>\n\n<p>Lists the options for the given virtual host</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;],\n }\n</code></pre>\n\n<h5><code>override</code></h5>\n\n<p>Sets the overrides for the given virtual host. Accepts an array of AllowOverride arguments.</p>\n\n<h5><code>port</code></h5>\n\n<p>Sets the port the host is configured on.</p>\n\n<h5><code>priority</code></h5>\n\n<p>Sets the relative load-order for Apache httpd VirtualHost configuration files. Defaults to &#39;25&#39;.</p>\n\n<p>If nothing matches the priority, the first name-based vhost will be used. Likewise, passing a higher priority will cause the alphabetically first name-based vhost to be used if no other names match.</p>\n\n<p><em>Note</em>: You should not need to use this parameter. However, if you do use it, be aware that the <code>default_vhost</code> parameter for <code>apache::vhost</code> passes a priority of &#39;15&#39;.</p>\n\n<h5><code>proxy_dest</code></h5>\n\n<p>Specifies the destination address of a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>proxy_pass</code></h5>\n\n<p>Specifies an array of path =&gt; uri for a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<p>Example:</p>\n\n<pre lang=\"puppet\"><code>$proxy_pass = [\n { &#39;path&#39; =&gt; &#39;/a&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/&#39; },\n { &#39;path&#39; =&gt; &#39;/b&#39;, &#39;url&#39; =&gt; &#39;http://backend-b/&#39; },\n { &#39;path&#39; =&gt; &#39;/c&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/c&#39; }\n]\n\napache::vhost { &#39;site.name.fdqn&#39;:\n …\n proxy_pass =&gt; $proxy_pass,\n}\n</code></pre>\n\n<h5><code>rack_base_uris</code></h5>\n\n<p>Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for passenger/rack in the <code>_rack.erb</code> template. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_dest</code></h5>\n\n<p>Specifies the address to redirect to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_source</code></h5>\n\n<p>Specifies the source items? that will redirect to the destination specified in <code>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>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_source =&gt; [&#39;/images&#39;,&#39;/downloads&#39;],\n redirect_dest =&gt; [&#39;http://img.example.com/&#39;,&#39;http://downloads.example.com/&#39;],\n }\n</code></pre>\n\n<h5><code>redirect_status</code></h5>\n\n<p>Specifies the status to append to the redirect. Defaults to &#39;undef&#39;.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_status =&gt; [&#39;temp&#39;,&#39;permanent&#39;],\n }\n</code></pre>\n\n<h5><code>request_headers</code></h5>\n\n<p>Specifies additional request headers.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n request_headers =&gt; [\n &#39;append MirrorID &quot;mirror 12&quot;&#39;,\n &#39;unset MirrorID&#39;,\n ],\n }\n</code></pre>\n\n<h5><code>rewrite_base</code></h5>\n\n<p>Limits the <code>rewrite_rule</code> to the specified base URL. Defaults to &#39;undef&#39;.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n rewrite_base =&gt; &#39;/blog/&#39;,\n }\n</code></pre>\n\n<p>The above example would limit the index.html -&gt; welcome.html rewrite to only something inside of <a href=\"http://example.com/blog/\">http://example.com/blog/</a>.</p>\n\n<h5><code>rewrite_cond</code></h5>\n\n<p>Rewrites a URL via <code>rewrite_rule</code> based on the truth of specified conditions. For example</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_cond =&gt; &#39;%{HTTP_USER_AGENT} ^MSIE&#39;,\n }\n</code></pre>\n\n<p>will rewrite URLs only if the visitor is using IE. Defaults to &#39;undef&#39;.</p>\n\n<p><em>Note</em>: At the moment, each vhost is limited to a single list of rewrite conditions. In the future, you will be able to specify multiple <code>rewrite_cond</code> and <code>rewrite_rules</code> per vhost, so that different conditions get different rewrites.</p>\n\n<h5><code>rewrite_rule</code></h5>\n\n<p>Creates URL rewrite rules. Defaults to &#39;undef&#39;. This parameter allows you to specify, for example, that anyone trying to access index.html will be served welcome.html.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n }\n</code></pre>\n\n<h5><code>scriptalias</code></h5>\n\n<p>Defines a directory of CGI scripts to be aliased to the path &#39;/cgi-bin&#39;</p>\n\n<h5><code>scriptaliases</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>ScriptAlias</code> or <code>ScriptAliasMatch</code> statements as per the <a href=\"http://httpd.apache.org/docs/current/mod/mod_alias.html\"><code>mod_alias</code> documentation</a>. Each hash is expected to be of the form:</p>\n\n<pre lang=\"puppet\"><code> scriptaliases =&gt; [\n {\n alias =&gt; &#39;/myscript&#39;,\n path =&gt; &#39;/usr/share/myscript&#39;,\n },\n {\n aliasmatch =&gt; &#39;^/foo(.*)&#39;,\n path =&gt; &#39;/usr/share/fooscripts$1&#39;,\n },\n {\n aliasmatch =&gt; &#39;^/bar/(.*)&#39;,\n path =&gt; &#39;/usr/share/bar/wrapper.sh/$1&#39;,\n },\n {\n alias =&gt; &#39;/neatscript&#39;,\n path =&gt; &#39;/usr/share/neatscript&#39;,\n },\n ]\n</code></pre>\n\n<p>These directives are created in the order specified. As with <code>Alias</code> and <code>AliasMatch</code> directives the more specific aliases should come before the more general ones to avoid shadowing.</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Specifies the email address Apache will display when it renders one of its error pages.</p>\n\n<h5><code>serveraliases</code></h5>\n\n<p>Sets the server aliases of the site.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the primary name of the virtual host.</p>\n\n<h5><code>setenv</code></h5>\n\n<p>Used by HTTPD to set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>setenvif</code></h5>\n\n<p>Used by HTTPD to conditionally set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>ssl</code></h5>\n\n<p>Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are &#39;true&#39; or &#39;false&#39;.</p>\n\n<h5><code>ssl_ca</code></h5>\n\n<p>Specifies the certificate authority.</p>\n\n<h5><code>ssl_cert</code></h5>\n\n<p>Specifies the SSL certification.</p>\n\n<h5><code>ssl_protocol</code></h5>\n\n<p>Specifies the SSL Protocol (SSLProtocol).</p>\n\n<h5><code>ssl_cipher</code></h5>\n\n<p>Specifies the SSLCipherSuite.</p>\n\n<h5><code>ssl_honorcipherorder</code></h5>\n\n<p>Sets SSLHonorCipherOrder directive, used to prefer the server&#39;s cipher preference order</p>\n\n<h5><code>ssl_certs_dir</code></h5>\n\n<p>Specifies the location of the SSL certification directory. Defaults to <code>/etc/ssl/certs</code> on Debian and <code>/etc/pki/tls/certs</code> on RedHat.</p>\n\n<h5><code>ssl_chain</code></h5>\n\n<p>Specifies the SSL chain.</p>\n\n<h5><code>ssl_crl</code></h5>\n\n<p>Specifies the certificate revocation list to use.</p>\n\n<h5><code>ssl_crl_path</code></h5>\n\n<p>Specifies the location of the certificate revocation list.</p>\n\n<h5><code>ssl_key</code></h5>\n\n<p>Specifies the SSL key.</p>\n\n<h5><code>ssl_verify_client</code></h5>\n\n<p>Sets <code>SSLVerifyClient</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslverifyclient\">Apache Core documentation</a>. Defaults to undef.\nAn example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n …\n ssl_verify_client =&gt; &#39;optional&#39;,\n }\n</code></pre>\n\n<h5><code>ssl_verify_depth</code></h5>\n\n<p>Sets <code>SSLVerifyDepth</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslverifydepth\">Apache Core documentation</a>. Defaults to undef.\nAn example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n …\n ssl_verify_depth =&gt; 1,\n }\n</code></pre>\n\n<h5><code>ssl_options</code></h5>\n\n<p>Sets <code>SSLOptions</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#ssloptions\">Apache Core documentation</a>. This is the global setting for the vhost and can be a string or an array. Defaults to undef. A single string example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n …\n ssl_options =&gt; &#39;+ExportCertData&#39;,\n }\n</code></pre>\n\n<p>An array of strings example:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n …\n ssl_options =&gt; [ &#39;+StrictRequire&#39;, &#39;+ExportCertData&#39; ],\n }\n</code></pre>\n\n<h5><code>ssl_proxyengine</code></h5>\n\n<p>Specifies whether to use <code>SSLProxyEngine</code> or not. Defaults to <code>false</code>.</p>\n\n<h5><code>vhost_name</code></h5>\n\n<p>This parameter is for use with name-based virtual hosting. Defaults to &#39;*&#39;.</p>\n\n<h5><code>itk</code></h5>\n\n<p>Hash containing infos to configure itk as per the <a href=\"http://mpm-itk.sesse.net/\">ITK documentation</a>.</p>\n\n<p>Keys could be:</p>\n\n<ul>\n<li>user + group</li>\n<li>assignuseridexpr</li>\n<li>assigngroupidexpr</li>\n<li>maxclientvhost</li>\n<li>nice</li>\n<li>limituidrange (Linux 3.5.0 or newer)</li>\n<li>limitgidrange (Linux 3.5.0 or newer)</li>\n</ul>\n\n<p>Usage will typically look like:</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n itk =&gt; {\n user =&gt; &#39;someuser&#39;,\n group =&gt; &#39;somegroup&#39;,\n },\n }\n</code></pre>\n\n<h3>Virtual Host Examples</h3>\n\n<p>The Apache module allows you to set up pretty much any configuration of virtual host you might desire. This section will address some common configurations. Please see the <a href=\"https://github.com/puppetlabs/puppetlabs-apache/tree/main/tests\">Tests section</a> for even more examples.</p>\n\n<p>Configure a vhost with a server administrator</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;third.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n serveradmin =&gt; &#39;admin@example.com&#39;,\n }\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with aliased servers</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sixth.example.com&#39;:\n serveraliases =&gt; [\n &#39;sixth.example.org&#39;,\n &#39;sixth.example.net&#39;,\n ],\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n }\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost with a cgi-bin</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;eleventh.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/eleventh&#39;,\n scriptalias =&gt; &#39;/usr/lib/cgi-bin&#39;,\n }\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with a rack configuration</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;fifteenth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifteenth&#39;,\n rack_base_uris =&gt; [&#39;/rackapp1&#39;, &#39;/rackapp2&#39;],\n }\n</code></pre>\n\n<hr>\n\n<p>Set up a mix of SSL and non-SSL vhosts at the same domain</p>\n\n<pre lang=\"puppet\"><code> #The non-ssl vhost\n apache::vhost { &#39;first.example.com non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n }\n\n #The SSL vhost at the same domain\n apache::vhost { &#39;first.example.com ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost to redirect non-SSL connections to SSL</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;sixteenth.example.com non-ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n redirect_status =&gt; &#39;permanent&#39;\n redirect_dest =&gt; &#39;https://sixteenth.example.com/&#39;\n }\n apache::vhost { &#39;sixteenth.example.com ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<hr>\n\n<p>Set up IP-based vhosts on any listen port and have them respond to requests on specific IP addresses. In this example, we will set listening on ports 80 and 81. This is required because the example vhosts are not declared with a port parameter.</p>\n\n<pre lang=\"puppet\"><code> apache::listen { &#39;80&#39;: }\n apache::listen { &#39;81&#39;: }\n</code></pre>\n\n<p>Then we will set up the IP-based vhosts</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;first.example.com&#39;:\n ip =&gt; &#39;10.0.0.10&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ip_based =&gt; true,\n }\n apache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.11&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n ip_based =&gt; true,\n }\n</code></pre>\n\n<hr>\n\n<p>Configure a mix of name-based and IP-based vhosts. First, we will add two IP-based vhosts on 10.0.0.10, one SSL and one non-SSL</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;The first IP-based vhost, non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;80&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first&#39;,\n }\n apache::vhost { &#39;The first IP-based vhost, ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;443&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first-ssl&#39;,\n ssl =&gt; true,\n }\n</code></pre>\n\n<p>Then, we will add two name-based vhosts listening on 10.0.0.20</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n }\n apache::vhost { &#39;third.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n }\n</code></pre>\n\n<p>If you want to add two name-based vhosts so that they will answer on either 10.0.0.10 or 10.0.0.20, you <strong>MUST</strong> declare <code>add_listen =&gt; &#39;false&#39;</code> to disable the otherwise automatic &#39;Listen 80&#39;, as it will conflict with the preceding IP-based vhosts.</p>\n\n<pre lang=\"puppet\"><code> apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n add_listen =&gt; false,\n }\n apache::vhost { &#39;fifth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n add_listen =&gt; false,\n }\n</code></pre>\n\n<h2>Implementation</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<h4>Class: <code>apache::dev</code></h4>\n\n<p>Installs Apache development libraries</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::dev&#39;: }\n</code></pre>\n\n<p>On FreeBSD you&#39;re required to define <code>apache::package</code> or <code>apache</code> class before <code>apache::dev</code>.</p>\n\n<h4>Defined Type: <code>apache::listen</code></h4>\n\n<p>Controls which ports Apache binds to for listening based on the title:</p>\n\n<pre lang=\"puppet\"><code> apache::listen { &#39;80&#39;: }\n apache::listen { &#39;443&#39;: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>Listen</code> directives to the <code>ports.conf</code> file in the Apache httpd configuration directory. <code>apache::listen</code> titles should always take the form of: <code>&lt;port&gt;</code>, <code>&lt;ipv4&gt;:&lt;port&gt;</code>, or <code>[&lt;ipv6&gt;]:&lt;port&gt;</code></p>\n\n<p>Apache httpd requires that <code>Listen</code> directives must be added for every port. The <code>apache::vhost</code> defined type will automatically add <code>Listen</code> directives unless the <code>apache::vhost</code> is passed <code>add_listen =&gt; false</code>.</p>\n\n<h4>Defined Type: <code>apache::namevirtualhost</code></h4>\n\n<p>Enables named-based hosting of a virtual host</p>\n\n<pre lang=\"puppet\"><code> class { &#39;apache::namevirtualhost`: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>NameVirtualHost</code> directives to the <code>ports.conf</code> file in the Apache https configuration directory. <code>apache::namevirtualhost</code> titles should always take the form of: <code>*</code>, <code>*:&lt;port&gt;</code>, <code>_default_:&lt;port&gt;</code>, <code>&lt;ip&gt;</code>, or <code>&lt;ip&gt;:&lt;port&gt;</code>.</p>\n\n<h4>Defined Type: <code>apache::balancermember</code></h4>\n\n<p>Define members of a proxy_balancer set (mod_proxy_balancer). Very useful when using exported resources.</p>\n\n<p>On every app server you can export a balancermember like this:</p>\n\n<pre lang=\"puppet\"><code> @@apache::balancermember { &quot;${::fqdn}-puppet00&quot;:\n balancer_cluster =&gt; &#39;puppet00&#39;,\n url =&gt; &quot;ajp://${::fqdn}:8009&quot;\n options =&gt; [&#39;ping=5&#39;, &#39;disablereuse=on&#39;, &#39;retry=5&#39;, &#39;ttl=120&#39;],\n }\n</code></pre>\n\n<p>And on the proxy itself you create the balancer cluster using the defined type apache::balancer:</p>\n\n<pre lang=\"puppet\"><code> apache::balancer { &#39;puppet00&#39;: }\n</code></pre>\n\n<p>If you need to use ProxySet in the balncer config you can do as so:</p>\n\n<pre lang=\"puppet\"><code> apache::balancer { &#39;puppet01&#39;:\n proxy_set =&gt; {&#39;stickysession&#39; =&gt; &#39;JSESSIONID&#39;},\n }\n</code></pre>\n\n<h3>Templates</h3>\n\n<p>The Apache module relies heavily on templates to enable the <code>vhost</code> and <code>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>\n\n<h2>Limitations</h2>\n\n<p>This has been tested on Ubuntu Precise, Debian Wheezy, CentOS 5.8, and FreeBSD 9.1.</p>\n\n<h2>Development</h2>\n\n<h3>Overview</h3>\n\n<p>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>\n\n<p>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>\n\n<p>You can read the complete module contribution guide <a href=\"http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing\">on the Puppet Labs wiki.</a></p>\n\n<h3>Running tests</h3>\n\n<p>This project contains tests for both <a href=\"http://rspec-puppet.com/\">rspec-puppet</a> and <a href=\"https://github.com/puppetlabs/rspec-system\">rspec-system</a> to verify functionality. For in-depth information please see their respective documentation.</p>\n\n<p>Quickstart:</p>\n\n<pre><code>gem install bundler\nbundle install\nbundle exec rake spec\nbundle exec rake spec:system\n</code></pre>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.</p>\n</section>",
1016
1016
  "changelog": "<section class=\"markdown\"><h2>2013-12-05 Release 0.10.0</h2>\n\n<h3>Summary:</h3>\n\n<p>This release adds FreeBSD osfamily support and various other improvements to some mods.</p>\n\n<h3>Features:</h3>\n\n<ul>\n<li>Add suPHP_UserGroup directive to directory context</li>\n<li>Add support for ScriptAliasMatch directives</li>\n<li>Set SSLOptions StdEnvVars in server context</li>\n<li>No implicit <Directory> entry for ScriptAlias path</li>\n<li>Add support for overriding ErrorDocument</li>\n<li>Add support for AliasMatch directives</li>\n<li>Disable default &quot;allow from all&quot; in vhost-directories</li>\n<li>Add WSGIPythonPath as an optional parameter to mod_wsgi. </li>\n<li>Add mod_rpaf support</li>\n<li>Add directives: IndexOptions, IndexOrderDefault</li>\n<li>Add ability to include additional external configurations in vhost</li>\n<li>need to use the provider variable not the provider key value from the directory hash for matches</li>\n<li>Support for FreeBSD and few other features</li>\n<li>Add new params to apache::mod::mime class</li>\n<li>Allow apache::mod to specify module id and path</li>\n<li>added $server_root parameter</li>\n<li>Add Allow and ExtendedStatus support to mod_status</li>\n<li>Expand vhost/_directories.pp directive support</li>\n<li>Add initial support for nss module (no directives in vhost template yet)</li>\n<li>added peruser and event mpms</li>\n<li>added $service_name parameter</li>\n<li>add parameter for TraceEnable</li>\n<li>Make LogLevel configurable for server and vhost</li>\n<li>Add documentation about $ip</li>\n<li>Add ability to pass ip (instead of wildcard) in default vhost files</li>\n</ul>\n\n<h3>Bugfixes:</h3>\n\n<ul>\n<li>Don&#39;t listen on port or set NameVirtualHost for non-existent vhost</li>\n<li>only apply Directory defaults when provider is a directory</li>\n<li>Working mod_authnz_ldap support on Debian/Ubuntu</li>\n</ul>\n\n<h2>2013-09-06 Release 0.9.0</h2>\n\n<h3>Summary:</h3>\n\n<p>This release adds more parameters to the base apache class and apache defined\nresource to make the module more flexible. It also adds or enhances SuPHP,\nWSGI, and Passenger mod support, and support for the ITK mpm module.</p>\n\n<h3>Backwards-incompatible Changes:</h3>\n\n<ul>\n<li>Remove many default mods that are not normally needed.</li>\n<li>Remove <code>rewrite_base</code> <code>apache::vhost</code> parameter; did not work anyway.</li>\n<li>Specify dependencies on stdlib &gt;=2.4.0 (this was already the case, but\nmaking explicit)</li>\n<li>Deprecate <code>a2mod</code> in favor of the <code>apache::mod::*</code> classes and <code>apache::mod</code>\ndefined resource.</li>\n</ul>\n\n<h3>Features:</h3>\n\n<ul>\n<li><code>apache</code> class\n\n<ul>\n<li>Add <code>httpd_dir</code> parameter to change the location of the configuration\nfiles.</li>\n<li>Add <code>logroot</code> parameter to change the logroot</li>\n<li>Add <code>ports_file</code> parameter to changes the <code>ports.conf</code> file location</li>\n<li>Add <code>keepalive</code> parameter to enable persistent connections</li>\n<li>Add <code>keepalive_timeout</code> parameter to change the timeout</li>\n<li>Update <code>default_mods</code> to be able to take an array of mods to enable.</li>\n</ul></li>\n<li><code>apache::vhost</code>\n\n<ul>\n<li>Add <code>wsgi_daemon_process</code>, <code>wsgi_daemon_process_options</code>,\n<code>wsgi_process_group</code>, and <code>wsgi_script_aliases</code> parameters for per-vhost\nWSGI configuration.</li>\n<li>Add <code>access_log_syslog</code> parameter to enable syslogging.</li>\n<li>Add <code>error_log_syslog</code> parameter to enable syslogging of errors.</li>\n<li>Add <code>directories</code> hash parameter. Please see README for documentation.</li>\n<li>Add <code>sslproxyengine</code> parameter to enable SSLProxyEngine</li>\n<li>Add <code>suphp_addhandler</code>, <code>suphp_engine</code>, and <code>suphp_configpath</code> for\nconfiguring SuPHP.</li>\n<li>Add <code>custom_fragment</code> parameter to allow for arbitrary apache\nconfiguration injection. (Feature pull requests are prefered over using\nthis, but it is available in a pinch.)</li>\n</ul></li>\n<li>Add <code>apache::mod::suphp</code> class for configuring SuPHP.</li>\n<li>Add <code>apache::mod::itk</code> class for configuring ITK mpm module.</li>\n<li>Update <code>apache::mod::wsgi</code> class for global WSGI configuration with\n<code>wsgi_socket_prefix</code> and <code>wsgi_python_home</code> parameters.</li>\n<li>Add README.passenger.md to document the <code>apache::mod::passenger</code> usage.\nAdded <code>passenger_high_performance</code>, <code>passenger_pool_idle_time</code>,\n<code>passenger_max_requests</code>, <code>passenger_stat_throttle_rate</code>, <code>rack_autodetect</code>,\nand <code>rails_autodetect</code> parameters.</li>\n<li>Separate the httpd service resource into a new <code>apache::service</code> class for\ndependency chaining of <code>Class[&#39;apache&#39;] -&gt; &lt;resource&gt; ~&gt;\nClass[&#39;apache::service&#39;]</code></li>\n<li>Added <code>apache::mod::proxy_balancer</code> class for <code>apache::balancer</code></li>\n</ul>\n\n<h3>Bugfixes:</h3>\n\n<ul>\n<li>Change dependency to puppetlabs-concat</li>\n<li>Fix ruby 1.9 bug for <code>a2mod</code></li>\n<li>Change servername to be <code>$::hostname</code> if there is no <code>$::fqdn</code></li>\n<li>Make <code>/etc/ssl/certs</code> the default ssl certs directory for RedHat non-5.</li>\n<li>Make <code>php</code> the default php package for RedHat non-5.</li>\n<li>Made <code>aliases</code> able to take a single alias hash instead of requiring an\narray.</li>\n</ul>\n\n<h2>2013-07-26 Release 0.8.1</h2>\n\n<h3>Bugfixes:</h3>\n\n<ul>\n<li>Update <code>apache::mpm_module</code> detection for worker/prefork</li>\n<li>Update <code>apache::mod::cgi</code> and <code>apache::mod::cgid</code> detection for\nworker/prefork</li>\n</ul>\n\n<h2>2013-07-16 Release 0.8.0</h2>\n\n<h3>Features:</h3>\n\n<ul>\n<li>Add <code>servername</code> parameter to <code>apache</code> class</li>\n<li>Add <code>proxy_set</code> parameter to <code>apache::balancer</code> define</li>\n</ul>\n\n<h3>Bugfixes:</h3>\n\n<ul>\n<li>Fix ordering for multiple <code>apache::balancer</code> clusters</li>\n<li>Fix symlinking for sites-available on Debian-based OSs</li>\n<li>Fix dependency ordering for recursive confdir management</li>\n<li>Fix <code>apache::mod::*</code> to notify the service on config change</li>\n<li>Documentation updates</li>\n</ul>\n\n<h2>2013-07-09 Release 0.7.0</h2>\n\n<h3>Changes:</h3>\n\n<ul>\n<li>Essentially rewrite the module -- too many to list</li>\n<li><code>apache::vhost</code> has many abilities -- see README.md for details</li>\n<li><code>apache::mod::*</code> classes provide httpd mod-loading capabilities</li>\n<li><code>apache</code> base class is much more configurable</li>\n</ul>\n\n<h3>Bugfixes:</h3>\n\n<ul>\n<li>Many. And many more to come</li>\n</ul>\n\n<h2>2013-03-2 Release 0.6.0</h2>\n\n<ul>\n<li>update travis tests (add more supported versions)</li>\n<li>add access log_parameter</li>\n<li>make purging of vhost dir configurable</li>\n</ul>\n\n<h2>2012-08-24 Release 0.4.0</h2>\n\n<h3>Changes:</h3>\n\n<ul>\n<li><code>include apache</code> is now required when using <code>apache::mod::*</code></li>\n</ul>\n\n<h3>Bugfixes:</h3>\n\n<ul>\n<li>Fix syntax for validate_re</li>\n<li>Fix formatting in vhost template</li>\n<li><p>Fix spec tests such that they pass</p>\n\n<p>2012-05-08 Puppet Labs <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a> - 0.0.4\ne62e362 Fix broken tests for ssl, vhost, vhost::*\n42c6363 Changes to match style guide and pass puppet-lint without error\n42bc8ba changed name =&gt; path for file resources in order to name namevar by it&#39;s name\n72e13de One end too much\n0739641 style guide fixes: &#39;true&#39; &lt;&gt; true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod/a2dismo commands optional\n98d774e (#13860) Autorequire Package[&#39;httpd&#39;]\n05fcec5 (#13073) Add missing puppet spec tests\n541afda (#6899) Remove virtual a2mod definition\n976cb69 (#13072) Move mod python and wsgi package names to params\n323915a (#13060) Add .gitignore to repo\nfdf40af (#13060) Remove pkg directory from source tree\nfd90015 Add LICENSE file and update the ModuleFile\nd3d0d23 Re-enable local php class\nd7516c7 Make management of firewalls configurable for vhosts\n60f83ba Explicitly lookup scope of apache_name in templates.\nf4d287f (#12581) Add explicit ordering for vdir directory\n88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall\na776a8b (#11071) Fix to work with latest firewall module\n2b79e8b (#11070) Add support for Scientific Linux\n405b3e9 Fix for a2mod\n57b9048 Commit apache::vhost::redirect Manifest\n8862d01 Commit apache::vhost::proxy Manifest\nd5c1fd0 Commit apache::mod::wsgi Manifest\na825ac7 Commit apache::mod::python Manifest\nb77062f Commit Templates\n9a51b4a Vhost File Declarations\n6cf7312 Defaults for Parameters\n6a5b11a Ensure installed\nf672e46 a2mod fix\n8a56ee9 add pthon support to apache</p></li>\n</ul>\n</section>",
1017
1017
  "license": "<section class=\"plaintext\"><pre>Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n</pre></section>",
1018
1018
  "created_at": "2013-12-05 15:29:14 -0800",
@@ -1310,7 +1310,7 @@
1310
1310
  "file_size": 27860,
1311
1311
  "file_md5": "996659ad952e1729f286524e4dba4c04",
1312
1312
  "downloads": 6232,
1313
- "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::mod::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;webmaster@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Notes</h2>\n\n<p>Since Puppet cannot ensure that all parent directories exist you need to\nmanage these yourself. In the more advanced example above, you need to ensure \nthat <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.</p>\n</section>",
1313
+ "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::mod::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;web@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Notes</h2>\n\n<p>Since Puppet cannot ensure that all parent directories exist you need to\nmanage these yourself. In the more advanced example above, you need to ensure \nthat <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.</p>\n</section>",
1314
1314
  "changelog": "<section class=\"plaintext\"><pre>2012-08-24 Release 0.4.0\nChanges:\n- `include apache` is now required when using apache::mod::*\n\nBugfixes:\n- Fix syntax for validate_re\n- Fix formatting in vhost template\n- Fix spec tests such that they pass\n\n2012-05-08 Puppet Labs &lt;info@puppetlabs.com&gt; - 0.0.4\ne62e362 Fix broken tests for ssl, vhost, vhost::*\n42c6363 Changes to match style guide and pass puppet-lint without error\n42bc8ba changed name =&gt; path for file resources in order to name namevar by it&#x27;s name\n72e13de One end too much\n0739641 style guide fixes: &#x27;true&#x27; &lt;&gt; true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod&#x2F;a2dismo commands optional\n98d774e (#13860) Autorequire Package[&#x27;httpd&#x27;]\n05fcec5 (#13073) Add missing puppet spec tests\n541afda (#6899) Remove virtual a2mod definition\n976cb69 (#13072) Move mod python and wsgi package names to params\n323915a (#13060) Add .gitignore to repo\nfdf40af (#13060) Remove pkg directory from source tree\nfd90015 Add LICENSE file and update the ModuleFile\nd3d0d23 Re-enable local php class\nd7516c7 Make management of firewalls configurable for vhosts\n60f83ba Explicitly lookup scope of apache_name in templates.\nf4d287f (#12581) Add explicit ordering for vdir directory\n88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall\na776a8b (#11071) Fix to work with latest firewall module\n2b79e8b (#11070) Add support for Scientific Linux\n405b3e9 Fix for a2mod\n57b9048 Commit apache::vhost::redirect Manifest\n8862d01 Commit apache::vhost::proxy Manifest\nd5c1fd0 Commit apache::mod::wsgi Manifest\na825ac7 Commit apache::mod::python Manifest\nb77062f Commit Templates\n9a51b4a Vhost File Declarations\n6cf7312 Defaults for Parameters\n6a5b11a Ensure installed\nf672e46 a2mod fix\n8a56ee9 add pthon support to apache\n</pre></section>",
1315
1315
  "license": "<section class=\"plaintext\"><pre>Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n</pre></section>",
1316
1316
  "created_at": "2012-11-06 00:26:27 -0800",
@@ -1488,7 +1488,7 @@
1488
1488
  "file_size": 28866,
1489
1489
  "file_md5": "f62139bda531ac4c8f55ecf09f77d0e9",
1490
1490
  "downloads": 6125,
1491
- "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::mod::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;webmaster@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Dependencies</h2>\n\n<p>Some functionality is dependent on other modules:</p>\n\n<ul>\n<li><a href=\"https://github.com/puppetlabs/puppetlabs-stdlib\">stdlib</a></li>\n<li><a href=\"https://github.com/puppetlabs/puppetlabs-firewall\">firewall</a></li>\n</ul>\n\n<h2>Notes</h2>\n\n<p>Since Puppet cannot ensure that all parent directories exist you need to\nmanage these yourself. In the more advanced example above, you need to ensure \nthat <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.</p>\n</section>",
1491
+ "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::mod::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;web@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Dependencies</h2>\n\n<p>Some functionality is dependent on other modules:</p>\n\n<ul>\n<li><a href=\"https://github.com/puppetlabs/puppetlabs-stdlib\">stdlib</a></li>\n<li><a href=\"https://github.com/puppetlabs/puppetlabs-firewall\">firewall</a></li>\n</ul>\n\n<h2>Notes</h2>\n\n<p>Since Puppet cannot ensure that all parent directories exist you need to\nmanage these yourself. In the more advanced example above, you need to ensure \nthat <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.</p>\n</section>",
1492
1492
  "changelog": "<section class=\"plaintext\"><pre>2012-08-24 Release 0.4.0\nChanges:\n- `include apache` is now required when using apache::mod::*\n\nBugfixes:\n- Fix syntax for validate_re\n- Fix formatting in vhost template\n- Fix spec tests such that they pass\n\n2012-05-08 Puppet Labs &lt;info@puppetlabs.com&gt; - 0.0.4\ne62e362 Fix broken tests for ssl, vhost, vhost::*\n42c6363 Changes to match style guide and pass puppet-lint without error\n42bc8ba changed name =&gt; path for file resources in order to name namevar by it&#x27;s name\n72e13de One end too much\n0739641 style guide fixes: &#x27;true&#x27; &lt;&gt; true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod&#x2F;a2dismo commands optional\n98d774e (#13860) Autorequire Package[&#x27;httpd&#x27;]\n05fcec5 (#13073) Add missing puppet spec tests\n541afda (#6899) Remove virtual a2mod definition\n976cb69 (#13072) Move mod python and wsgi package names to params\n323915a (#13060) Add .gitignore to repo\nfdf40af (#13060) Remove pkg directory from source tree\nfd90015 Add LICENSE file and update the ModuleFile\nd3d0d23 Re-enable local php class\nd7516c7 Make management of firewalls configurable for vhosts\n60f83ba Explicitly lookup scope of apache_name in templates.\nf4d287f (#12581) Add explicit ordering for vdir directory\n88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall\na776a8b (#11071) Fix to work with latest firewall module\n2b79e8b (#11070) Add support for Scientific Linux\n405b3e9 Fix for a2mod\n57b9048 Commit apache::vhost::redirect Manifest\n8862d01 Commit apache::vhost::proxy Manifest\nd5c1fd0 Commit apache::mod::wsgi Manifest\na825ac7 Commit apache::mod::python Manifest\nb77062f Commit Templates\n9a51b4a Vhost File Declarations\n6cf7312 Defaults for Parameters\n6a5b11a Ensure installed\nf672e46 a2mod fix\n8a56ee9 add pthon support to apache\n</pre></section>",
1493
1493
  "license": "<section class=\"plaintext\"><pre>Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n</pre></section>",
1494
1494
  "created_at": "2012-12-01 10:53:30 -0800",
@@ -1739,7 +1739,7 @@
1739
1739
  "file_size": 52540,
1740
1740
  "file_md5": "d77e65d987d670d5dac2538e2c98c0b5",
1741
1741
  "downloads": 1586,
1742
- "readme": "<section class=\"markdown\"><h1>apache</h1>\n\n<h4>Table of Contents</h4>\n\n<ol>\n<li><a href=\"#overview\">Overview - What is the Apache module?</a></li>\n<li><a href=\"#module-description\">Module Description - What does the module do?</a></li>\n<li><a href=\"#setup\">Setup - The basics of getting started with Apache</a>\n\n<ul>\n<li><a href=\"#beginning-with-apache\">Beginning with Apache - Installation</a></li>\n<li><a href=\"#configure-a-virtual-host\">Configure a Virtual Host - Basic options for getting started</a></li>\n</ul></li>\n<li><a href=\"#usage\">Usage - The classes, defined types, and their parameters available for configuration</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a>\n\n<ul>\n<li><a href=\"#class-apache\">Class: apache</a></li>\n<li><a href=\"#classes-apachemodname\">Classes: apache::mod::*</a></li>\n<li><a href=\"#defined-type-apachevhost\">Defined Type: apache::vhost</a></li>\n</ul></li>\n<li><a href=\"#virtual-host-examples\">Virtual Host Examples - Demonstrations of some configuration options</a></li>\n</ul></li>\n<li><a href=\"#implementation\">Implementation - An under-the-hood peek at what the module is doing</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a></li>\n<li><a href=\"#templates\">Templates</a></li>\n</ul></li>\n<li><a href=\"#limitations\">Limitations - OS compatibility, etc.</a></li>\n<li><a href=\"#development\">Development - Guide for contributing to the module</a></li>\n<li><a href=\"#release-notes\">Release Notes - Notes on the most recent updates to the module</a></li>\n</ol>\n\n<h2>Overview</h2>\n\n<p>The Apache module allows you to set up virtual hosts and manage web services with minimal effort.</p>\n\n<h2>Module Description</h2>\n\n<p>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>\n\n<h2>Setup</h2>\n\n<p><strong>What Apache affects:</strong></p>\n\n<ul>\n<li>configuration files and directories (created and written to)\n\n<ul>\n<li><strong>NOTE</strong>: Configurations that are <em>not</em> managed by Puppet will be purged.</li>\n</ul></li>\n<li>package/service/configuration files for Apache</li>\n<li>Apache modules</li>\n<li>virtual hosts</li>\n<li>listened-to ports</li>\n</ul>\n\n<h3>Beginning with Apache</h3>\n\n<p>To install Apache with the default parameters</p>\n\n<pre><code>class { &#39;apache&#39;: }\n</code></pre>\n\n<p>The defaults are determined by your operating system (e.g. Debian systems have one set of defaults, RedHat systems have another). These defaults will work well in a testing environment, but are not suggested for production. To establish customized parameters</p>\n\n<pre><code>class { &#39;apache&#39;:\n default_mods =&gt; false,\n …\n}\n</code></pre>\n\n<h3>Configure a virtual host</h3>\n\n<p>Declaring the <code>apache</code> class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving <code>$apache::docroot</code>.</p>\n\n<pre><code>class { &#39;apache&#39;: }\n</code></pre>\n\n<p>To configure a very basic, name-based virtual host</p>\n\n<pre><code>apache::vhost { &#39;first.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n}\n</code></pre>\n\n<p><em>Note:</em> The default priority is 15. If nothing matches this priority, the alphabetically first name-based vhost will be used. This is also true if you pass a higher priority and no names match anything else.</p>\n\n<p>A slightly more complicated example, which moves the docroot owner/group</p>\n\n<pre><code>apache::vhost { &#39;second.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n docroot_owner =&gt; &#39;third&#39;,\n docroot_group =&gt; &#39;third&#39;,\n}\n</code></pre>\n\n<p>To set up a virtual host with SSL and default SSL certificates</p>\n\n<pre><code>apache::vhost { &#39;ssl.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/ssl&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<p>To set up a virtual host with SSL and specific SSL certificates</p>\n\n<pre><code>apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n ssl =&gt; true,\n ssl_cert =&gt; &#39;/etc/ssl/fourth.example.com.cert&#39;,\n ssl_key =&gt; &#39;/etc/ssl/fourth.example.com.key&#39;,\n}\n</code></pre>\n\n<p>To set up a virtual host with wildcard alias for subdomain mapped to same named directory \n<code>http://examle.com.loc =&gt; /var/www/example.com</code></p>\n\n<pre><code>apache::vhost { &#39;subdomain.loc&#39;:\n vhost_name =&gt; &#39;*&#39;,\n port =&gt; &#39;80&#39;,\n virtual_docroot&#39; =&gt; &#39;/var/www/%-2+&#39;,\n docroot =&gt; &#39;/var/www&#39;,\n serveraliases =&gt; [&#39;*.loc&#39;,],\n}\n</code></pre>\n\n<p>To see a list of all virtual host parameters, <a href=\"#defined-type-apachevhost\">please go here</a>. To see an extensive list of virtual host examples <a href=\"#virtual-host-examples\">please look here</a>.</p>\n\n<h2>Usage</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<p>This module modifies Apache configuration files and directories and will purge any configuration not managed by Puppet. Configuration of Apache should be managed by Puppet, as non-puppet configuration files can cause unexpected failures.</p>\n\n<p>It is possible to temporarily disable full Puppet management by setting the <code>purge_configs</code> parameter within the base <code>apache</code> class to &#39;false&#39;. This option should only be used as a temporary means of saving and relocating customized configurations.</p>\n\n<h4>Class: <code>apache</code></h4>\n\n<p>The Apache module&#39;s primary class, <code>apache</code>, guides the basic setup of Apache on your system.</p>\n\n<p>You may establish a default vhost in this class, the <code>vhost</code> class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the <code>vhost</code> type.</p>\n\n<p><strong>Parameters within <code>apache</code>:</strong></p>\n\n<h5><code>default_mods</code></h5>\n\n<p>Sets up Apache with default settings based on your OS. Defaults to &#39;true&#39;, set to &#39;false&#39; for customized configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets up a default virtual host. Defaults to &#39;true&#39;, set to &#39;false&#39; to set up <a href=\"#configure-a-virtual-host\">customized virtual hosts</a>.</p>\n\n<h5><code>default_ssl_vhost</code></h5>\n\n<p>Sets up a default SSL virtual host. Defaults to &#39;false&#39;.</p>\n\n<pre><code>apache::vhost { &#39;default-ssl&#39;:\n port =&gt; 443,\n ssl =&gt; true,\n docroot =&gt; $docroot,\n scriptalias =&gt; $scriptalias,\n serveradmin =&gt; $serveradmin,\n access_log_file =&gt; &quot;ssl_${access_log_file}&quot;,\n }\n</code></pre>\n\n<p>SSL vhosts only respond to HTTPS queries.</p>\n\n<h5><code>default_ssl_cert</code></h5>\n\n<p>The default SSL certification, which is automatically set based on your operating system (<code>/etc/pki/tls/certs/localhost.crt</code> for RedHat, <code>/etc/ssl/certs/ssl-cert-snakeoil.pem</code> for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_key</code></h5>\n\n<p>The default SSL key, which is automatically set based on your operating system (<code>/etc/pki/tls/private/localhost.key</code> for RedHat, <code>/etc/ssl/private/ssl-cert-snakeoil.key</code> for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_chain</code></h5>\n\n<p>The default SSL chain, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_ca</code></h5>\n\n<p>The default certificate authority, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl_path</code></h5>\n\n<p>The default certificate revocation list path, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl</code></h5>\n\n<p>The default certificate revocation list to use, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>service_enable</code></h5>\n\n<p>Determines whether the &#39;httpd&#39; service is enabled when the machine is booted, meaning Puppet will check the service status to start/stop it. Defaults to &#39;true&#39;, meaning the service is enabled/running.</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Sets the server administrator. Defaults to &#39;root@localhost&#39;.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the servername. Defaults to fqdn provided by facter.</p>\n\n<h5><code>sendfile</code></h5>\n\n<p>Makes Apache use the Linux kernel &#39;sendfile&#39; to serve static files. Defaults to &#39;false&#39;.</p>\n\n<h5><code>error_documents</code></h5>\n\n<p>Enables custom error documents. Defaults to &#39;false&#39;.</p>\n\n<h5><code>confd_dir</code></h5>\n\n<p>Changes the location of the configuration directory your custom configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>vhost_dir</code></h5>\n\n<p>Changes the location of the configuration directory your virtual host configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mod_dir</code></h5>\n\n<p>Changes the location of the configuration directory your Apache modules configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mpm_module</code></h5>\n\n<p>Configures which mpm module is loaded and configured for the httpd process by the <code>apache::mod::prefork</code> and <code>apache::mod::worker</code> classes. Must be set to <code>false</code> to explicitly declare <code>apache::mod::worker</code> or <code>apache::mod::prefork</code> classes with parameters. Valid values are <code>worker</code>, <code>prefork</code>, or the boolean <code>false</code>. Defaults to <code>prefork</code> on RedHat and <code>worker</code> on Debian.</p>\n\n<h5><code>conf_template</code></h5>\n\n<p>Setting this allows you to override the template used for the main apache configuration file. This is a potentially risky thing to do as this module has been built around the concept of a minimal configuration file with most of the configuration coming in the form of conf.d/ entries. Defaults to &#39;apache/httpd.conf.erb&#39;.</p>\n\n<h4>Class: <code>apache::default_mods</code></h4>\n\n<p>Installs default Apache modules based on what OS you are running</p>\n\n<pre><code>class { &#39;apache::default_mods&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::mod</code></h4>\n\n<p>Used to enable arbitrary Apache httpd modules for which there is no specific <code>apache::mod::[name]</code> class. The <code>apache::mod</code> defined type will also install the required packages to enable the module, if any.</p>\n\n<pre><code>apache::mod { &#39;rewrite&#39;: }\napache::mod { &#39;ldap&#39;: }\n</code></pre>\n\n<h4>Classes: <code>apache::mod::[name]</code></h4>\n\n<p>There are many <code>apache::mod::[name]</code> classes within this module that can be declared using <code>include</code>:</p>\n\n<ul>\n<li><code>alias</code></li>\n<li><code>auth_basic</code></li>\n<li><code>auth_kerb</code></li>\n<li><code>autoindex</code></li>\n<li><code>cache</code></li>\n<li><code>cgi</code></li>\n<li><code>cgid</code></li>\n<li><code>dav</code></li>\n<li><code>dav_fs</code></li>\n<li><code>deflate</code></li>\n<li><code>dir</code>*</li>\n<li><code>disk_cache</code></li>\n<li><code>fcgid</code></li>\n<li><code>info</code></li>\n<li><code>ldap</code></li>\n<li><code>mime</code></li>\n<li><code>mime_magic</code></li>\n<li><code>mpm_event</code></li>\n<li><code>negotiation</code></li>\n<li><code>passenger</code>*</li>\n<li><code>perl</code></li>\n<li><code>php</code> (requires <a href=\"#mpm_module\"><code>mpm_module</code></a> set to <code>prefork</code>)</li>\n<li><code>prefork</code>*</li>\n<li><code>proxy</code>*</li>\n<li><code>proxy_html</code></li>\n<li><code>proxy_http</code></li>\n<li><code>python</code></li>\n<li><code>reqtimeout</code></li>\n<li><code>setenvif</code></li>\n<li><code>ssl</code>* (see <a href=\"#class-apachemodssl\">apache::mod::ssl</a> below)</li>\n<li><code>status</code></li>\n<li><code>userdir</code>*</li>\n<li><code>worker</code>*</li>\n<li><code>wsgi</code></li>\n<li><code>xsendfile</code></li>\n</ul>\n\n<p>Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module&#39;s configuration. Most of the time, these parameters will not require any configuration or attention.</p>\n\n<p>The modules mentioned above, and other Apache modules that have templates, will cause template files to be dropped along with the mod install, and the module will not work without the template. Any mod without a template will install package but drop no files.</p>\n\n<h4>Class: <code>apache::mod::ssl</code></h4>\n\n<p>Installs Apache SSL capabilities and utilizes <code>ssl.conf.erb</code> template</p>\n\n<pre><code>class { &#39;apache::mod::ssl&#39;: }\n</code></pre>\n\n<p>To <em>use</em> SSL with a virtual host, you must either set the<code>default_ssl_vhost</code> parameter in <code>apache</code> to &#39;true&#39; or set the <code>ssl</code> parameter in <code>apache::vhost</code> to &#39;true&#39;.</p>\n\n<h4>Defined Type: <code>apache::vhost</code></h4>\n\n<p>The Apache module allows a lot of flexibility in the set up and configuration of virtual hosts. This flexibility is due, in part, to <code>vhost</code>&#39;s setup as a defined resource type, which allows it to be evaluated multiple times with different parameters.</p>\n\n<p>The <code>vhost</code> defined type allows you to have specialized configurations for virtual hosts that have requirements outside of the defaults. You can set up a default vhost within the base <code>apache</code> class as well as set a customized vhost setup as default. Your customized vhost (priority 10) will be privileged over the base class vhost (15).</p>\n\n<p>If you have a series of specific configurations and do not want a base <code>apache</code> class default vhost, make sure to set the base class default host to &#39;false&#39;.</p>\n\n<pre><code>class { &#39;apache&#39;:\n default_vhost =&gt; false,\n}\n</code></pre>\n\n<p><strong>Parameters within <code>apache::vhost</code>:</strong></p>\n\n<p>The default values for each parameter will vary based on operating system and type of virtual host.</p>\n\n<h5><code>access_log</code></h5>\n\n<p>Specifies whether <code>*_access.log</code> directives should be configured. Valid values are &#39;true&#39; and &#39;false&#39;. Defaults to &#39;true&#39;.</p>\n\n<h5><code>access_log_file</code></h5>\n\n<p>Points to the <code>*_access.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_pipe</code></h5>\n\n<p>Specifies a pipe to send access log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_format</code></h5>\n\n<p>Specifies either a LogFormat nickname or custom format string for access log. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>add_listen</code></h5>\n\n<p>Determines whether the vhost creates a listen statement. The default value is &#39;true&#39;.</p>\n\n<p>Setting <code>add_listen</code> to &#39;false&#39; stops the vhost from creating a listen statement, and this is important when you combine vhosts that are not passed an <code>ip</code> parameter with vhosts that <em>are</em> passed the <code>ip</code> parameter.</p>\n\n<h5><code>aliases</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>Alias</code> statements as per the <a href=\"http://httpd.apache.org/docs/current/mod/mod_alias.html\"><code>mod_alias</code> documentation</a>. Each hash is expected to be of the form:</p>\n\n<pre lang=\"ruby\"><code>aliases =&gt; [ { alias =&gt; &#39;/alias&#39;, path =&gt; &#39;/path/to/directory&#39; } ],\n</code></pre>\n\n<p>For <code>Alias</code> to work, each will need a corresponding <code>&lt;Directory /path/to/directory&gt;</code> or <code>&lt;Location /path/to/directory&gt;</code> block.</p>\n\n<p><strong>Note:</strong> If <code>apache::mod::passenger</code> is loaded and <code>PassengerHighPerformance true</code> is set, then <code>Alias</code> may have issues honouring the <code>PassengerEnabled off</code> statement. See <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">this article</a> for details.</p>\n\n<h5><code>block</code></h5>\n\n<p>Specifies the list of things Apache will block access to. The default is an empty set, &#39;[]&#39;. Currently, the only option is &#39;scm&#39;, which blocks web access to .svn, .git and .bzr directories. To add to this, please see the <a href=\"#development\">Development</a> section.</p>\n\n<h5><code>custom_fragment</code></h5>\n\n<p>Pass a string of custom configuration directives to be placed at the end of the vhost configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets a given <code>apache::vhost</code> as the default to serve requests that do not match any other <code>apache::vhost</code> definitions. The default value is &#39;false&#39;.</p>\n\n<h5><code>directories</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>&lt;Directory /path/to/directory&gt;...&lt;/Directory&gt;</code> directive blocks as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#directory\">Apache core documentation</a>. The <code>path</code> key is required in these hashes. Usage will typically look like:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [\n { path =&gt; &#39;/path/to/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n { path =&gt; &#39;/path/to/another/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n ],\n}\n</code></pre>\n\n<p><em>Note:</em> At least one directory should match <code>docroot</code> parameter, once you start declaring directories <code>apache::vhost</code> assumes that all required <code>&lt;Directory&gt;</code> blocks will be declared.</p>\n\n<p><em>Note:</em> If not defined a single default <code>&lt;Directory&gt;</code> block will be created that matches the <code>docroot</code> parameter.</p>\n\n<p>The directives will be embedded within the <code>Directory</code> directive block, missing directives should be undefined and not be added, resulting in their default vaules in Apache. Currently this is the list of supported directives:</p>\n\n<h6><code>addhandlers</code></h6>\n\n<p>Sets <code>AddHandler</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addhandler\">Apache Core documentation</a>. Accepts a list of hashes of the form <code>{ handler =&gt; &#39;handler-name&#39;, extensions =&gt; [&#39;extension&#39;]}</code>. Note that <code>extensions</code> is a list of extenstions being handled by the handler.\nAn example: </p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;,\n addhandlers =&gt; [ { handler =&gt; &#39;cgi-script&#39;, extensions =&gt; [&#39;.cgi&#39;]} ],\n } ],\n}\n</code></pre>\n\n<h6><code>allow</code></h6>\n\n<p>Sets an <code>Allow</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow\">Apache Core documentation</a>. An example:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow =&gt; &#39;from example.org&#39; } ],\n}\n</code></pre>\n\n<h6><code>allow_override</code></h6>\n\n<p>Sets the usage of <code>.htaccess</code> files as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride\">Apache core documentation</a>. Should accept in the form of a list or a string. An example:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow_override =&gt; [&#39;AuthConfig&#39;, &#39;Indexes&#39;] } ],\n}\n</code></pre>\n\n<h6><code>deny</code></h6>\n\n<p>Sets an <code>Deny</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#deny\">Apache Core documentation</a>. An example:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, deny =&gt; &#39;from example.org&#39; } ],\n}\n</code></pre>\n\n<h6><code>options</code></h6>\n\n<p>Lists the options for the given <code>&lt;Directory&gt;</code> block</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;] }],\n}\n</code></pre>\n\n<h6><code>order</code></h6>\n\n<p>Sets the order of processing <code>Allow</code> and <code>Deny</code> statements as per <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order\">Apache core documentation</a>. An example:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, order =&gt; &#39;Allow, Deny&#39; } ],\n}\n</code></pre>\n\n<h6><code>passenger_enabled</code></h6>\n\n<p>Sets the value for the <code>PassengerEnabled</code> directory to <code>on</code> or <code>off</code> as per the <a href=\"http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerEnabled\">Passenger documentation</a>.</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, passenger_enabled =&gt; &#39;off&#39; } ],\n}\n</code></pre>\n\n<p><strong>Note:</strong> This directive requires <code>apache::mod::passenger</code> to be active, Apache may not start with an unrecognised directive without it.</p>\n\n<p><strong>Note:</strong> Be aware that there is an <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">issue</a> using the <code>PassengerEnabled</code> directive with the <code>PassengerHighPerformance</code> directive.</p>\n\n<h5><code>docroot</code></h5>\n\n<p>Provides the DocumentRoot directive, identifying the directory Apache serves files from.</p>\n\n<h5><code>docroot_group</code></h5>\n\n<p>Sets group access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>docroot_owner</code></h5>\n\n<p>Sets individual user access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>error_log</code></h5>\n\n<p>Specifies whether <code>*_error.log</code> directives should be configured. Defaults to &#39;true&#39;.</p>\n\n<h5><code>error_log_file</code></h5>\n\n<p>Points to the <code>*_error.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_log_pipe</code></h5>\n\n<p>Specifies a pipe to send error log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ensure</code></h5>\n\n<p>Specifies if the vhost file is present or absent.</p>\n\n<h5><code>ip</code></h5>\n\n<p>The IP address the vhost listens on. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ip_based</code></h5>\n\n<p>Enables an IP-based vhost. This parameter inhibits the creation of a NameVirtualHost directive, since those are used to funnel requests to name-based vhosts. Defaults to &#39;false&#39;.</p>\n\n<h5><code>logroot</code></h5>\n\n<p>Specifies the location of the virtual host&#39;s logfiles. Defaults to <code>/var/log/&lt;apache log location&gt;/</code>.</p>\n\n<h5><code>no_proxy_uris</code></h5>\n\n<p>Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with <code>proxy_dest</code>.</p>\n\n<h5><code>options</code></h5>\n\n<p>Lists the options for the given virtual host</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;],\n}\n</code></pre>\n\n<h5><code>override</code></h5>\n\n<p>Sets the overrides for the given virtual host. Accepts an array of AllowOverride arguments.</p>\n\n<h5><code>port</code></h5>\n\n<p>Sets the port the host is configured on.</p>\n\n<h5><code>priority</code></h5>\n\n<p>Sets the relative load-order for Apache httpd VirtualHost configuration files. Defaults to &#39;25&#39;.</p>\n\n<p>If nothing matches the priority, the first name-based vhost will be used. Likewise, passing a higher priority will cause the alphabetically first name-based vhost to be used if no other names match.</p>\n\n<p><em>Note</em>: You should not need to use this parameter. However, if you do use it, be aware that the <code>default_vhost</code> parameter for <code>apache::vhost</code> passes a priority of &#39;15&#39;.</p>\n\n<h5><code>proxy_dest</code></h5>\n\n<p>Specifies the destination address of a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>proxy_pass</code></h5>\n\n<p>Specifies an array of path =&gt; uri for a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<p>Example:\n$proxy_pass = [\n { &#39;path&#39; =&gt; &#39;/a&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/&#39; },\n { &#39;path&#39; =&gt; &#39;/b&#39;, &#39;url&#39; =&gt; &#39;http://backend-b/&#39; },\n { &#39;path&#39; =&gt; &#39;/c&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/c&#39; },\n]</p>\n\n<p>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n proxy_pass =&gt; $proxy_pass,\n}</p>\n\n<h5><code>rack_base_uris</code></h5>\n\n<p>Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for passenger/rack in the <code>_rack.erb</code> template. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_dest</code></h5>\n\n<p>Specifies the address to redirect to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_source</code></h5>\n\n<p>Specifies the source items? that will redirect to the destination specified in <code>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>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_source =&gt; [&#39;/images&#39;,&#39;/downloads&#39;],\n redirect_dest =&gt; [&#39;http://img.example.com/&#39;,&#39;http://downloads.example.com/&#39;],\n}\n</code></pre>\n\n<h5><code>redirect_status</code></h5>\n\n<p>Specifies the status to append to the redirect. Defaults to &#39;undef&#39;.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_status =&gt; [&#39;temp&#39;,&#39;permanent&#39;],\n}\n</code></pre>\n\n<h5><code>request_headers</code></h5>\n\n<p>Specifies additional request headers.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n request_headers =&gt; [\n &#39;append MirrorID &quot;mirror 12&quot;&#39;,\n &#39;unset MirrorID&#39;,\n ],\n}\n</code></pre>\n\n<h5><code>rewrite_base</code></h5>\n\n<p>Limits the <code>rewrite_rule</code> to the specified base URL. Defaults to &#39;undef&#39;.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n rewrite_base =&gt; &#39;/blog/&#39;,\n}\n</code></pre>\n\n<p>The above example would limit the index.html -&gt; welcome.html rewrite to only something inside of <a href=\"http://example.com/blog/\">http://example.com/blog/</a>.</p>\n\n<h5><code>rewrite_cond</code></h5>\n\n<p>Rewrites a URL via <code>rewrite_rule</code> based on the truth of specified conditions. For example</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_cond =&gt; &#39;%{HTTP_USER_AGENT} ^MSIE&#39;,\n}\n</code></pre>\n\n<p>will rewrite URLs only if the visitor is using IE. Defaults to &#39;undef&#39;.</p>\n\n<p><em>Note</em>: At the moment, each vhost is limited to a single list of rewrite conditions. In the future, you will be able to specify multiple <code>rewrite_cond</code> and <code>rewrite_rules</code> per vhost, so that different conditions get different rewrites.</p>\n\n<h5><code>rewrite_rule</code></h5>\n\n<p>Creates URL rewrite rules. Defaults to &#39;undef&#39;. This parameter allows you to specify, for example, that anyone trying to access index.html will be served welcome.html.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n}\n</code></pre>\n\n<h5><code>scriptalias</code></h5>\n\n<p>Defines a directory of CGI scripts to be aliased to the path &#39;/cgi-bin&#39;</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Specifies the email address Apache will display when it renders one of its error pages.</p>\n\n<h5><code>serveraliases</code></h5>\n\n<p>Sets the server aliases of the site.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the primary name of the virtual host.</p>\n\n<h5><code>setenv</code></h5>\n\n<p>Used by HTTPD to set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>setenvif</code></h5>\n\n<p>Used by HTTPD to conditionally set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>ssl</code></h5>\n\n<p>Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are &#39;true&#39; or &#39;false&#39;.</p>\n\n<h5><code>ssl_ca</code></h5>\n\n<p>Specifies the certificate authority.</p>\n\n<h5><code>ssl_cert</code></h5>\n\n<p>Specifies the SSL certification.</p>\n\n<h5><code>ssl_certs_dir</code></h5>\n\n<p>Specifies the location of the SSL certification directory. Defaults to <code>/etc/ssl/certs</code>.</p>\n\n<h5><code>ssl_chain</code></h5>\n\n<p>Specifies the SSL chain.</p>\n\n<h5><code>ssl_crl</code></h5>\n\n<p>Specifies the certificate revocation list to use.</p>\n\n<h5><code>ssl_crl_path</code></h5>\n\n<p>Specifies the location of the certificate revocation list.</p>\n\n<h5><code>ssl_key</code></h5>\n\n<p>Specifies the SSL key.</p>\n\n<h5><code>vhost_name</code></h5>\n\n<p>This parameter is for use with name-based virtual hosting. Defaults to &#39;*&#39;.</p>\n\n<h3>Virtual Host Examples</h3>\n\n<p>The Apache module allows you to set up pretty much any configuration of virtual host you might desire. This section will address some common configurations. Please see the <a href=\"https://github.com/puppetlabs/puppetlabs-apache/tree/master/tests\">Tests section</a> for even more examples.</p>\n\n<p>Configure a vhost with a server administrator</p>\n\n<pre><code>apache::vhost { &#39;third.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n serveradmin =&gt; &#39;admin@example.com&#39;,\n}\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with aliased servers</p>\n\n<pre><code>apache::vhost { &#39;sixth.example.com&#39;:\n serveraliases =&gt; [\n &#39;sixth.example.org&#39;,\n &#39;sixth.example.net&#39;,\n ],\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n}\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost with a cgi-bin</p>\n\n<pre><code>apache::vhost { &#39;eleventh.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/eleventh&#39;,\n scriptalias =&gt; &#39;/usr/lib/cgi-bin&#39;,\n}\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with a rack configuration</p>\n\n<pre><code>apache::vhost { &#39;fifteenth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifteenth&#39;,\n rack_base_uris =&gt; [&#39;/rackapp1&#39;, &#39;/rackapp2&#39;],\n}\n</code></pre>\n\n<hr>\n\n<p>Set up a mix of SSL and non-SSL vhosts at the same domain</p>\n\n<pre><code>#The non-ssl vhost\napache::vhost { &#39;first.example.com non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n}\n\n#The SSL vhost at the same domain\napache::vhost { &#39;first.example.com ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost to redirect non-SSL connections to SSL</p>\n\n<pre><code>apache::vhost { &#39;sixteenth.example.com non-ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n redirect_status =&gt; &#39;permanent&#39;\n redirect_dest =&gt; &#39;https://sixteenth.example.com/&#39; \n}\napache::vhost { &#39;sixteenth.example.com ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<hr>\n\n<p>Set up IP-based vhosts on any listen port and have them respond to requests on specific IP addresses. In this example, we will set listening on ports 80 and 81. This is required because the example vhosts are not declared with a port parameter.</p>\n\n<pre><code>apache::listen { &#39;80&#39;: }\napache::listen { &#39;81&#39;: }\n</code></pre>\n\n<p>Then we will set up the IP-based vhosts</p>\n\n<pre><code>apache::vhost { &#39;first.example.com&#39;:\n ip =&gt; &#39;10.0.0.10&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ip_based =&gt; true,\n}\napache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.11&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n ip_based =&gt; true,\n}\n</code></pre>\n\n<hr>\n\n<p>Configure a mix of name-based and IP-based vhosts. First, we will add two IP-based vhosts on 10.0.0.10, one SSL and one non-SSL</p>\n\n<pre><code>apache::vhost { &#39;The first IP-based vhost, non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;80&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first&#39;,\n}\napache::vhost { &#39;The first IP-based vhost, ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;443&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first-ssl&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<p>Then, we will add two name-based vhosts listening on 10.0.0.20</p>\n\n<pre><code>apache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n}\napache::vhost { &#39;third.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n}\n</code></pre>\n\n<p>If you want to add two name-based vhosts so that they will answer on either 10.0.0.10 or 10.0.0.20, you <strong>MUST</strong> declare <code>add_listen =&gt; &#39;false&#39;</code> to disable the otherwise automatic &#39;Listen 80&#39;, as it will conflict with the preceding IP-based vhosts.</p>\n\n<pre><code>apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n add_listen =&gt; false,\n}\napache::vhost { &#39;fifth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n add_listen =&gt; false,\n}\n</code></pre>\n\n<h2>Implementation</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<h4>Class: <code>apache::dev</code></h4>\n\n<p>Installs Apache development libraries</p>\n\n<pre><code>class { &#39;apache::dev&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::listen</code></h4>\n\n<p>Controls which ports Apache binds to for listening based on the title:</p>\n\n<pre><code>apache::listen { &#39;80&#39;: }\napache::listen { &#39;443&#39;: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>Listen</code> directives to the <code>ports.conf</code> file in the Apache httpd configuration directory. <code>apache::listen</code> titles should always take the form of: <code>&lt;port&gt;</code>, <code>&lt;ipv4&gt;:&lt;port&gt;</code>, or <code>[&lt;ipv6&gt;]:&lt;port&gt;</code></p>\n\n<p>Apache httpd requires that <code>Listen</code> directives must be added for every port. The <code>apache::vhost</code> defined type will automatically add <code>Listen</code> directives unless the <code>apache::vhost</code> is passed <code>add_listen =&gt; false</code>.</p>\n\n<h4>Defined Type: <code>apache::namevirtualhost</code></h4>\n\n<p>Enables named-based hosting of a virtual host</p>\n\n<pre><code>class { &#39;apache::namevirtualhost`: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>NameVirtualHost</code> directives to the <code>ports.conf</code> file in the Apache https configuration directory. <code>apache::namevirtualhost</code> titles should always take the form of: <code>*</code>, <code>*:&lt;port&gt;</code>, <code>_default_:&lt;port&gt;</code>, <code>&lt;ip&gt;</code>, or <code>&lt;ip&gt;:&lt;port&gt;</code>.</p>\n\n<h4>Defined Type: <code>apache::balancermember</code></h4>\n\n<p>Define members of a proxy_balancer set (mod_proxy_balancer). Very useful when using exported resources.</p>\n\n<p>On every app server you can export a balancermember like this:</p>\n\n<pre><code> @@apache::balancermember { &quot;${::fqdn}-puppet00&quot;:\n balancer_cluster =&gt; &#39;puppet00&#39;,\n url =&gt; &quot;ajp://${::fqdn}:8009&quot;\n options =&gt; [&#39;ping=5&#39;, &#39;disablereuse=on&#39;, &#39;retry=5&#39;, &#39;ttl=120&#39;],\n }\n</code></pre>\n\n<p>And on the proxy itself you create the balancer cluster using the defined type apache::balancer:</p>\n\n<pre><code> apache::balancer { &#39;puppet00&#39;: }\n</code></pre>\n\n<p>If you need to use ProxySet in the balncer config you can do as so:</p>\n\n<pre><code> apache::balancer { &#39;puppet01&#39;:\n proxy_set =&gt; {&#39;stickysession&#39; =&gt; &#39;JSESSIONID&#39;},\n }\n</code></pre>\n\n<h3>Templates</h3>\n\n<p>The Apache module relies heavily on templates to enable the <code>vhost</code> and <code>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>\n\n<h2>Limitations</h2>\n\n<p>This has been tested on Ubuntu Precise, Debian Wheezy, and CentOS 5.8.</p>\n\n<h2>Development</h2>\n\n<h3>Overview</h3>\n\n<p>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>\n\n<p>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>\n\n<p>You can read the complete module contribution guide <a href=\"http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing\">on the Puppet Labs wiki.</a></p>\n\n<h3>Running tests</h3>\n\n<p>This project contains tests for both <a href=\"http://rspec-puppet.com/\">rspec-puppet</a> and <a href=\"https://github.com/puppetlabs/rspec-system\">rspec-system</a> to verify functionality. For in-depth information please see their respective documentation.</p>\n\n<p>Quickstart:</p>\n\n<pre><code>gem install bundler\nbundle install\nbundle exec rake spec\nbundle exec rake spec:system\n</code></pre>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.</p>\n</section>",
1742
+ "readme": "<section class=\"markdown\"><h1>apache</h1>\n\n<h4>Table of Contents</h4>\n\n<ol>\n<li><a href=\"#overview\">Overview - What is the Apache module?</a></li>\n<li><a href=\"#module-description\">Module Description - What does the module do?</a></li>\n<li><a href=\"#setup\">Setup - The basics of getting started with Apache</a>\n\n<ul>\n<li><a href=\"#beginning-with-apache\">Beginning with Apache - Installation</a></li>\n<li><a href=\"#configure-a-virtual-host\">Configure a Virtual Host - Basic options for getting started</a></li>\n</ul></li>\n<li><a href=\"#usage\">Usage - The classes, defined types, and their parameters available for configuration</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a>\n\n<ul>\n<li><a href=\"#class-apache\">Class: apache</a></li>\n<li><a href=\"#classes-apachemodname\">Classes: apache::mod::*</a></li>\n<li><a href=\"#defined-type-apachevhost\">Defined Type: apache::vhost</a></li>\n</ul></li>\n<li><a href=\"#virtual-host-examples\">Virtual Host Examples - Demonstrations of some configuration options</a></li>\n</ul></li>\n<li><a href=\"#implementation\">Implementation - An under-the-hood peek at what the module is doing</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a></li>\n<li><a href=\"#templates\">Templates</a></li>\n</ul></li>\n<li><a href=\"#limitations\">Limitations - OS compatibility, etc.</a></li>\n<li><a href=\"#development\">Development - Guide for contributing to the module</a></li>\n<li><a href=\"#release-notes\">Release Notes - Notes on the most recent updates to the module</a></li>\n</ol>\n\n<h2>Overview</h2>\n\n<p>The Apache module allows you to set up virtual hosts and manage web services with minimal effort.</p>\n\n<h2>Module Description</h2>\n\n<p>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>\n\n<h2>Setup</h2>\n\n<p><strong>What Apache affects:</strong></p>\n\n<ul>\n<li>configuration files and directories (created and written to)\n\n<ul>\n<li><strong>NOTE</strong>: Configurations that are <em>not</em> managed by Puppet will be purged.</li>\n</ul></li>\n<li>package/service/configuration files for Apache</li>\n<li>Apache modules</li>\n<li>virtual hosts</li>\n<li>listened-to ports</li>\n</ul>\n\n<h3>Beginning with Apache</h3>\n\n<p>To install Apache with the default parameters</p>\n\n<pre><code>class { &#39;apache&#39;: }\n</code></pre>\n\n<p>The defaults are determined by your operating system (e.g. Debian systems have one set of defaults, RedHat systems have another). These defaults will work well in a testing environment, but are not suggested for production. To establish customized parameters</p>\n\n<pre><code>class { &#39;apache&#39;:\n default_mods =&gt; false,\n …\n}\n</code></pre>\n\n<h3>Configure a virtual host</h3>\n\n<p>Declaring the <code>apache</code> class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving <code>$apache::docroot</code>.</p>\n\n<pre><code>class { &#39;apache&#39;: }\n</code></pre>\n\n<p>To configure a very basic, name-based virtual host</p>\n\n<pre><code>apache::vhost { &#39;first.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n}\n</code></pre>\n\n<p><em>Note:</em> The default priority is 15. If nothing matches this priority, the alphabetically first name-based vhost will be used. This is also true if you pass a higher priority and no names match anything else.</p>\n\n<p>A slightly more complicated example, which moves the docroot owner/group</p>\n\n<pre><code>apache::vhost { &#39;second.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n docroot_owner =&gt; &#39;third&#39;,\n docroot_group =&gt; &#39;third&#39;,\n}\n</code></pre>\n\n<p>To set up a virtual host with SSL and default SSL certificates</p>\n\n<pre><code>apache::vhost { &#39;ssl.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/ssl&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<p>To set up a virtual host with SSL and specific SSL certificates</p>\n\n<pre><code>apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n ssl =&gt; true,\n ssl_cert =&gt; &#39;/etc/ssl/fourth.example.com.cert&#39;,\n ssl_key =&gt; &#39;/etc/ssl/fourth.example.com.key&#39;,\n}\n</code></pre>\n\n<p>To set up a virtual host with wildcard alias for subdomain mapped to same named directory \n<code>http://examle.com.loc =&gt; /var/www/example.com</code></p>\n\n<pre><code>apache::vhost { &#39;subdomain.loc&#39;:\n vhost_name =&gt; &#39;*&#39;,\n port =&gt; &#39;80&#39;,\n virtual_docroot&#39; =&gt; &#39;/var/www/%-2+&#39;,\n docroot =&gt; &#39;/var/www&#39;,\n serveraliases =&gt; [&#39;*.loc&#39;,],\n}\n</code></pre>\n\n<p>To see a list of all virtual host parameters, <a href=\"#defined-type-apachevhost\">please go here</a>. To see an extensive list of virtual host examples <a href=\"#virtual-host-examples\">please look here</a>.</p>\n\n<h2>Usage</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<p>This module modifies Apache configuration files and directories and will purge any configuration not managed by Puppet. Configuration of Apache should be managed by Puppet, as non-puppet configuration files can cause unexpected failures.</p>\n\n<p>It is possible to temporarily disable full Puppet management by setting the <code>purge_configs</code> parameter within the base <code>apache</code> class to &#39;false&#39;. This option should only be used as a temporary means of saving and relocating customized configurations.</p>\n\n<h4>Class: <code>apache</code></h4>\n\n<p>The Apache module&#39;s primary class, <code>apache</code>, guides the basic setup of Apache on your system.</p>\n\n<p>You may establish a default vhost in this class, the <code>vhost</code> class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the <code>vhost</code> type.</p>\n\n<p><strong>Parameters within <code>apache</code>:</strong></p>\n\n<h5><code>default_mods</code></h5>\n\n<p>Sets up Apache with default settings based on your OS. Defaults to &#39;true&#39;, set to &#39;false&#39; for customized configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets up a default virtual host. Defaults to &#39;true&#39;, set to &#39;false&#39; to set up <a href=\"#configure-a-virtual-host\">customized virtual hosts</a>.</p>\n\n<h5><code>default_ssl_vhost</code></h5>\n\n<p>Sets up a default SSL virtual host. Defaults to &#39;false&#39;.</p>\n\n<pre><code>apache::vhost { &#39;default-ssl&#39;:\n port =&gt; 443,\n ssl =&gt; true,\n docroot =&gt; $docroot,\n scriptalias =&gt; $scriptalias,\n serveradmin =&gt; $serveradmin,\n access_log_file =&gt; &quot;ssl_${access_log_file}&quot;,\n }\n</code></pre>\n\n<p>SSL vhosts only respond to HTTPS queries.</p>\n\n<h5><code>default_ssl_cert</code></h5>\n\n<p>The default SSL certification, which is automatically set based on your operating system (<code>/etc/pki/tls/certs/localhost.crt</code> for RedHat, <code>/etc/ssl/certs/ssl-cert-snakeoil.pem</code> for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_key</code></h5>\n\n<p>The default SSL key, which is automatically set based on your operating system (<code>/etc/pki/tls/private/localhost.key</code> for RedHat, <code>/etc/ssl/private/ssl-cert-snakeoil.key</code> for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_chain</code></h5>\n\n<p>The default SSL chain, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_ca</code></h5>\n\n<p>The default certificate authority, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl_path</code></h5>\n\n<p>The default certificate revocation list path, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl</code></h5>\n\n<p>The default certificate revocation list to use, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>service_enable</code></h5>\n\n<p>Determines whether the &#39;httpd&#39; service is enabled when the machine is booted, meaning Puppet will check the service status to start/stop it. Defaults to &#39;true&#39;, meaning the service is enabled/running.</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Sets the server administrator. Defaults to &#39;root@localhost&#39;.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the servername. Defaults to fqdn provided by facter.</p>\n\n<h5><code>sendfile</code></h5>\n\n<p>Makes Apache use the Linux kernel &#39;sendfile&#39; to serve static files. Defaults to &#39;false&#39;.</p>\n\n<h5><code>error_documents</code></h5>\n\n<p>Enables custom error documents. Defaults to &#39;false&#39;.</p>\n\n<h5><code>confd_dir</code></h5>\n\n<p>Changes the location of the configuration directory your custom configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>vhost_dir</code></h5>\n\n<p>Changes the location of the configuration directory your virtual host configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mod_dir</code></h5>\n\n<p>Changes the location of the configuration directory your Apache modules configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mpm_module</code></h5>\n\n<p>Configures which mpm module is loaded and configured for the httpd process by the <code>apache::mod::prefork</code> and <code>apache::mod::worker</code> classes. Must be set to <code>false</code> to explicitly declare <code>apache::mod::worker</code> or <code>apache::mod::prefork</code> classes with parameters. Valid values are <code>worker</code>, <code>prefork</code>, or the boolean <code>false</code>. Defaults to <code>prefork</code> on RedHat and <code>worker</code> on Debian.</p>\n\n<h5><code>conf_template</code></h5>\n\n<p>Setting this allows you to override the template used for the main apache configuration file. This is a potentially risky thing to do as this module has been built around the concept of a minimal configuration file with most of the configuration coming in the form of conf.d/ entries. Defaults to &#39;apache/httpd.conf.erb&#39;.</p>\n\n<h4>Class: <code>apache::default_mods</code></h4>\n\n<p>Installs default Apache modules based on what OS you are running</p>\n\n<pre><code>class { &#39;apache::default_mods&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::mod</code></h4>\n\n<p>Used to enable arbitrary Apache httpd modules for which there is no specific <code>apache::mod::[name]</code> class. The <code>apache::mod</code> defined type will also install the required packages to enable the module, if any.</p>\n\n<pre><code>apache::mod { &#39;rewrite&#39;: }\napache::mod { &#39;ldap&#39;: }\n</code></pre>\n\n<h4>Classes: <code>apache::mod::[name]</code></h4>\n\n<p>There are many <code>apache::mod::[name]</code> classes within this module that can be declared using <code>include</code>:</p>\n\n<ul>\n<li><code>alias</code></li>\n<li><code>auth_basic</code></li>\n<li><code>auth_kerb</code></li>\n<li><code>autoindex</code></li>\n<li><code>cache</code></li>\n<li><code>cgi</code></li>\n<li><code>cgid</code></li>\n<li><code>dav</code></li>\n<li><code>dav_fs</code></li>\n<li><code>deflate</code></li>\n<li><code>dir</code>*</li>\n<li><code>disk_cache</code></li>\n<li><code>fcgid</code></li>\n<li><code>info</code></li>\n<li><code>ldap</code></li>\n<li><code>mime</code></li>\n<li><code>mime_magic</code></li>\n<li><code>mpm_event</code></li>\n<li><code>negotiation</code></li>\n<li><code>passenger</code>*</li>\n<li><code>perl</code></li>\n<li><code>php</code> (requires <a href=\"#mpm_module\"><code>mpm_module</code></a> set to <code>prefork</code>)</li>\n<li><code>prefork</code>*</li>\n<li><code>proxy</code>*</li>\n<li><code>proxy_html</code></li>\n<li><code>proxy_http</code></li>\n<li><code>python</code></li>\n<li><code>reqtimeout</code></li>\n<li><code>setenvif</code></li>\n<li><code>ssl</code>* (see <a href=\"#class-apachemodssl\">apache::mod::ssl</a> below)</li>\n<li><code>status</code></li>\n<li><code>userdir</code>*</li>\n<li><code>worker</code>*</li>\n<li><code>wsgi</code></li>\n<li><code>xsendfile</code></li>\n</ul>\n\n<p>Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module&#39;s configuration. Most of the time, these parameters will not require any configuration or attention.</p>\n\n<p>The modules mentioned above, and other Apache modules that have templates, will cause template files to be dropped along with the mod install, and the module will not work without the template. Any mod without a template will install package but drop no files.</p>\n\n<h4>Class: <code>apache::mod::ssl</code></h4>\n\n<p>Installs Apache SSL capabilities and utilizes <code>ssl.conf.erb</code> template</p>\n\n<pre><code>class { &#39;apache::mod::ssl&#39;: }\n</code></pre>\n\n<p>To <em>use</em> SSL with a virtual host, you must either set the<code>default_ssl_vhost</code> parameter in <code>apache</code> to &#39;true&#39; or set the <code>ssl</code> parameter in <code>apache::vhost</code> to &#39;true&#39;.</p>\n\n<h4>Defined Type: <code>apache::vhost</code></h4>\n\n<p>The Apache module allows a lot of flexibility in the set up and configuration of virtual hosts. This flexibility is due, in part, to <code>vhost</code>&#39;s setup as a defined resource type, which allows it to be evaluated multiple times with different parameters.</p>\n\n<p>The <code>vhost</code> defined type allows you to have specialized configurations for virtual hosts that have requirements outside of the defaults. You can set up a default vhost within the base <code>apache</code> class as well as set a customized vhost setup as default. Your customized vhost (priority 10) will be privileged over the base class vhost (15).</p>\n\n<p>If you have a series of specific configurations and do not want a base <code>apache</code> class default vhost, make sure to set the base class default host to &#39;false&#39;.</p>\n\n<pre><code>class { &#39;apache&#39;:\n default_vhost =&gt; false,\n}\n</code></pre>\n\n<p><strong>Parameters within <code>apache::vhost</code>:</strong></p>\n\n<p>The default values for each parameter will vary based on operating system and type of virtual host.</p>\n\n<h5><code>access_log</code></h5>\n\n<p>Specifies whether <code>*_access.log</code> directives should be configured. Valid values are &#39;true&#39; and &#39;false&#39;. Defaults to &#39;true&#39;.</p>\n\n<h5><code>access_log_file</code></h5>\n\n<p>Points to the <code>*_access.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_pipe</code></h5>\n\n<p>Specifies a pipe to send access log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_format</code></h5>\n\n<p>Specifies either a LogFormat nickname or custom format string for access log. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>add_listen</code></h5>\n\n<p>Determines whether the vhost creates a listen statement. The default value is &#39;true&#39;.</p>\n\n<p>Setting <code>add_listen</code> to &#39;false&#39; stops the vhost from creating a listen statement, and this is important when you combine vhosts that are not passed an <code>ip</code> parameter with vhosts that <em>are</em> passed the <code>ip</code> parameter.</p>\n\n<h5><code>aliases</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>Alias</code> statements as per the <a href=\"http://httpd.apache.org/docs/current/mod/mod_alias.html\"><code>mod_alias</code> documentation</a>. Each hash is expected to be of the form:</p>\n\n<pre lang=\"ruby\"><code>aliases =&gt; [ { alias =&gt; &#39;/alias&#39;, path =&gt; &#39;/path/to/directory&#39; } ],\n</code></pre>\n\n<p>For <code>Alias</code> to work, each will need a corresponding <code>&lt;Directory /path/to/directory&gt;</code> or <code>&lt;Location /path/to/directory&gt;</code> block.</p>\n\n<p><strong>Note:</strong> If <code>apache::mod::passenger</code> is loaded and <code>PassengerHighPerformance true</code> is set, then <code>Alias</code> may have issues honouring the <code>PassengerEnabled off</code> statement. See <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">this article</a> for details.</p>\n\n<h5><code>block</code></h5>\n\n<p>Specifies the list of things Apache will block access to. The default is an empty set, &#39;[]&#39;. Currently, the only option is &#39;scm&#39;, which blocks web access to .svn, .git and .bzr directories. To add to this, please see the <a href=\"#development\">Development</a> section.</p>\n\n<h5><code>custom_fragment</code></h5>\n\n<p>Pass a string of custom configuration directives to be placed at the end of the vhost configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets a given <code>apache::vhost</code> as the default to serve requests that do not match any other <code>apache::vhost</code> definitions. The default value is &#39;false&#39;.</p>\n\n<h5><code>directories</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>&lt;Directory /path/to/directory&gt;...&lt;/Directory&gt;</code> directive blocks as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#directory\">Apache core documentation</a>. The <code>path</code> key is required in these hashes. Usage will typically look like:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [\n { path =&gt; &#39;/path/to/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n { path =&gt; &#39;/path/to/another/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; },\n ],\n}\n</code></pre>\n\n<p><em>Note:</em> At least one directory should match <code>docroot</code> parameter, once you start declaring directories <code>apache::vhost</code> assumes that all required <code>&lt;Directory&gt;</code> blocks will be declared.</p>\n\n<p><em>Note:</em> If not defined a single default <code>&lt;Directory&gt;</code> block will be created that matches the <code>docroot</code> parameter.</p>\n\n<p>The directives will be embedded within the <code>Directory</code> directive block, missing directives should be undefined and not be added, resulting in their default vaules in Apache. Currently this is the list of supported directives:</p>\n\n<h6><code>addhandlers</code></h6>\n\n<p>Sets <code>AddHandler</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addhandler\">Apache Core documentation</a>. Accepts a list of hashes of the form <code>{ handler =&gt; &#39;handler-name&#39;, extensions =&gt; [&#39;extension&#39;]}</code>. Note that <code>extensions</code> is a list of extenstions being handled by the handler.\nAn example: </p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;,\n addhandlers =&gt; [ { handler =&gt; &#39;cgi-script&#39;, extensions =&gt; [&#39;.cgi&#39;]} ],\n } ],\n}\n</code></pre>\n\n<h6><code>allow</code></h6>\n\n<p>Sets an <code>Allow</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow\">Apache Core documentation</a>. An example:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow =&gt; &#39;from example.org&#39; } ],\n}\n</code></pre>\n\n<h6><code>allow_override</code></h6>\n\n<p>Sets the usage of <code>.htaccess</code> files as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride\">Apache core documentation</a>. Should accept in the form of a list or a string. An example:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow_override =&gt; [&#39;AuthConfig&#39;, &#39;Indexes&#39;] } ],\n}\n</code></pre>\n\n<h6><code>deny</code></h6>\n\n<p>Sets an <code>Deny</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#deny\">Apache Core documentation</a>. An example:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, deny =&gt; &#39;from example.org&#39; } ],\n}\n</code></pre>\n\n<h6><code>options</code></h6>\n\n<p>Lists the options for the given <code>&lt;Directory&gt;</code> block</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;] }],\n}\n</code></pre>\n\n<h6><code>order</code></h6>\n\n<p>Sets the order of processing <code>Allow</code> and <code>Deny</code> statements as per <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order\">Apache core documentation</a>. An example:</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, order =&gt; &#39;Allow, Deny&#39; } ],\n}\n</code></pre>\n\n<h6><code>passenger_enabled</code></h6>\n\n<p>Sets the value for the <code>PassengerEnabled</code> directory to <code>on</code> or <code>off</code> as per the <a href=\"http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerEnabled\">Passenger documentation</a>.</p>\n\n<pre><code>apache::vhost { &#39;sample.example.net&#39;:\n docroot =&gt; &#39;/path/to/directory&#39;,\n directories =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, passenger_enabled =&gt; &#39;off&#39; } ],\n}\n</code></pre>\n\n<p><strong>Note:</strong> This directive requires <code>apache::mod::passenger</code> to be active, Apache may not start with an unrecognised directive without it.</p>\n\n<p><strong>Note:</strong> Be aware that there is an <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">issue</a> using the <code>PassengerEnabled</code> directive with the <code>PassengerHighPerformance</code> directive.</p>\n\n<h5><code>docroot</code></h5>\n\n<p>Provides the DocumentRoot directive, identifying the directory Apache serves files from.</p>\n\n<h5><code>docroot_group</code></h5>\n\n<p>Sets group access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>docroot_owner</code></h5>\n\n<p>Sets individual user access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>error_log</code></h5>\n\n<p>Specifies whether <code>*_error.log</code> directives should be configured. Defaults to &#39;true&#39;.</p>\n\n<h5><code>error_log_file</code></h5>\n\n<p>Points to the <code>*_error.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_log_pipe</code></h5>\n\n<p>Specifies a pipe to send error log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ensure</code></h5>\n\n<p>Specifies if the vhost file is present or absent.</p>\n\n<h5><code>ip</code></h5>\n\n<p>The IP address the vhost listens on. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ip_based</code></h5>\n\n<p>Enables an IP-based vhost. This parameter inhibits the creation of a NameVirtualHost directive, since those are used to funnel requests to name-based vhosts. Defaults to &#39;false&#39;.</p>\n\n<h5><code>logroot</code></h5>\n\n<p>Specifies the location of the virtual host&#39;s logfiles. Defaults to <code>/var/log/&lt;apache log location&gt;/</code>.</p>\n\n<h5><code>no_proxy_uris</code></h5>\n\n<p>Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with <code>proxy_dest</code>.</p>\n\n<h5><code>options</code></h5>\n\n<p>Lists the options for the given virtual host</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;],\n}\n</code></pre>\n\n<h5><code>override</code></h5>\n\n<p>Sets the overrides for the given virtual host. Accepts an array of AllowOverride arguments.</p>\n\n<h5><code>port</code></h5>\n\n<p>Sets the port the host is configured on.</p>\n\n<h5><code>priority</code></h5>\n\n<p>Sets the relative load-order for Apache httpd VirtualHost configuration files. Defaults to &#39;25&#39;.</p>\n\n<p>If nothing matches the priority, the first name-based vhost will be used. Likewise, passing a higher priority will cause the alphabetically first name-based vhost to be used if no other names match.</p>\n\n<p><em>Note</em>: You should not need to use this parameter. However, if you do use it, be aware that the <code>default_vhost</code> parameter for <code>apache::vhost</code> passes a priority of &#39;15&#39;.</p>\n\n<h5><code>proxy_dest</code></h5>\n\n<p>Specifies the destination address of a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>proxy_pass</code></h5>\n\n<p>Specifies an array of path =&gt; uri for a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<p>Example:\n$proxy_pass = [\n { &#39;path&#39; =&gt; &#39;/a&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/&#39; },\n { &#39;path&#39; =&gt; &#39;/b&#39;, &#39;url&#39; =&gt; &#39;http://backend-b/&#39; },\n { &#39;path&#39; =&gt; &#39;/c&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/c&#39; },\n]</p>\n\n<p>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n proxy_pass =&gt; $proxy_pass,\n}</p>\n\n<h5><code>rack_base_uris</code></h5>\n\n<p>Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for passenger/rack in the <code>_rack.erb</code> template. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_dest</code></h5>\n\n<p>Specifies the address to redirect to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_source</code></h5>\n\n<p>Specifies the source items? that will redirect to the destination specified in <code>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>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_source =&gt; [&#39;/images&#39;,&#39;/downloads&#39;],\n redirect_dest =&gt; [&#39;http://img.example.com/&#39;,&#39;http://downloads.example.com/&#39;],\n}\n</code></pre>\n\n<h5><code>redirect_status</code></h5>\n\n<p>Specifies the status to append to the redirect. Defaults to &#39;undef&#39;.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_status =&gt; [&#39;temp&#39;,&#39;permanent&#39;],\n}\n</code></pre>\n\n<h5><code>request_headers</code></h5>\n\n<p>Specifies additional request headers.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n request_headers =&gt; [\n &#39;append MirrorID &quot;mirror 12&quot;&#39;,\n &#39;unset MirrorID&#39;,\n ],\n}\n</code></pre>\n\n<h5><code>rewrite_base</code></h5>\n\n<p>Limits the <code>rewrite_rule</code> to the specified base URL. Defaults to &#39;undef&#39;.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n rewrite_base =&gt; &#39;/blog/&#39;,\n}\n</code></pre>\n\n<p>The above example would limit the index.html -&gt; welcome.html rewrite to only something inside of <a href=\"http://example.com/blog/\">http://example.com/blog/</a>.</p>\n\n<h5><code>rewrite_cond</code></h5>\n\n<p>Rewrites a URL via <code>rewrite_rule</code> based on the truth of specified conditions. For example</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_cond =&gt; &#39;%{HTTP_USER_AGENT} ^MSIE&#39;,\n}\n</code></pre>\n\n<p>will rewrite URLs only if the visitor is using IE. Defaults to &#39;undef&#39;.</p>\n\n<p><em>Note</em>: At the moment, each vhost is limited to a single list of rewrite conditions. In the future, you will be able to specify multiple <code>rewrite_cond</code> and <code>rewrite_rules</code> per vhost, so that different conditions get different rewrites.</p>\n\n<h5><code>rewrite_rule</code></h5>\n\n<p>Creates URL rewrite rules. Defaults to &#39;undef&#39;. This parameter allows you to specify, for example, that anyone trying to access index.html will be served welcome.html.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n}\n</code></pre>\n\n<h5><code>scriptalias</code></h5>\n\n<p>Defines a directory of CGI scripts to be aliased to the path &#39;/cgi-bin&#39;</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Specifies the email address Apache will display when it renders one of its error pages.</p>\n\n<h5><code>serveraliases</code></h5>\n\n<p>Sets the server aliases of the site.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the primary name of the virtual host.</p>\n\n<h5><code>setenv</code></h5>\n\n<p>Used by HTTPD to set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>setenvif</code></h5>\n\n<p>Used by HTTPD to conditionally set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>ssl</code></h5>\n\n<p>Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are &#39;true&#39; or &#39;false&#39;.</p>\n\n<h5><code>ssl_ca</code></h5>\n\n<p>Specifies the certificate authority.</p>\n\n<h5><code>ssl_cert</code></h5>\n\n<p>Specifies the SSL certification.</p>\n\n<h5><code>ssl_certs_dir</code></h5>\n\n<p>Specifies the location of the SSL certification directory. Defaults to <code>/etc/ssl/certs</code>.</p>\n\n<h5><code>ssl_chain</code></h5>\n\n<p>Specifies the SSL chain.</p>\n\n<h5><code>ssl_crl</code></h5>\n\n<p>Specifies the certificate revocation list to use.</p>\n\n<h5><code>ssl_crl_path</code></h5>\n\n<p>Specifies the location of the certificate revocation list.</p>\n\n<h5><code>ssl_key</code></h5>\n\n<p>Specifies the SSL key.</p>\n\n<h5><code>vhost_name</code></h5>\n\n<p>This parameter is for use with name-based virtual hosting. Defaults to &#39;*&#39;.</p>\n\n<h3>Virtual Host Examples</h3>\n\n<p>The Apache module allows you to set up pretty much any configuration of virtual host you might desire. This section will address some common configurations. Please see the <a href=\"https://github.com/puppetlabs/puppetlabs-apache/tree/main/tests\">Tests section</a> for even more examples.</p>\n\n<p>Configure a vhost with a server administrator</p>\n\n<pre><code>apache::vhost { &#39;third.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n serveradmin =&gt; &#39;admin@example.com&#39;,\n}\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with aliased servers</p>\n\n<pre><code>apache::vhost { &#39;sixth.example.com&#39;:\n serveraliases =&gt; [\n &#39;sixth.example.org&#39;,\n &#39;sixth.example.net&#39;,\n ],\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n}\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost with a cgi-bin</p>\n\n<pre><code>apache::vhost { &#39;eleventh.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/eleventh&#39;,\n scriptalias =&gt; &#39;/usr/lib/cgi-bin&#39;,\n}\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with a rack configuration</p>\n\n<pre><code>apache::vhost { &#39;fifteenth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifteenth&#39;,\n rack_base_uris =&gt; [&#39;/rackapp1&#39;, &#39;/rackapp2&#39;],\n}\n</code></pre>\n\n<hr>\n\n<p>Set up a mix of SSL and non-SSL vhosts at the same domain</p>\n\n<pre><code>#The non-ssl vhost\napache::vhost { &#39;first.example.com non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n}\n\n#The SSL vhost at the same domain\napache::vhost { &#39;first.example.com ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost to redirect non-SSL connections to SSL</p>\n\n<pre><code>apache::vhost { &#39;sixteenth.example.com non-ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n redirect_status =&gt; &#39;permanent&#39;\n redirect_dest =&gt; &#39;https://sixteenth.example.com/&#39; \n}\napache::vhost { &#39;sixteenth.example.com ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<hr>\n\n<p>Set up IP-based vhosts on any listen port and have them respond to requests on specific IP addresses. In this example, we will set listening on ports 80 and 81. This is required because the example vhosts are not declared with a port parameter.</p>\n\n<pre><code>apache::listen { &#39;80&#39;: }\napache::listen { &#39;81&#39;: }\n</code></pre>\n\n<p>Then we will set up the IP-based vhosts</p>\n\n<pre><code>apache::vhost { &#39;first.example.com&#39;:\n ip =&gt; &#39;10.0.0.10&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ip_based =&gt; true,\n}\napache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.11&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n ip_based =&gt; true,\n}\n</code></pre>\n\n<hr>\n\n<p>Configure a mix of name-based and IP-based vhosts. First, we will add two IP-based vhosts on 10.0.0.10, one SSL and one non-SSL</p>\n\n<pre><code>apache::vhost { &#39;The first IP-based vhost, non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;80&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first&#39;,\n}\napache::vhost { &#39;The first IP-based vhost, ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;443&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first-ssl&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<p>Then, we will add two name-based vhosts listening on 10.0.0.20</p>\n\n<pre><code>apache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n}\napache::vhost { &#39;third.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n}\n</code></pre>\n\n<p>If you want to add two name-based vhosts so that they will answer on either 10.0.0.10 or 10.0.0.20, you <strong>MUST</strong> declare <code>add_listen =&gt; &#39;false&#39;</code> to disable the otherwise automatic &#39;Listen 80&#39;, as it will conflict with the preceding IP-based vhosts.</p>\n\n<pre><code>apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n add_listen =&gt; false,\n}\napache::vhost { &#39;fifth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n add_listen =&gt; false,\n}\n</code></pre>\n\n<h2>Implementation</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<h4>Class: <code>apache::dev</code></h4>\n\n<p>Installs Apache development libraries</p>\n\n<pre><code>class { &#39;apache::dev&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::listen</code></h4>\n\n<p>Controls which ports Apache binds to for listening based on the title:</p>\n\n<pre><code>apache::listen { &#39;80&#39;: }\napache::listen { &#39;443&#39;: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>Listen</code> directives to the <code>ports.conf</code> file in the Apache httpd configuration directory. <code>apache::listen</code> titles should always take the form of: <code>&lt;port&gt;</code>, <code>&lt;ipv4&gt;:&lt;port&gt;</code>, or <code>[&lt;ipv6&gt;]:&lt;port&gt;</code></p>\n\n<p>Apache httpd requires that <code>Listen</code> directives must be added for every port. The <code>apache::vhost</code> defined type will automatically add <code>Listen</code> directives unless the <code>apache::vhost</code> is passed <code>add_listen =&gt; false</code>.</p>\n\n<h4>Defined Type: <code>apache::namevirtualhost</code></h4>\n\n<p>Enables named-based hosting of a virtual host</p>\n\n<pre><code>class { &#39;apache::namevirtualhost`: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>NameVirtualHost</code> directives to the <code>ports.conf</code> file in the Apache https configuration directory. <code>apache::namevirtualhost</code> titles should always take the form of: <code>*</code>, <code>*:&lt;port&gt;</code>, <code>_default_:&lt;port&gt;</code>, <code>&lt;ip&gt;</code>, or <code>&lt;ip&gt;:&lt;port&gt;</code>.</p>\n\n<h4>Defined Type: <code>apache::balancermember</code></h4>\n\n<p>Define members of a proxy_balancer set (mod_proxy_balancer). Very useful when using exported resources.</p>\n\n<p>On every app server you can export a balancermember like this:</p>\n\n<pre><code> @@apache::balancermember { &quot;${::fqdn}-puppet00&quot;:\n balancer_cluster =&gt; &#39;puppet00&#39;,\n url =&gt; &quot;ajp://${::fqdn}:8009&quot;\n options =&gt; [&#39;ping=5&#39;, &#39;disablereuse=on&#39;, &#39;retry=5&#39;, &#39;ttl=120&#39;],\n }\n</code></pre>\n\n<p>And on the proxy itself you create the balancer cluster using the defined type apache::balancer:</p>\n\n<pre><code> apache::balancer { &#39;puppet00&#39;: }\n</code></pre>\n\n<p>If you need to use ProxySet in the balncer config you can do as so:</p>\n\n<pre><code> apache::balancer { &#39;puppet01&#39;:\n proxy_set =&gt; {&#39;stickysession&#39; =&gt; &#39;JSESSIONID&#39;},\n }\n</code></pre>\n\n<h3>Templates</h3>\n\n<p>The Apache module relies heavily on templates to enable the <code>vhost</code> and <code>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>\n\n<h2>Limitations</h2>\n\n<p>This has been tested on Ubuntu Precise, Debian Wheezy, and CentOS 5.8.</p>\n\n<h2>Development</h2>\n\n<h3>Overview</h3>\n\n<p>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>\n\n<p>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>\n\n<p>You can read the complete module contribution guide <a href=\"http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing\">on the Puppet Labs wiki.</a></p>\n\n<h3>Running tests</h3>\n\n<p>This project contains tests for both <a href=\"http://rspec-puppet.com/\">rspec-puppet</a> and <a href=\"https://github.com/puppetlabs/rspec-system\">rspec-system</a> to verify functionality. For in-depth information please see their respective documentation.</p>\n\n<p>Quickstart:</p>\n\n<pre><code>gem install bundler\nbundle install\nbundle exec rake spec\nbundle exec rake spec:system\n</code></pre>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.</p>\n</section>",
1743
1743
  "changelog": "<section class=\"plaintext\"><pre>2013-07-16 Release 0.8.0\nFeatures:\n- Add `servername` parameter to `apache` class\n- Add `proxy_set` parameter to `apache::balancer` define\n\nBugfixes:\n- Fix ordering for multiple `apache::balancer` clusters\n- Fix symlinking for sites-available on Debian-based OSs\n- Fix dependency ordering for recursive confdir management\n- Fix `apache::mod::*` to notify the service on config change\n- Documentation updates\n\n2013-07-09 Release 0.7.0\nChanges:\n- Essentially rewrite the module -- too many to list\n- `apache::vhost` has many abilities -- see README.md for details\n- `apache::mod::*` classes provide httpd mod-loading capabilities\n- `apache` base class is much more configurable\n\nBugfixes:\n- Many. And many more to come\n\n2013-03-2 Release 0.6.0\n- update travis tests (add more supported versions)\n- add access log_parameter\n- make purging of vhost dir configurable\n\n2012-08-24 Release 0.4.0\nChanges:\n- `include apache` is now required when using apache::mod::*\n\nBugfixes:\n- Fix syntax for validate_re\n- Fix formatting in vhost template\n- Fix spec tests such that they pass\n\n2012-05-08 Puppet Labs &lt;info@puppetlabs.com&gt; - 0.0.4\ne62e362 Fix broken tests for ssl, vhost, vhost::*\n42c6363 Changes to match style guide and pass puppet-lint without error\n42bc8ba changed name =&gt; path for file resources in order to name namevar by it&#x27;s name\n72e13de One end too much\n0739641 style guide fixes: &#x27;true&#x27; &lt;&gt; true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod&#x2F;a2dismo commands optional\n98d774e (#13860) Autorequire Package[&#x27;httpd&#x27;]\n05fcec5 (#13073) Add missing puppet spec tests\n541afda (#6899) Remove virtual a2mod definition\n976cb69 (#13072) Move mod python and wsgi package names to params\n323915a (#13060) Add .gitignore to repo\nfdf40af (#13060) Remove pkg directory from source tree\nfd90015 Add LICENSE file and update the ModuleFile\nd3d0d23 Re-enable local php class\nd7516c7 Make management of firewalls configurable for vhosts\n60f83ba Explicitly lookup scope of apache_name in templates.\nf4d287f (#12581) Add explicit ordering for vdir directory\n88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall\na776a8b (#11071) Fix to work with latest firewall module\n2b79e8b (#11070) Add support for Scientific Linux\n405b3e9 Fix for a2mod\n57b9048 Commit apache::vhost::redirect Manifest\n8862d01 Commit apache::vhost::proxy Manifest\nd5c1fd0 Commit apache::mod::wsgi Manifest\na825ac7 Commit apache::mod::python Manifest\nb77062f Commit Templates\n9a51b4a Vhost File Declarations\n6cf7312 Defaults for Parameters\n6a5b11a Ensure installed\nf672e46 a2mod fix\n8a56ee9 add pthon support to apache\n</pre></section>",
1744
1744
  "license": "<section class=\"plaintext\"><pre>Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n</pre></section>",
1745
1745
  "created_at": "2013-07-17 07:37:53 -0700",
@@ -1989,7 +1989,7 @@
1989
1989
  "file_size": 51129,
1990
1990
  "file_md5": "c8ab994e2dcee7681acda5538ba4ce0b",
1991
1991
  "downloads": 1228,
1992
- "readme": "<section class=\"markdown\"><h1>apache</h1>\n\n<h4>Table of Contents</h4>\n\n<ol>\n<li><a href=\"#overview\">Overview - What is the Apache module?</a></li>\n<li><a href=\"#module-description\">Module Description - What does the module do?</a></li>\n<li><a href=\"#setup\">Setup - The basics of getting started with Apache</a>\n\n<ul>\n<li><a href=\"#beginning-with-apache\">Beginning with Apache - Installation</a></li>\n<li><a href=\"#configure-a-virtual-host\">Configure a Virtual Host - Basic options for getting started</a></li>\n</ul></li>\n<li><a href=\"#usage\">Usage - The classes, defined types, and their parameters available for configuration</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a>\n\n<ul>\n<li><a href=\"#class-apache\">Class: apache</a></li>\n<li><a href=\"#classes-apachemodname\">Classes: apache::mod::*</a></li>\n<li><a href=\"#defined-type-apachevhost\">Defined Type: apache::vhost</a></li>\n</ul></li>\n<li><a href=\"#virtual-host-examples\">Virtual Host Examples - Demonstrations of some configuration options</a></li>\n</ul></li>\n<li><a href=\"#implementation\">Implementation - An under-the-hood peek at what the module is doing</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a></li>\n<li><a href=\"#templates\">Templates</a></li>\n</ul></li>\n<li><a href=\"#limitations\">Limitations - OS compatibility, etc.</a></li>\n<li><a href=\"#development\">Development - Guide for contributing to the module</a></li>\n<li><a href=\"#release-notes\">Release Notes - Notes on the most recent updates to the module</a></li>\n</ol>\n\n<h2>Overview</h2>\n\n<p>The Apache module allows you to set up virtual hosts and manage web services with minimal effort.</p>\n\n<h2>Module Description</h2>\n\n<p>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>\n\n<h2>Setup</h2>\n\n<p><strong>What Apache affects:</strong></p>\n\n<ul>\n<li>configuration files and directories (created and written to)\n\n<ul>\n<li><strong>NOTE</strong>: Configurations that are <em>not</em> managed by Puppet will be purged.</li>\n</ul></li>\n<li>package/service/configuration files for Apache</li>\n<li>Apache modules</li>\n<li>virtual hosts</li>\n<li>listened-to ports</li>\n</ul>\n\n<h3>Beginning with Apache</h3>\n\n<p>To install Apache with the default parameters</p>\n\n<pre><code>class { &#39;apache&#39;: }\n</code></pre>\n\n<p>The defaults are determined by your operating system (e.g. Debian systems have one set of defaults, RedHat systems have another). These defaults will work well in a testing environment, but are not suggested for production. To establish customized parameters</p>\n\n<pre><code>class { &#39;apache&#39;:\n default_mods =&gt; false,\n …\n}\n</code></pre>\n\n<h3>Configure a virtual host</h3>\n\n<p>Declaring the <code>apache</code> class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving <code>$apache::docroot</code>.</p>\n\n<pre><code>class { &#39;apache&#39;: }\n</code></pre>\n\n<p>To configure a very basic, name-based virtual host</p>\n\n<pre><code>apache::vhost { &#39;first.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n}\n</code></pre>\n\n<p><em>Note:</em> The default priority is 15. If nothing matches this priority, the alphabetically first name-based vhost will be used. This is also true if you pass a higher priority and no names match anything else.</p>\n\n<p>A slightly more complicated example, which moves the docroot owner/group</p>\n\n<pre><code>apache::vhost { &#39;second.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n docroot_owner =&gt; &#39;third&#39;,\n docroot_group =&gt; &#39;third&#39;,\n}\n</code></pre>\n\n<p>To set up a virtual host with SSL and default SSL certificates</p>\n\n<pre><code>apache::vhost { &#39;ssl.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/ssl&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<p>To set up a virtual host with SSL and specific SSL certificates</p>\n\n<pre><code>apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n ssl =&gt; true,\n ssl_cert =&gt; &#39;/etc/ssl/fourth.example.com.cert&#39;,\n ssl_key =&gt; &#39;/etc/ssl/fourth.example.com.key&#39;,\n}\n</code></pre>\n\n<p>To set up a virtual host with wildcard alias for subdomain mapped to same named directory \n<code>http://examle.com.loc =&gt; /var/www/example.com</code></p>\n\n<pre><code>apache::vhost { &#39;subdomain.loc&#39;:\n vhost_name =&gt; &#39;*&#39;,\n port =&gt; &#39;80&#39;,\n virtual_docroot&#39; =&gt; &#39;/var/www/%-2+&#39;,\n docroot =&gt; &#39;/var/www&#39;,\n serveraliases =&gt; [&#39;*.loc&#39;,],\n}\n</code></pre>\n\n<p>To see a list of all virtual host parameters, <a href=\"#defined-type-apachevhost\">please go here</a>. To see an extensive list of virtual host examples <a href=\"#virtual-host-examples\">please look here</a>.</p>\n\n<h2>Usage</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<p>This module modifies Apache configuration files and directories and will purge any configuration not managed by Puppet. Configuration of Apache should be managed by Puppet, as non-puppet configuration files can cause unexpected failures.</p>\n\n<p>It is possible to temporarily disable full Puppet management by setting the <code>purge_configs</code> parameter within the base <code>apache</code> class to &#39;false&#39;. This option should only be used as a temporary means of saving and relocating customized configurations.</p>\n\n<h4>Class: <code>apache</code></h4>\n\n<p>The Apache module&#39;s primary class, <code>apache</code>, guides the basic setup of Apache on your system.</p>\n\n<p>You may establish a default vhost in this class, the <code>vhost</code> class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the <code>vhost</code> type.</p>\n\n<p><strong>Parameters within <code>apache</code>:</strong></p>\n\n<h5><code>default_mods</code></h5>\n\n<p>Sets up Apache with default settings based on your OS. Defaults to &#39;true&#39;, set to &#39;false&#39; for customized configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets up a default virtual host. Defaults to &#39;true&#39;, set to &#39;false&#39; to set up <a href=\"#configure-a-virtual-host\">customized virtual hosts</a>.</p>\n\n<h5><code>default_ssl_vhost</code></h5>\n\n<p>Sets up a default SSL virtual host. Defaults to &#39;false&#39;.</p>\n\n<pre><code>apache::vhost { &#39;default-ssl&#39;:\n port =&gt; 443,\n ssl =&gt; true,\n docroot =&gt; $docroot,\n scriptalias =&gt; $scriptalias,\n serveradmin =&gt; $serveradmin,\n access_log_file =&gt; &quot;ssl_${access_log_file}&quot;,\n }\n</code></pre>\n\n<p>SSL vhosts only respond to HTTPS queries.</p>\n\n<h5><code>default_ssl_cert</code></h5>\n\n<p>The default SSL certification, which is automatically set based on your operating system (<code>/etc/pki/tls/certs/localhost.crt</code> for RedHat, <code>/etc/ssl/certs/ssl-cert-snakeoil.pem</code> for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_key</code></h5>\n\n<p>The default SSL key, which is automatically set based on your operating system (<code>/etc/pki/tls/private/localhost.key</code> for RedHat, <code>/etc/ssl/private/ssl-cert-snakeoil.key</code> for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_chain</code></h5>\n\n<p>The default SSL chain, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_ca</code></h5>\n\n<p>The default certificate authority, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl_path</code></h5>\n\n<p>The default certificate revocation list path, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl</code></h5>\n\n<p>The default certificate revocation list to use, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>service_enable</code></h5>\n\n<p>Determines whether the &#39;httpd&#39; service is enabled when the machine is booted, meaning Puppet will check the service status to start/stop it. Defaults to &#39;true&#39;, meaning the service is enabled/running.</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Sets the server administrator. Defaults to &#39;root@localhost&#39;.</p>\n\n<h5><code>sendfile</code></h5>\n\n<p>Makes Apache use the Linux kernel &#39;sendfile&#39; to serve static files. Defaults to &#39;false&#39;.</p>\n\n<h5><code>error_documents</code></h5>\n\n<p>Enables custom error documents. Defaults to &#39;false&#39;.</p>\n\n<h5><code>confd_dir</code></h5>\n\n<p>Changes the location of the configuration directory your custom configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>vhost_dir</code></h5>\n\n<p>Changes the location of the configuration directory your virtual host configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mod_dir</code></h5>\n\n<p>Changes the location of the configuration directory your Apache modules configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mpm_module</code></h5>\n\n<p>Configures which mpm module is loaded and configured for the httpd process by the <code>apache::mod::prefork</code> and <code>apache::mod::worker</code> classes. Must be set to <code>false</code> to explicitly declare <code>apache::mod::worker</code> or <code>apache::mod::prefork</code> classes with parameters. Valid values are <code>worker</code>, <code>prefork</code>, or the boolean <code>false</code>. Defaults to <code>prefork</code> on RedHat and <code>worker</code> on Debian.</p>\n\n<h5><code>conf_template</code></h5>\n\n<p>Setting this allows you to override the template used for the main apache configuration file. This is a potentially risky thing to do as this module has been built around the concept of a minimal configuration file with most of the configuration coming in the form of conf.d/ entries. Defaults to &#39;apache/httpd.conf.erb&#39;.</p>\n\n<h4>Class: <code>apache::default_mods</code></h4>\n\n<p>Installs default Apache modules based on what OS you are running</p>\n\n<pre><code>class { &#39;apache::default_mods&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::mod</code></h4>\n\n<p>Used to enable arbitrary Apache httpd modules for which there is no specific <code>apache::mod::[name]</code> class. The <code>apache::mod</code> defined type will also install the required packages to enable the module, if any.</p>\n\n<pre><code>apache::mod { &#39;rewrite&#39;: }\napache::mod { &#39;ldap&#39;: }\n</code></pre>\n\n<h4>Classes: <code>apache::mod::[name]</code></h4>\n\n<p>There are many <code>apache::mod::[name]</code> classes within this module that can be declared using <code>include</code>:</p>\n\n<ul>\n<li><code>alias</code></li>\n<li><code>auth_basic</code></li>\n<li><code>auth_kerb</code></li>\n<li><code>autoindex</code></li>\n<li><code>cache</code></li>\n<li><code>cgi</code></li>\n<li><code>cgid</code></li>\n<li><code>dav</code></li>\n<li><code>dav_fs</code></li>\n<li><code>deflate</code></li>\n<li><code>dir</code>*</li>\n<li><code>disk_cache</code></li>\n<li><code>fcgid</code></li>\n<li><code>info</code></li>\n<li><code>ldap</code></li>\n<li><code>mime</code></li>\n<li><code>mime_magic</code></li>\n<li><code>mpm_event</code></li>\n<li><code>negotiation</code></li>\n<li><code>passenger</code>*</li>\n<li><code>perl</code></li>\n<li><code>php</code> (requires <a href=\"#mpm_module\"><code>mpm_module</code></a> set to <code>prefork</code>)</li>\n<li><code>prefork</code>*</li>\n<li><code>proxy</code>*</li>\n<li><code>proxy_html</code></li>\n<li><code>proxy_http</code></li>\n<li><code>python</code></li>\n<li><code>reqtimeout</code></li>\n<li><code>setenvif</code></li>\n<li><code>ssl</code>* (see <a href=\"#class-apachemodssl\">apache::mod::ssl</a> below)</li>\n<li><code>status</code></li>\n<li><code>userdir</code>*</li>\n<li><code>worker</code>*</li>\n<li><code>wsgi</code></li>\n<li><code>xsendfile</code></li>\n</ul>\n\n<p>Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module&#39;s configuration. Most of the time, these parameters will not require any configuration or attention.</p>\n\n<p>The modules mentioned above, and other Apache modules that have templates, will cause template files to be dropped along with the mod install, and the module will not work without the template. Any mod without a template will install package but drop no files.</p>\n\n<h4>Class: <code>apache::mod::ssl</code></h4>\n\n<p>Installs Apache SSL capabilities and utilizes <code>ssl.conf.erb</code> template</p>\n\n<pre><code>class { &#39;apache::mod::ssl&#39;: }\n</code></pre>\n\n<p>To <em>use</em> SSL with a virtual host, you must either set the<code>default_ssl_vhost</code> parameter in <code>apache</code> to &#39;true&#39; or set the <code>ssl</code> parameter in <code>apache::vhost</code> to &#39;true&#39;.</p>\n\n<h4>Defined Type: <code>apache::vhost</code></h4>\n\n<p>The Apache module allows a lot of flexibility in the set up and configuration of virtual hosts. This flexibility is due, in part, to <code>vhost</code>&#39;s setup as a defined resource type, which allows it to be evaluated multiple times with different parameters.</p>\n\n<p>The <code>vhost</code> defined type allows you to have specialized configurations for virtual hosts that have requirements outside of the defaults. You can set up a default vhost within the base <code>apache</code> class as well as set a customized vhost setup as default. Your customized vhost (priority 10) will be privileged over the base class vhost (15).</p>\n\n<p>If you have a series of specific configurations and do not want a base <code>apache</code> class default vhost, make sure to set the base class default host to &#39;false&#39;.</p>\n\n<pre><code>class { &#39;apache&#39;:\n default_vhost =&gt; false,\n}\n</code></pre>\n\n<p><strong>Parameters within <code>apache::vhost</code>:</strong></p>\n\n<p>The default values for each parameter will vary based on operating system and type of virtual host.</p>\n\n<h5><code>access_log</code></h5>\n\n<p>Specifies whether <code>*_access.log</code> directives should be configured. Valid values are &#39;true&#39; and &#39;false&#39;. Defaults to &#39;true&#39;.</p>\n\n<h5><code>access_log_file</code></h5>\n\n<p>Points to the <code>*_access.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_pipe</code></h5>\n\n<p>Specifies a pipe to send access log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_format</code></h5>\n\n<p>Specifies either a LogFormat nickname or custom format string for access log. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>add_listen</code></h5>\n\n<p>Determines whether the vhost creates a listen statement. The default value is &#39;true&#39;.</p>\n\n<p>Setting <code>add_listen</code> to &#39;false&#39; stops the vhost from creating a listen statement, and this is important when you combine vhosts that are not passed an <code>ip</code> parameter with vhosts that <em>are</em> passed the <code>ip</code> parameter.</p>\n\n<h5><code>aliases</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>Alias</code> statements as per the <a href=\"http://httpd.apache.org/docs/current/mod/mod_alias.html\"><code>mod_alias</code> documentation</a>. Each hash is expected to be of the form:</p>\n\n<pre lang=\"ruby\"><code>aliases =&gt; [ { alias =&gt; &#39;/alias&#39;, path =&gt; &#39;/path/to/directory&#39; } ],\n</code></pre>\n\n<p>For <code>Alias</code> to work, each will need a corresponding <code>&lt;Directory /path/to/directory&gt;</code> or <code>&lt;Location /path/to/directory&gt;</code> block.</p>\n\n<p><strong>Note:</strong> If <code>apache::mod::passenger</code> is loaded and <code>PassengerHighPerformance true</code> is set, then <code>Alias</code> may have issues honouring the <code>PassengerEnabled off</code> statement. See <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">this article</a> for details.</p>\n\n<h5><code>block</code></h5>\n\n<p>Specifies the list of things Apache will block access to. The default is an empty set, &#39;[]&#39;. Currently, the only option is &#39;scm&#39;, which blocks web access to .svn, .git and .bzr directories. To add to this, please see the <a href=\"#development\">Development</a> section.</p>\n\n<h5><code>custom_fragment</code></h5>\n\n<p>Pass a string of custom configuration directives to be placed at the end of the vhost configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets a given <code>apache::vhost</code> as the default to serve requests that do not match any other <code>apache::vhost</code> definitions. The default value is &#39;false&#39;.</p>\n\n<h5><code>directories</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>&lt;Directory /path/to/directory&gt;...&lt;/Directory&gt;</code> directive blocks as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#directory\">Apache core documentation</a>. Each hash should be of the form of:</p>\n\n<pre lang=\"ruby\"><code>directory =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; } ],\n</code></pre>\n\n<p><em>Note:</em> At least one directory should match <code>docroot</code> parameter, once you start declaring directories <code>apache::vhost</code> assumes that all required <code>&lt;Directory&gt;</code> blocks will be declared.</p>\n\n<p><em>Note:</em> If not defined a single default <code>&lt;Directory&gt;</code> block will be created that matches the <code>docroot</code> parameter.</p>\n\n<p>The directives will be embedded within the <code>Directory</code> directive block, missing directives should be undefined and not be added, resulting in their default vaules in Apache. Currently this is the list of supported directives:</p>\n\n<h6><code>addhandlers</code></h6>\n\n<p>Sets <code>AddHandler</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addhandler\">Apache Core documentation</a>. Accepts a list of hashes of the form <code>{ handler =&gt; &#39;handler-name&#39;, extensions =&gt; [&#39;extension&#39;]}</code>. Note that <code>extensions</code> is a list of extenstions being handled by the handler.\nAn example: </p>\n\n<pre lang=\"ruby\"><code>directory =&gt; [ { path =&gt; &#39;/path/to/directory&#39;,\n addhandlers =&gt; [ { handler =&gt; &#39;cgi-script&#39;, extensions =&gt; [&#39;.cgi&#39;]} ]\n} ]\n</code></pre>\n\n<h6><code>allow</code></h6>\n\n<p>Sets an <code>Allow</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow\">Apache Core documentation</a>. An example:</p>\n\n<pre lang=\"ruby\"><code>directory =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow =&gt; &#39;from example.org&#39; } ],\n</code></pre>\n\n<h6><code>allow_override</code></h6>\n\n<p>Sets the usage of <code>.htaccess</code> files as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride\">Apache core documentation</a>. Should accept in the form of a list or a string. An example:</p>\n\n<pre lang=\"ruby\"><code>directory =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow_override =&gt; [&#39;AuthConfig&#39;, &#39;Indexes&#39;] } ],\n</code></pre>\n\n<h6><code>deny</code></h6>\n\n<p>Sets an <code>Deny</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#deny\">Apache Core documentation</a>. An example:</p>\n\n<pre lang=\"ruby\"><code>directory =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, deny =&gt; &#39;from example.org&#39; } ],\n</code></pre>\n\n<h6><code>options</code></h6>\n\n<p>Lists the options for the given <code>&lt;Directory&gt;</code> block</p>\n\n<pre lang=\"ruby\"><code> directory =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;] }]\n</code></pre>\n\n<h6><code>order</code></h6>\n\n<p>Sets the order of processing <code>Allow</code> and <code>Deny</code> statements as per <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order\">Apache core documentation</a>. An example:</p>\n\n<pre lang=\"ruby\"><code>directory =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, order =&gt; &#39;Allow, Deny&#39; } ],\n</code></pre>\n\n<h6><code>passenger_enabled</code></h6>\n\n<p>Sets the value for the <code>PassengerEnabled</code> directory to <code>on</code> or <code>off</code> as per the <a href=\"http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerEnabled\">Passenger documentation</a>.</p>\n\n<pre lang=\"ruby\"><code>directory =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, passenger_enabled =&gt; &#39;off&#39; } ],\n</code></pre>\n\n<p><strong>Note:</strong> This directive requires <code>apache::mod::passenger</code> to be active, Apache may not start with an unrecognised directive without it.</p>\n\n<p><strong>Note:</strong> Be aware that there is an <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">issue</a> using the <code>PassengerEnabled</code> directive with the <code>PassengerHighPerformance</code> directive.</p>\n\n<h5><code>docroot</code></h5>\n\n<p>Provides the DocumentRoot directive, identifying the directory Apache serves files from.</p>\n\n<h5><code>docroot_group</code></h5>\n\n<p>Sets group access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>docroot_owner</code></h5>\n\n<p>Sets individual user access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>error_log</code></h5>\n\n<p>Specifies whether <code>*_error.log</code> directives should be configured. Defaults to &#39;true&#39;.</p>\n\n<h5><code>error_log_file</code></h5>\n\n<p>Points to the <code>*_error.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_log_pipe</code></h5>\n\n<p>Specifies a pipe to send error log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ensure</code></h5>\n\n<p>Specifies if the vhost file is present or absent.</p>\n\n<h5><code>ip</code></h5>\n\n<p>The IP address the vhost listens on. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ip_based</code></h5>\n\n<p>Enables an IP-based vhost. This parameter inhibits the creation of a NameVirtualHost directive, since those are used to funnel requests to name-based vhosts. Defaults to &#39;false&#39;.</p>\n\n<h5><code>logroot</code></h5>\n\n<p>Specifies the location of the virtual host&#39;s logfiles. Defaults to <code>/var/log/&lt;apache log location&gt;/</code>.</p>\n\n<h5><code>no_proxy_uris</code></h5>\n\n<p>Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with <code>proxy_dest</code>.</p>\n\n<h5><code>options</code></h5>\n\n<p>Lists the options for the given virtual host</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;],\n}\n</code></pre>\n\n<h5><code>override</code></h5>\n\n<p>Sets the overrides for the given virtual host. Accepts an array of AllowOverride arguments.</p>\n\n<h5><code>port</code></h5>\n\n<p>Sets the port the host is configured on.</p>\n\n<h5><code>priority</code></h5>\n\n<p>Sets the relative load-order for Apache httpd VirtualHost configuration files. Defaults to &#39;25&#39;.</p>\n\n<p>If nothing matches the priority, the first name-based vhost will be used. Likewise, passing a higher priority will cause the alphabetically first name-based vhost to be used if no other names match.</p>\n\n<p><em>Note</em>: You should not need to use this parameter. However, if you do use it, be aware that the <code>default_vhost</code> parameter for <code>apache::vhost</code> passes a priority of &#39;15&#39;.</p>\n\n<h5><code>proxy_dest</code></h5>\n\n<p>Specifies the destination address of a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>proxy_pass</code></h5>\n\n<p>Specifies an array of path =&gt; uri for a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<p>Example:\n$proxy_pass = [\n { &#39;path&#39; =&gt; &#39;/a&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/&#39; },\n { &#39;path&#39; =&gt; &#39;/b&#39;, &#39;url&#39; =&gt; &#39;http://backend-b/&#39; },\n { &#39;path&#39; =&gt; &#39;/c&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/c&#39; },\n]</p>\n\n<p>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n proxy_pass =&gt; $proxy_pass,\n}</p>\n\n<h5><code>rack_base_uris</code></h5>\n\n<p>Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for passenger/rack in the <code>_rack.erb</code> template. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_dest</code></h5>\n\n<p>Specifies the address to redirect to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_source</code></h5>\n\n<p>Specifies the source items? that will redirect to the destination specified in <code>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>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_source =&gt; [&#39;/images&#39;,&#39;/downloads&#39;],\n redirect_dest =&gt; [&#39;http://img.example.com/&#39;,&#39;http://downloads.example.com/&#39;],\n}\n</code></pre>\n\n<h5><code>redirect_status</code></h5>\n\n<p>Specifies the status to append to the redirect. Defaults to &#39;undef&#39;.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_status =&gt; [&#39;temp&#39;,&#39;permanent&#39;],\n}\n</code></pre>\n\n<h5><code>request_headers</code></h5>\n\n<p>Specifies additional request headers.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n request_headers =&gt; [\n &#39;append MirrorID &quot;mirror 12&quot;&#39;,\n &#39;unset MirrorID&#39;,\n ],\n}\n</code></pre>\n\n<h5><code>rewrite_base</code></h5>\n\n<p>Limits the <code>rewrite_rule</code> to the specified base URL. Defaults to &#39;undef&#39;.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n rewrite_base =&gt; &#39;/blog/&#39;,\n}\n</code></pre>\n\n<p>The above example would limit the index.html -&gt; welcome.html rewrite to only something inside of <a href=\"http://example.com/blog/\">http://example.com/blog/</a>.</p>\n\n<h5><code>rewrite_cond</code></h5>\n\n<p>Rewrites a URL via <code>rewrite_rule</code> based on the truth of specified conditions. For example</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_cond =&gt; &#39;%{HTTP_USER_AGENT} ^MSIE&#39;,\n}\n</code></pre>\n\n<p>will rewrite URLs only if the visitor is using IE. Defaults to &#39;undef&#39;.</p>\n\n<p><em>Note</em>: At the moment, each vhost is limited to a single list of rewrite conditions. In the future, you will be able to specify multiple <code>rewrite_cond</code> and <code>rewrite_rules</code> per vhost, so that different conditions get different rewrites.</p>\n\n<h5><code>rewrite_rule</code></h5>\n\n<p>Creates URL rewrite rules. Defaults to &#39;undef&#39;. This parameter allows you to specify, for example, that anyone trying to access index.html will be served welcome.html.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n}\n</code></pre>\n\n<h5><code>scriptalias</code></h5>\n\n<p>Defines a directory of CGI scripts to be aliased to the path &#39;/cgi-bin&#39;</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Specifies the email address Apache will display when it renders one of its error pages.</p>\n\n<h5><code>serveraliases</code></h5>\n\n<p>Sets the server aliases of the site.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the primary name of the virtual host.</p>\n\n<h5><code>setenv</code></h5>\n\n<p>Used by HTTPD to set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>setenvif</code></h5>\n\n<p>Used by HTTPD to conditionally set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>ssl</code></h5>\n\n<p>Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are &#39;true&#39; or &#39;false&#39;.</p>\n\n<h5><code>ssl_ca</code></h5>\n\n<p>Specifies the certificate authority.</p>\n\n<h5><code>ssl_cert</code></h5>\n\n<p>Specifies the SSL certification.</p>\n\n<h5><code>ssl_certs_dir</code></h5>\n\n<p>Specifies the location of the SSL certification directory. Defaults to <code>/etc/ssl/certs</code>.</p>\n\n<h5><code>ssl_chain</code></h5>\n\n<p>Specifies the SSL chain.</p>\n\n<h5><code>ssl_crl</code></h5>\n\n<p>Specifies the certificate revocation list to use.</p>\n\n<h5><code>ssl_crl_path</code></h5>\n\n<p>Specifies the location of the certificate revocation list.</p>\n\n<h5><code>ssl_key</code></h5>\n\n<p>Specifies the SSL key.</p>\n\n<h5><code>vhost_name</code></h5>\n\n<p>This parameter is for use with name-based virtual hosting. Defaults to &#39;*&#39;.</p>\n\n<h3>Virtual Host Examples</h3>\n\n<p>The Apache module allows you to set up pretty much any configuration of virtual host you might desire. This section will address some common configurations. Please see the <a href=\"https://github.com/puppetlabs/puppetlabs-apache/tree/master/tests\">Tests section</a> for even more examples.</p>\n\n<p>Configure a vhost with a server administrator</p>\n\n<pre><code>apache::vhost { &#39;third.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n serveradmin =&gt; &#39;admin@example.com&#39;,\n}\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with aliased servers</p>\n\n<pre><code>apache::vhost { &#39;sixth.example.com&#39;:\n serveraliases =&gt; [\n &#39;sixth.example.org&#39;,\n &#39;sixth.example.net&#39;,\n ],\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n}\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost with a cgi-bin</p>\n\n<pre><code>apache::vhost { &#39;eleventh.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/eleventh&#39;,\n scriptalias =&gt; &#39;/usr/lib/cgi-bin&#39;,\n}\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with a rack configuration</p>\n\n<pre><code>apache::vhost { &#39;fifteenth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifteenth&#39;,\n rack_base_uris =&gt; [&#39;/rackapp1&#39;, &#39;/rackapp2&#39;],\n}\n</code></pre>\n\n<hr>\n\n<p>Set up a mix of SSL and non-SSL vhosts at the same domain</p>\n\n<pre><code>#The non-ssl vhost\napache::vhost { &#39;first.example.com non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n}\n\n#The SSL vhost at the same domain\napache::vhost { &#39;first.example.com ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost to redirect non-SSL connections to SSL</p>\n\n<pre><code>apache::vhost { &#39;sixteenth.example.com non-ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n redirect_status =&gt; &#39;permanent&#39;\n redirect_dest =&gt; &#39;https://sixteenth.example.com/&#39; \n}\napache::vhost { &#39;sixteenth.example.com ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<hr>\n\n<p>Set up IP-based vhosts on any listen port and have them respond to requests on specific IP addresses. In this example, we will set listening on ports 80 and 81. This is required because the example vhosts are not declared with a port parameter.</p>\n\n<pre><code>apache::listen { &#39;80&#39;: }\napache::listen { &#39;81&#39;: }\n</code></pre>\n\n<p>Then we will set up the IP-based vhosts</p>\n\n<pre><code>apache::vhost { &#39;first.example.com&#39;:\n ip =&gt; &#39;10.0.0.10&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ip_based =&gt; true,\n}\napache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.11&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n ip_based =&gt; true,\n}\n</code></pre>\n\n<hr>\n\n<p>Configure a mix of name-based and IP-based vhosts. First, we will add two IP-based vhosts on 10.0.0.10, one SSL and one non-SSL</p>\n\n<pre><code>apache::vhost { &#39;The first IP-based vhost, non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;80&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first&#39;,\n}\napache::vhost { &#39;The first IP-based vhost, ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;443&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first-ssl&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<p>Then, we will add two name-based vhosts listening on 10.0.0.20</p>\n\n<pre><code>apache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n}\napache::vhost { &#39;third.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n}\n</code></pre>\n\n<p>If you want to add two name-based vhosts so that they will answer on either 10.0.0.10 or 10.0.0.20, you <strong>MUST</strong> declare <code>add_listen =&gt; &#39;false&#39;</code> to disable the otherwise automatic &#39;Listen 80&#39;, as it will conflict with the preceding IP-based vhosts.</p>\n\n<pre><code>apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n add_listen =&gt; false,\n}\napache::vhost { &#39;fifth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n add_listen =&gt; false,\n}\n</code></pre>\n\n<h2>Implementation</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<h4>Class: <code>apache::dev</code></h4>\n\n<p>Installs Apache development libraries</p>\n\n<pre><code>class { &#39;apache::dev&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::listen</code></h4>\n\n<p>Controls which ports Apache binds to for listening based on the title:</p>\n\n<pre><code>apache::listen { &#39;80&#39;: }\napache::listen { &#39;443&#39;: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>Listen</code> directives to the <code>ports.conf</code> file in the Apache httpd configuration directory. <code>apache::listen</code> titles should always take the form of: <code>&lt;port&gt;</code>, <code>&lt;ipv4&gt;:&lt;port&gt;</code>, or <code>[&lt;ipv6&gt;]:&lt;port&gt;</code></p>\n\n<p>Apache httpd requires that <code>Listen</code> directives must be added for every port. The <code>apache::vhost</code> defined type will automatically add <code>Listen</code> directives unless the <code>apache::vhost</code> is passed <code>add_listen =&gt; false</code>.</p>\n\n<h4>Defined Type: <code>apache::namevirtualhost</code></h4>\n\n<p>Enables named-based hosting of a virtual host</p>\n\n<pre><code>class { &#39;apache::namevirtualhost`: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>NameVirtualHost</code> directives to the <code>ports.conf</code> file in the Apache https configuration directory. <code>apache::namevirtualhost</code> titles should always take the form of: <code>*</code>, <code>*:&lt;port&gt;</code>, <code>_default_:&lt;port&gt;</code>, <code>&lt;ip&gt;</code>, or <code>&lt;ip&gt;:&lt;port&gt;</code>.</p>\n\n<h4>Defined Type: <code>apache::balancermember</code></h4>\n\n<p>Define members of a proxy_balancer set (mod_proxy_balancer). Very useful when using exported resources.</p>\n\n<p>On every app server you can export a balancermember like this:</p>\n\n<pre><code> @@apache::balancermember { &quot;${::fqdn}-puppet00&quot;:\n balancer_cluster =&gt; &#39;puppet00&#39;,\n url =&gt; &quot;ajp://${::fqdn}:8009&quot;\n options =&gt; [&#39;ping=5&#39;, &#39;disablereuse=on&#39;, &#39;retry=5&#39;, &#39;ttl=120&#39;],\n }\n</code></pre>\n\n<p>And on the proxy itself you create the balancer cluster using the defined type apache::balancer:</p>\n\n<pre><code> apache::balancer { &#39;puppet00&#39;: }\n</code></pre>\n\n<h3>Templates</h3>\n\n<p>The Apache module relies heavily on templates to enable the <code>vhost</code> and <code>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>\n\n<h2>Limitations</h2>\n\n<p>This has been tested on Ubuntu Precise, Debian Wheezy, and CentOS 5.8.</p>\n\n<h2>Development</h2>\n\n<h3>Overview</h3>\n\n<p>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>\n\n<p>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>\n\n<p>You can read the complete module contribution guide <a href=\"http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing\">on the Puppet Labs wiki.</a></p>\n\n<h3>Running tests</h3>\n\n<p>This project contains tests for both <a href=\"http://rspec-puppet.com/\">rspec-puppet</a> and <a href=\"https://github.com/puppetlabs/rspec-system\">rspec-system</a> to verify functionality. For in-depth information please see their respective documentation.</p>\n\n<p>Quickstart:</p>\n\n<pre><code>gem install bundler\nbundle install\nbundle exec rake spec\nbundle exec rake spec:system\n</code></pre>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.</p>\n</section>",
1992
+ "readme": "<section class=\"markdown\"><h1>apache</h1>\n\n<h4>Table of Contents</h4>\n\n<ol>\n<li><a href=\"#overview\">Overview - What is the Apache module?</a></li>\n<li><a href=\"#module-description\">Module Description - What does the module do?</a></li>\n<li><a href=\"#setup\">Setup - The basics of getting started with Apache</a>\n\n<ul>\n<li><a href=\"#beginning-with-apache\">Beginning with Apache - Installation</a></li>\n<li><a href=\"#configure-a-virtual-host\">Configure a Virtual Host - Basic options for getting started</a></li>\n</ul></li>\n<li><a href=\"#usage\">Usage - The classes, defined types, and their parameters available for configuration</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a>\n\n<ul>\n<li><a href=\"#class-apache\">Class: apache</a></li>\n<li><a href=\"#classes-apachemodname\">Classes: apache::mod::*</a></li>\n<li><a href=\"#defined-type-apachevhost\">Defined Type: apache::vhost</a></li>\n</ul></li>\n<li><a href=\"#virtual-host-examples\">Virtual Host Examples - Demonstrations of some configuration options</a></li>\n</ul></li>\n<li><a href=\"#implementation\">Implementation - An under-the-hood peek at what the module is doing</a>\n\n<ul>\n<li><a href=\"#classes-and-defined-types\">Classes and Defined Types</a></li>\n<li><a href=\"#templates\">Templates</a></li>\n</ul></li>\n<li><a href=\"#limitations\">Limitations - OS compatibility, etc.</a></li>\n<li><a href=\"#development\">Development - Guide for contributing to the module</a></li>\n<li><a href=\"#release-notes\">Release Notes - Notes on the most recent updates to the module</a></li>\n</ol>\n\n<h2>Overview</h2>\n\n<p>The Apache module allows you to set up virtual hosts and manage web services with minimal effort.</p>\n\n<h2>Module Description</h2>\n\n<p>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>\n\n<h2>Setup</h2>\n\n<p><strong>What Apache affects:</strong></p>\n\n<ul>\n<li>configuration files and directories (created and written to)\n\n<ul>\n<li><strong>NOTE</strong>: Configurations that are <em>not</em> managed by Puppet will be purged.</li>\n</ul></li>\n<li>package/service/configuration files for Apache</li>\n<li>Apache modules</li>\n<li>virtual hosts</li>\n<li>listened-to ports</li>\n</ul>\n\n<h3>Beginning with Apache</h3>\n\n<p>To install Apache with the default parameters</p>\n\n<pre><code>class { &#39;apache&#39;: }\n</code></pre>\n\n<p>The defaults are determined by your operating system (e.g. Debian systems have one set of defaults, RedHat systems have another). These defaults will work well in a testing environment, but are not suggested for production. To establish customized parameters</p>\n\n<pre><code>class { &#39;apache&#39;:\n default_mods =&gt; false,\n …\n}\n</code></pre>\n\n<h3>Configure a virtual host</h3>\n\n<p>Declaring the <code>apache</code> class will create a default virtual host by setting up a vhost on port 80, listening on all interfaces and serving <code>$apache::docroot</code>.</p>\n\n<pre><code>class { &#39;apache&#39;: }\n</code></pre>\n\n<p>To configure a very basic, name-based virtual host</p>\n\n<pre><code>apache::vhost { &#39;first.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n}\n</code></pre>\n\n<p><em>Note:</em> The default priority is 15. If nothing matches this priority, the alphabetically first name-based vhost will be used. This is also true if you pass a higher priority and no names match anything else.</p>\n\n<p>A slightly more complicated example, which moves the docroot owner/group</p>\n\n<pre><code>apache::vhost { &#39;second.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n docroot_owner =&gt; &#39;third&#39;,\n docroot_group =&gt; &#39;third&#39;,\n}\n</code></pre>\n\n<p>To set up a virtual host with SSL and default SSL certificates</p>\n\n<pre><code>apache::vhost { &#39;ssl.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/ssl&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<p>To set up a virtual host with SSL and specific SSL certificates</p>\n\n<pre><code>apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n ssl =&gt; true,\n ssl_cert =&gt; &#39;/etc/ssl/fourth.example.com.cert&#39;,\n ssl_key =&gt; &#39;/etc/ssl/fourth.example.com.key&#39;,\n}\n</code></pre>\n\n<p>To set up a virtual host with wildcard alias for subdomain mapped to same named directory \n<code>http://examle.com.loc =&gt; /var/www/example.com</code></p>\n\n<pre><code>apache::vhost { &#39;subdomain.loc&#39;:\n vhost_name =&gt; &#39;*&#39;,\n port =&gt; &#39;80&#39;,\n virtual_docroot&#39; =&gt; &#39;/var/www/%-2+&#39;,\n docroot =&gt; &#39;/var/www&#39;,\n serveraliases =&gt; [&#39;*.loc&#39;,],\n}\n</code></pre>\n\n<p>To see a list of all virtual host parameters, <a href=\"#defined-type-apachevhost\">please go here</a>. To see an extensive list of virtual host examples <a href=\"#virtual-host-examples\">please look here</a>.</p>\n\n<h2>Usage</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<p>This module modifies Apache configuration files and directories and will purge any configuration not managed by Puppet. Configuration of Apache should be managed by Puppet, as non-puppet configuration files can cause unexpected failures.</p>\n\n<p>It is possible to temporarily disable full Puppet management by setting the <code>purge_configs</code> parameter within the base <code>apache</code> class to &#39;false&#39;. This option should only be used as a temporary means of saving and relocating customized configurations.</p>\n\n<h4>Class: <code>apache</code></h4>\n\n<p>The Apache module&#39;s primary class, <code>apache</code>, guides the basic setup of Apache on your system.</p>\n\n<p>You may establish a default vhost in this class, the <code>vhost</code> class, or both. You may add additional vhost configurations for specific virtual hosts using a declaration of the <code>vhost</code> type.</p>\n\n<p><strong>Parameters within <code>apache</code>:</strong></p>\n\n<h5><code>default_mods</code></h5>\n\n<p>Sets up Apache with default settings based on your OS. Defaults to &#39;true&#39;, set to &#39;false&#39; for customized configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets up a default virtual host. Defaults to &#39;true&#39;, set to &#39;false&#39; to set up <a href=\"#configure-a-virtual-host\">customized virtual hosts</a>.</p>\n\n<h5><code>default_ssl_vhost</code></h5>\n\n<p>Sets up a default SSL virtual host. Defaults to &#39;false&#39;.</p>\n\n<pre><code>apache::vhost { &#39;default-ssl&#39;:\n port =&gt; 443,\n ssl =&gt; true,\n docroot =&gt; $docroot,\n scriptalias =&gt; $scriptalias,\n serveradmin =&gt; $serveradmin,\n access_log_file =&gt; &quot;ssl_${access_log_file}&quot;,\n }\n</code></pre>\n\n<p>SSL vhosts only respond to HTTPS queries.</p>\n\n<h5><code>default_ssl_cert</code></h5>\n\n<p>The default SSL certification, which is automatically set based on your operating system (<code>/etc/pki/tls/certs/localhost.crt</code> for RedHat, <code>/etc/ssl/certs/ssl-cert-snakeoil.pem</code> for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_key</code></h5>\n\n<p>The default SSL key, which is automatically set based on your operating system (<code>/etc/pki/tls/private/localhost.key</code> for RedHat, <code>/etc/ssl/private/ssl-cert-snakeoil.key</code> for Debian). This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_chain</code></h5>\n\n<p>The default SSL chain, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_ca</code></h5>\n\n<p>The default certificate authority, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl_path</code></h5>\n\n<p>The default certificate revocation list path, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>default_ssl_crl</code></h5>\n\n<p>The default certificate revocation list to use, which is automatically set to &#39;undef&#39;. This default will work out of the box but must be updated with your specific certificate information before being used in production.</p>\n\n<h5><code>service_enable</code></h5>\n\n<p>Determines whether the &#39;httpd&#39; service is enabled when the machine is booted, meaning Puppet will check the service status to start/stop it. Defaults to &#39;true&#39;, meaning the service is enabled/running.</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Sets the server administrator. Defaults to &#39;root@localhost&#39;.</p>\n\n<h5><code>sendfile</code></h5>\n\n<p>Makes Apache use the Linux kernel &#39;sendfile&#39; to serve static files. Defaults to &#39;false&#39;.</p>\n\n<h5><code>error_documents</code></h5>\n\n<p>Enables custom error documents. Defaults to &#39;false&#39;.</p>\n\n<h5><code>confd_dir</code></h5>\n\n<p>Changes the location of the configuration directory your custom configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>vhost_dir</code></h5>\n\n<p>Changes the location of the configuration directory your virtual host configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mod_dir</code></h5>\n\n<p>Changes the location of the configuration directory your Apache modules configuration files are placed in. Default is based on your OS.</p>\n\n<h5><code>mpm_module</code></h5>\n\n<p>Configures which mpm module is loaded and configured for the httpd process by the <code>apache::mod::prefork</code> and <code>apache::mod::worker</code> classes. Must be set to <code>false</code> to explicitly declare <code>apache::mod::worker</code> or <code>apache::mod::prefork</code> classes with parameters. Valid values are <code>worker</code>, <code>prefork</code>, or the boolean <code>false</code>. Defaults to <code>prefork</code> on RedHat and <code>worker</code> on Debian.</p>\n\n<h5><code>conf_template</code></h5>\n\n<p>Setting this allows you to override the template used for the main apache configuration file. This is a potentially risky thing to do as this module has been built around the concept of a minimal configuration file with most of the configuration coming in the form of conf.d/ entries. Defaults to &#39;apache/httpd.conf.erb&#39;.</p>\n\n<h4>Class: <code>apache::default_mods</code></h4>\n\n<p>Installs default Apache modules based on what OS you are running</p>\n\n<pre><code>class { &#39;apache::default_mods&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::mod</code></h4>\n\n<p>Used to enable arbitrary Apache httpd modules for which there is no specific <code>apache::mod::[name]</code> class. The <code>apache::mod</code> defined type will also install the required packages to enable the module, if any.</p>\n\n<pre><code>apache::mod { &#39;rewrite&#39;: }\napache::mod { &#39;ldap&#39;: }\n</code></pre>\n\n<h4>Classes: <code>apache::mod::[name]</code></h4>\n\n<p>There are many <code>apache::mod::[name]</code> classes within this module that can be declared using <code>include</code>:</p>\n\n<ul>\n<li><code>alias</code></li>\n<li><code>auth_basic</code></li>\n<li><code>auth_kerb</code></li>\n<li><code>autoindex</code></li>\n<li><code>cache</code></li>\n<li><code>cgi</code></li>\n<li><code>cgid</code></li>\n<li><code>dav</code></li>\n<li><code>dav_fs</code></li>\n<li><code>deflate</code></li>\n<li><code>dir</code>*</li>\n<li><code>disk_cache</code></li>\n<li><code>fcgid</code></li>\n<li><code>info</code></li>\n<li><code>ldap</code></li>\n<li><code>mime</code></li>\n<li><code>mime_magic</code></li>\n<li><code>mpm_event</code></li>\n<li><code>negotiation</code></li>\n<li><code>passenger</code>*</li>\n<li><code>perl</code></li>\n<li><code>php</code> (requires <a href=\"#mpm_module\"><code>mpm_module</code></a> set to <code>prefork</code>)</li>\n<li><code>prefork</code>*</li>\n<li><code>proxy</code>*</li>\n<li><code>proxy_html</code></li>\n<li><code>proxy_http</code></li>\n<li><code>python</code></li>\n<li><code>reqtimeout</code></li>\n<li><code>setenvif</code></li>\n<li><code>ssl</code>* (see <a href=\"#class-apachemodssl\">apache::mod::ssl</a> below)</li>\n<li><code>status</code></li>\n<li><code>userdir</code>*</li>\n<li><code>worker</code>*</li>\n<li><code>wsgi</code></li>\n<li><code>xsendfile</code></li>\n</ul>\n\n<p>Modules noted with a * indicate that the module has settings and, thus, a template that includes parameters. These parameters control the module&#39;s configuration. Most of the time, these parameters will not require any configuration or attention.</p>\n\n<p>The modules mentioned above, and other Apache modules that have templates, will cause template files to be dropped along with the mod install, and the module will not work without the template. Any mod without a template will install package but drop no files.</p>\n\n<h4>Class: <code>apache::mod::ssl</code></h4>\n\n<p>Installs Apache SSL capabilities and utilizes <code>ssl.conf.erb</code> template</p>\n\n<pre><code>class { &#39;apache::mod::ssl&#39;: }\n</code></pre>\n\n<p>To <em>use</em> SSL with a virtual host, you must either set the<code>default_ssl_vhost</code> parameter in <code>apache</code> to &#39;true&#39; or set the <code>ssl</code> parameter in <code>apache::vhost</code> to &#39;true&#39;.</p>\n\n<h4>Defined Type: <code>apache::vhost</code></h4>\n\n<p>The Apache module allows a lot of flexibility in the set up and configuration of virtual hosts. This flexibility is due, in part, to <code>vhost</code>&#39;s setup as a defined resource type, which allows it to be evaluated multiple times with different parameters.</p>\n\n<p>The <code>vhost</code> defined type allows you to have specialized configurations for virtual hosts that have requirements outside of the defaults. You can set up a default vhost within the base <code>apache</code> class as well as set a customized vhost setup as default. Your customized vhost (priority 10) will be privileged over the base class vhost (15).</p>\n\n<p>If you have a series of specific configurations and do not want a base <code>apache</code> class default vhost, make sure to set the base class default host to &#39;false&#39;.</p>\n\n<pre><code>class { &#39;apache&#39;:\n default_vhost =&gt; false,\n}\n</code></pre>\n\n<p><strong>Parameters within <code>apache::vhost</code>:</strong></p>\n\n<p>The default values for each parameter will vary based on operating system and type of virtual host.</p>\n\n<h5><code>access_log</code></h5>\n\n<p>Specifies whether <code>*_access.log</code> directives should be configured. Valid values are &#39;true&#39; and &#39;false&#39;. Defaults to &#39;true&#39;.</p>\n\n<h5><code>access_log_file</code></h5>\n\n<p>Points to the <code>*_access.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_pipe</code></h5>\n\n<p>Specifies a pipe to send access log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>access_log_format</code></h5>\n\n<p>Specifies either a LogFormat nickname or custom format string for access log. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>add_listen</code></h5>\n\n<p>Determines whether the vhost creates a listen statement. The default value is &#39;true&#39;.</p>\n\n<p>Setting <code>add_listen</code> to &#39;false&#39; stops the vhost from creating a listen statement, and this is important when you combine vhosts that are not passed an <code>ip</code> parameter with vhosts that <em>are</em> passed the <code>ip</code> parameter.</p>\n\n<h5><code>aliases</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>Alias</code> statements as per the <a href=\"http://httpd.apache.org/docs/current/mod/mod_alias.html\"><code>mod_alias</code> documentation</a>. Each hash is expected to be of the form:</p>\n\n<pre lang=\"ruby\"><code>aliases =&gt; [ { alias =&gt; &#39;/alias&#39;, path =&gt; &#39;/path/to/directory&#39; } ],\n</code></pre>\n\n<p>For <code>Alias</code> to work, each will need a corresponding <code>&lt;Directory /path/to/directory&gt;</code> or <code>&lt;Location /path/to/directory&gt;</code> block.</p>\n\n<p><strong>Note:</strong> If <code>apache::mod::passenger</code> is loaded and <code>PassengerHighPerformance true</code> is set, then <code>Alias</code> may have issues honouring the <code>PassengerEnabled off</code> statement. See <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">this article</a> for details.</p>\n\n<h5><code>block</code></h5>\n\n<p>Specifies the list of things Apache will block access to. The default is an empty set, &#39;[]&#39;. Currently, the only option is &#39;scm&#39;, which blocks web access to .svn, .git and .bzr directories. To add to this, please see the <a href=\"#development\">Development</a> section.</p>\n\n<h5><code>custom_fragment</code></h5>\n\n<p>Pass a string of custom configuration directives to be placed at the end of the vhost configuration.</p>\n\n<h5><code>default_vhost</code></h5>\n\n<p>Sets a given <code>apache::vhost</code> as the default to serve requests that do not match any other <code>apache::vhost</code> definitions. The default value is &#39;false&#39;.</p>\n\n<h5><code>directories</code></h5>\n\n<p>Passes a list of hashes to the vhost to create <code>&lt;Directory /path/to/directory&gt;...&lt;/Directory&gt;</code> directive blocks as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#directory\">Apache core documentation</a>. Each hash should be of the form of:</p>\n\n<pre lang=\"ruby\"><code>directory =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, &lt;directive&gt; =&gt; &lt;value&gt; } ],\n</code></pre>\n\n<p><em>Note:</em> At least one directory should match <code>docroot</code> parameter, once you start declaring directories <code>apache::vhost</code> assumes that all required <code>&lt;Directory&gt;</code> blocks will be declared.</p>\n\n<p><em>Note:</em> If not defined a single default <code>&lt;Directory&gt;</code> block will be created that matches the <code>docroot</code> parameter.</p>\n\n<p>The directives will be embedded within the <code>Directory</code> directive block, missing directives should be undefined and not be added, resulting in their default vaules in Apache. Currently this is the list of supported directives:</p>\n\n<h6><code>addhandlers</code></h6>\n\n<p>Sets <code>AddHandler</code> directives as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_mime.html#addhandler\">Apache Core documentation</a>. Accepts a list of hashes of the form <code>{ handler =&gt; &#39;handler-name&#39;, extensions =&gt; [&#39;extension&#39;]}</code>. Note that <code>extensions</code> is a list of extenstions being handled by the handler.\nAn example: </p>\n\n<pre lang=\"ruby\"><code>directory =&gt; [ { path =&gt; &#39;/path/to/directory&#39;,\n addhandlers =&gt; [ { handler =&gt; &#39;cgi-script&#39;, extensions =&gt; [&#39;.cgi&#39;]} ]\n} ]\n</code></pre>\n\n<h6><code>allow</code></h6>\n\n<p>Sets an <code>Allow</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#allow\">Apache Core documentation</a>. An example:</p>\n\n<pre lang=\"ruby\"><code>directory =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow =&gt; &#39;from example.org&#39; } ],\n</code></pre>\n\n<h6><code>allow_override</code></h6>\n\n<p>Sets the usage of <code>.htaccess</code> files as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride\">Apache core documentation</a>. Should accept in the form of a list or a string. An example:</p>\n\n<pre lang=\"ruby\"><code>directory =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, allow_override =&gt; [&#39;AuthConfig&#39;, &#39;Indexes&#39;] } ],\n</code></pre>\n\n<h6><code>deny</code></h6>\n\n<p>Sets an <code>Deny</code> directive as per the <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#deny\">Apache Core documentation</a>. An example:</p>\n\n<pre lang=\"ruby\"><code>directory =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, deny =&gt; &#39;from example.org&#39; } ],\n</code></pre>\n\n<h6><code>options</code></h6>\n\n<p>Lists the options for the given <code>&lt;Directory&gt;</code> block</p>\n\n<pre lang=\"ruby\"><code> directory =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;] }]\n</code></pre>\n\n<h6><code>order</code></h6>\n\n<p>Sets the order of processing <code>Allow</code> and <code>Deny</code> statements as per <a href=\"http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order\">Apache core documentation</a>. An example:</p>\n\n<pre lang=\"ruby\"><code>directory =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, order =&gt; &#39;Allow, Deny&#39; } ],\n</code></pre>\n\n<h6><code>passenger_enabled</code></h6>\n\n<p>Sets the value for the <code>PassengerEnabled</code> directory to <code>on</code> or <code>off</code> as per the <a href=\"http://www.modrails.com/documentation/Users%20guide%20Apache.html#PassengerEnabled\">Passenger documentation</a>.</p>\n\n<pre lang=\"ruby\"><code>directory =&gt; [ { path =&gt; &#39;/path/to/directory&#39;, passenger_enabled =&gt; &#39;off&#39; } ],\n</code></pre>\n\n<p><strong>Note:</strong> This directive requires <code>apache::mod::passenger</code> to be active, Apache may not start with an unrecognised directive without it.</p>\n\n<p><strong>Note:</strong> Be aware that there is an <a href=\"http://www.conandalton.net/2010/06/passengerenabled-off-not-working.html\">issue</a> using the <code>PassengerEnabled</code> directive with the <code>PassengerHighPerformance</code> directive.</p>\n\n<h5><code>docroot</code></h5>\n\n<p>Provides the DocumentRoot directive, identifying the directory Apache serves files from.</p>\n\n<h5><code>docroot_group</code></h5>\n\n<p>Sets group access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>docroot_owner</code></h5>\n\n<p>Sets individual user access to the docroot directory. Defaults to &#39;root&#39;.</p>\n\n<h5><code>error_log</code></h5>\n\n<p>Specifies whether <code>*_error.log</code> directives should be configured. Defaults to &#39;true&#39;.</p>\n\n<h5><code>error_log_file</code></h5>\n\n<p>Points to the <code>*_error.log</code> file. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>error_log_pipe</code></h5>\n\n<p>Specifies a pipe to send error log messages to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ensure</code></h5>\n\n<p>Specifies if the vhost file is present or absent.</p>\n\n<h5><code>ip</code></h5>\n\n<p>The IP address the vhost listens on. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>ip_based</code></h5>\n\n<p>Enables an IP-based vhost. This parameter inhibits the creation of a NameVirtualHost directive, since those are used to funnel requests to name-based vhosts. Defaults to &#39;false&#39;.</p>\n\n<h5><code>logroot</code></h5>\n\n<p>Specifies the location of the virtual host&#39;s logfiles. Defaults to <code>/var/log/&lt;apache log location&gt;/</code>.</p>\n\n<h5><code>no_proxy_uris</code></h5>\n\n<p>Specifies URLs you do not want to proxy. This parameter is meant to be used in combination with <code>proxy_dest</code>.</p>\n\n<h5><code>options</code></h5>\n\n<p>Lists the options for the given virtual host</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n options =&gt; [&#39;Indexes&#39;,&#39;FollowSymLinks&#39;,&#39;MultiViews&#39;],\n}\n</code></pre>\n\n<h5><code>override</code></h5>\n\n<p>Sets the overrides for the given virtual host. Accepts an array of AllowOverride arguments.</p>\n\n<h5><code>port</code></h5>\n\n<p>Sets the port the host is configured on.</p>\n\n<h5><code>priority</code></h5>\n\n<p>Sets the relative load-order for Apache httpd VirtualHost configuration files. Defaults to &#39;25&#39;.</p>\n\n<p>If nothing matches the priority, the first name-based vhost will be used. Likewise, passing a higher priority will cause the alphabetically first name-based vhost to be used if no other names match.</p>\n\n<p><em>Note</em>: You should not need to use this parameter. However, if you do use it, be aware that the <code>default_vhost</code> parameter for <code>apache::vhost</code> passes a priority of &#39;15&#39;.</p>\n\n<h5><code>proxy_dest</code></h5>\n\n<p>Specifies the destination address of a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>proxy_pass</code></h5>\n\n<p>Specifies an array of path =&gt; uri for a proxypass configuration. Defaults to &#39;undef&#39;.</p>\n\n<p>Example:\n$proxy_pass = [\n { &#39;path&#39; =&gt; &#39;/a&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/&#39; },\n { &#39;path&#39; =&gt; &#39;/b&#39;, &#39;url&#39; =&gt; &#39;http://backend-b/&#39; },\n { &#39;path&#39; =&gt; &#39;/c&#39;, &#39;url&#39; =&gt; &#39;http://backend-a/c&#39; },\n]</p>\n\n<p>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n proxy_pass =&gt; $proxy_pass,\n}</p>\n\n<h5><code>rack_base_uris</code></h5>\n\n<p>Specifies the resource identifiers for a rack configuration. The file paths specified will be listed as rack application roots for passenger/rack in the <code>_rack.erb</code> template. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_dest</code></h5>\n\n<p>Specifies the address to redirect to. Defaults to &#39;undef&#39;.</p>\n\n<h5><code>redirect_source</code></h5>\n\n<p>Specifies the source items? that will redirect to the destination specified in <code>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>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_source =&gt; [&#39;/images&#39;,&#39;/downloads&#39;],\n redirect_dest =&gt; [&#39;http://img.example.com/&#39;,&#39;http://downloads.example.com/&#39;],\n}\n</code></pre>\n\n<h5><code>redirect_status</code></h5>\n\n<p>Specifies the status to append to the redirect. Defaults to &#39;undef&#39;.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n redirect_status =&gt; [&#39;temp&#39;,&#39;permanent&#39;],\n}\n</code></pre>\n\n<h5><code>request_headers</code></h5>\n\n<p>Specifies additional request headers.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n request_headers =&gt; [\n &#39;append MirrorID &quot;mirror 12&quot;&#39;,\n &#39;unset MirrorID&#39;,\n ],\n}\n</code></pre>\n\n<h5><code>rewrite_base</code></h5>\n\n<p>Limits the <code>rewrite_rule</code> to the specified base URL. Defaults to &#39;undef&#39;.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n rewrite_base =&gt; &#39;/blog/&#39;,\n}\n</code></pre>\n\n<p>The above example would limit the index.html -&gt; welcome.html rewrite to only something inside of <a href=\"http://example.com/blog/\">http://example.com/blog/</a>.</p>\n\n<h5><code>rewrite_cond</code></h5>\n\n<p>Rewrites a URL via <code>rewrite_rule</code> based on the truth of specified conditions. For example</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_cond =&gt; &#39;%{HTTP_USER_AGENT} ^MSIE&#39;,\n}\n</code></pre>\n\n<p>will rewrite URLs only if the visitor is using IE. Defaults to &#39;undef&#39;.</p>\n\n<p><em>Note</em>: At the moment, each vhost is limited to a single list of rewrite conditions. In the future, you will be able to specify multiple <code>rewrite_cond</code> and <code>rewrite_rules</code> per vhost, so that different conditions get different rewrites.</p>\n\n<h5><code>rewrite_rule</code></h5>\n\n<p>Creates URL rewrite rules. Defaults to &#39;undef&#39;. This parameter allows you to specify, for example, that anyone trying to access index.html will be served welcome.html.</p>\n\n<pre><code>apache::vhost { &#39;site.name.fdqn&#39;:\n …\n rewrite_rule =&gt; &#39;^index\\.html$ welcome.html&#39;,\n}\n</code></pre>\n\n<h5><code>scriptalias</code></h5>\n\n<p>Defines a directory of CGI scripts to be aliased to the path &#39;/cgi-bin&#39;</p>\n\n<h5><code>serveradmin</code></h5>\n\n<p>Specifies the email address Apache will display when it renders one of its error pages.</p>\n\n<h5><code>serveraliases</code></h5>\n\n<p>Sets the server aliases of the site.</p>\n\n<h5><code>servername</code></h5>\n\n<p>Sets the primary name of the virtual host.</p>\n\n<h5><code>setenv</code></h5>\n\n<p>Used by HTTPD to set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>setenvif</code></h5>\n\n<p>Used by HTTPD to conditionally set environment variables for vhosts. Defaults to &#39;[]&#39;.</p>\n\n<h5><code>ssl</code></h5>\n\n<p>Enables SSL for the virtual host. SSL vhosts only respond to HTTPS queries. Valid values are &#39;true&#39; or &#39;false&#39;.</p>\n\n<h5><code>ssl_ca</code></h5>\n\n<p>Specifies the certificate authority.</p>\n\n<h5><code>ssl_cert</code></h5>\n\n<p>Specifies the SSL certification.</p>\n\n<h5><code>ssl_certs_dir</code></h5>\n\n<p>Specifies the location of the SSL certification directory. Defaults to <code>/etc/ssl/certs</code>.</p>\n\n<h5><code>ssl_chain</code></h5>\n\n<p>Specifies the SSL chain.</p>\n\n<h5><code>ssl_crl</code></h5>\n\n<p>Specifies the certificate revocation list to use.</p>\n\n<h5><code>ssl_crl_path</code></h5>\n\n<p>Specifies the location of the certificate revocation list.</p>\n\n<h5><code>ssl_key</code></h5>\n\n<p>Specifies the SSL key.</p>\n\n<h5><code>vhost_name</code></h5>\n\n<p>This parameter is for use with name-based virtual hosting. Defaults to &#39;*&#39;.</p>\n\n<h3>Virtual Host Examples</h3>\n\n<p>The Apache module allows you to set up pretty much any configuration of virtual host you might desire. This section will address some common configurations. Please see the <a href=\"https://github.com/puppetlabs/puppetlabs-apache/tree/main/tests\">Tests section</a> for even more examples.</p>\n\n<p>Configure a vhost with a server administrator</p>\n\n<pre><code>apache::vhost { &#39;third.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n serveradmin =&gt; &#39;admin@example.com&#39;,\n}\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with aliased servers</p>\n\n<pre><code>apache::vhost { &#39;sixth.example.com&#39;:\n serveraliases =&gt; [\n &#39;sixth.example.org&#39;,\n &#39;sixth.example.net&#39;,\n ],\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n}\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost with a cgi-bin</p>\n\n<pre><code>apache::vhost { &#39;eleventh.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/eleventh&#39;,\n scriptalias =&gt; &#39;/usr/lib/cgi-bin&#39;,\n}\n</code></pre>\n\n<hr>\n\n<p>Set up a vhost with a rack configuration</p>\n\n<pre><code>apache::vhost { &#39;fifteenth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifteenth&#39;,\n rack_base_uris =&gt; [&#39;/rackapp1&#39;, &#39;/rackapp2&#39;],\n}\n</code></pre>\n\n<hr>\n\n<p>Set up a mix of SSL and non-SSL vhosts at the same domain</p>\n\n<pre><code>#The non-ssl vhost\napache::vhost { &#39;first.example.com non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n}\n\n#The SSL vhost at the same domain\napache::vhost { &#39;first.example.com ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<hr>\n\n<p>Configure a vhost to redirect non-SSL connections to SSL</p>\n\n<pre><code>apache::vhost { &#39;sixteenth.example.com non-ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n redirect_status =&gt; &#39;permanent&#39;\n redirect_dest =&gt; &#39;https://sixteenth.example.com/&#39; \n}\napache::vhost { &#39;sixteenth.example.com ssl&#39;:\n servername =&gt; &#39;sixteenth.example.com&#39;,\n port =&gt; &#39;443&#39;,\n docroot =&gt; &#39;/var/www/sixteenth&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<hr>\n\n<p>Set up IP-based vhosts on any listen port and have them respond to requests on specific IP addresses. In this example, we will set listening on ports 80 and 81. This is required because the example vhosts are not declared with a port parameter.</p>\n\n<pre><code>apache::listen { &#39;80&#39;: }\napache::listen { &#39;81&#39;: }\n</code></pre>\n\n<p>Then we will set up the IP-based vhosts</p>\n\n<pre><code>apache::vhost { &#39;first.example.com&#39;:\n ip =&gt; &#39;10.0.0.10&#39;,\n docroot =&gt; &#39;/var/www/first&#39;,\n ip_based =&gt; true,\n}\napache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.11&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n ip_based =&gt; true,\n}\n</code></pre>\n\n<hr>\n\n<p>Configure a mix of name-based and IP-based vhosts. First, we will add two IP-based vhosts on 10.0.0.10, one SSL and one non-SSL</p>\n\n<pre><code>apache::vhost { &#39;The first IP-based vhost, non-ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;80&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first&#39;,\n}\napache::vhost { &#39;The first IP-based vhost, ssl&#39;:\n servername =&gt; &#39;first.example.com&#39;,\n ip =&gt; &#39;10.0.0.10&#39;,\n port =&gt; &#39;443&#39;,\n ip_based =&gt; true,\n docroot =&gt; &#39;/var/www/first-ssl&#39;,\n ssl =&gt; true,\n}\n</code></pre>\n\n<p>Then, we will add two name-based vhosts listening on 10.0.0.20</p>\n\n<pre><code>apache::vhost { &#39;second.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/second&#39;,\n}\napache::vhost { &#39;third.example.com&#39;:\n ip =&gt; &#39;10.0.0.20&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/third&#39;,\n}\n</code></pre>\n\n<p>If you want to add two name-based vhosts so that they will answer on either 10.0.0.10 or 10.0.0.20, you <strong>MUST</strong> declare <code>add_listen =&gt; &#39;false&#39;</code> to disable the otherwise automatic &#39;Listen 80&#39;, as it will conflict with the preceding IP-based vhosts.</p>\n\n<pre><code>apache::vhost { &#39;fourth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fourth&#39;,\n add_listen =&gt; false,\n}\napache::vhost { &#39;fifth.example.com&#39;:\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/var/www/fifth&#39;,\n add_listen =&gt; false,\n}\n</code></pre>\n\n<h2>Implementation</h2>\n\n<h3>Classes and Defined Types</h3>\n\n<h4>Class: <code>apache::dev</code></h4>\n\n<p>Installs Apache development libraries</p>\n\n<pre><code>class { &#39;apache::dev&#39;: }\n</code></pre>\n\n<h4>Defined Type: <code>apache::listen</code></h4>\n\n<p>Controls which ports Apache binds to for listening based on the title:</p>\n\n<pre><code>apache::listen { &#39;80&#39;: }\napache::listen { &#39;443&#39;: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>Listen</code> directives to the <code>ports.conf</code> file in the Apache httpd configuration directory. <code>apache::listen</code> titles should always take the form of: <code>&lt;port&gt;</code>, <code>&lt;ipv4&gt;:&lt;port&gt;</code>, or <code>[&lt;ipv6&gt;]:&lt;port&gt;</code></p>\n\n<p>Apache httpd requires that <code>Listen</code> directives must be added for every port. The <code>apache::vhost</code> defined type will automatically add <code>Listen</code> directives unless the <code>apache::vhost</code> is passed <code>add_listen =&gt; false</code>.</p>\n\n<h4>Defined Type: <code>apache::namevirtualhost</code></h4>\n\n<p>Enables named-based hosting of a virtual host</p>\n\n<pre><code>class { &#39;apache::namevirtualhost`: }\n</code></pre>\n\n<p>Declaring this defined type will add all <code>NameVirtualHost</code> directives to the <code>ports.conf</code> file in the Apache https configuration directory. <code>apache::namevirtualhost</code> titles should always take the form of: <code>*</code>, <code>*:&lt;port&gt;</code>, <code>_default_:&lt;port&gt;</code>, <code>&lt;ip&gt;</code>, or <code>&lt;ip&gt;:&lt;port&gt;</code>.</p>\n\n<h4>Defined Type: <code>apache::balancermember</code></h4>\n\n<p>Define members of a proxy_balancer set (mod_proxy_balancer). Very useful when using exported resources.</p>\n\n<p>On every app server you can export a balancermember like this:</p>\n\n<pre><code> @@apache::balancermember { &quot;${::fqdn}-puppet00&quot;:\n balancer_cluster =&gt; &#39;puppet00&#39;,\n url =&gt; &quot;ajp://${::fqdn}:8009&quot;\n options =&gt; [&#39;ping=5&#39;, &#39;disablereuse=on&#39;, &#39;retry=5&#39;, &#39;ttl=120&#39;],\n }\n</code></pre>\n\n<p>And on the proxy itself you create the balancer cluster using the defined type apache::balancer:</p>\n\n<pre><code> apache::balancer { &#39;puppet00&#39;: }\n</code></pre>\n\n<h3>Templates</h3>\n\n<p>The Apache module relies heavily on templates to enable the <code>vhost</code> and <code>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>\n\n<h2>Limitations</h2>\n\n<p>This has been tested on Ubuntu Precise, Debian Wheezy, and CentOS 5.8.</p>\n\n<h2>Development</h2>\n\n<h3>Overview</h3>\n\n<p>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>\n\n<p>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>\n\n<p>You can read the complete module contribution guide <a href=\"http://projects.puppetlabs.com/projects/module-site/wiki/Module_contributing\">on the Puppet Labs wiki.</a></p>\n\n<h3>Running tests</h3>\n\n<p>This project contains tests for both <a href=\"http://rspec-puppet.com/\">rspec-puppet</a> and <a href=\"https://github.com/puppetlabs/rspec-system\">rspec-system</a> to verify functionality. For in-depth information please see their respective documentation.</p>\n\n<p>Quickstart:</p>\n\n<pre><code>gem install bundler\nbundle install\nbundle exec rake spec\nbundle exec rake spec:system\n</code></pre>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.</p>\n</section>",
1993
1993
  "changelog": "<section class=\"plaintext\"><pre>2013-07-09 Release 0.7.0\nChanges:\n- Essentially rewrite the module -- too many to list\n- `apache::vhost` has many abilities -- see README.md for details\n- `apache::mod::*` classes provide httpd mod-loading capabilities\n- `apache` base class is much more configurable\n\nBugfixes:\n- Many. And many more to come\n\n2013-03-2 Release 0.6.0\n- update travis tests (add more supported versions)\n- add access log_parameter\n- make purging of vhost dir configurable\n\n2012-08-24 Release 0.4.0\nChanges:\n- `include apache` is now required when using apache::mod::*\n\nBugfixes:\n- Fix syntax for validate_re\n- Fix formatting in vhost template\n- Fix spec tests such that they pass\n\n2012-05-08 Puppet Labs &lt;info@puppetlabs.com&gt; - 0.0.4\ne62e362 Fix broken tests for ssl, vhost, vhost::*\n42c6363 Changes to match style guide and pass puppet-lint without error\n42bc8ba changed name =&gt; path for file resources in order to name namevar by it&#x27;s name\n72e13de One end too much\n0739641 style guide fixes: &#x27;true&#x27; &lt;&gt; true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod&#x2F;a2dismo commands optional\n98d774e (#13860) Autorequire Package[&#x27;httpd&#x27;]\n05fcec5 (#13073) Add missing puppet spec tests\n541afda (#6899) Remove virtual a2mod definition\n976cb69 (#13072) Move mod python and wsgi package names to params\n323915a (#13060) Add .gitignore to repo\nfdf40af (#13060) Remove pkg directory from source tree\nfd90015 Add LICENSE file and update the ModuleFile\nd3d0d23 Re-enable local php class\nd7516c7 Make management of firewalls configurable for vhosts\n60f83ba Explicitly lookup scope of apache_name in templates.\nf4d287f (#12581) Add explicit ordering for vdir directory\n88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall\na776a8b (#11071) Fix to work with latest firewall module\n2b79e8b (#11070) Add support for Scientific Linux\n405b3e9 Fix for a2mod\n57b9048 Commit apache::vhost::redirect Manifest\n8862d01 Commit apache::vhost::proxy Manifest\nd5c1fd0 Commit apache::mod::wsgi Manifest\na825ac7 Commit apache::mod::python Manifest\nb77062f Commit Templates\n9a51b4a Vhost File Declarations\n6cf7312 Defaults for Parameters\n6a5b11a Ensure installed\nf672e46 a2mod fix\n8a56ee9 add pthon support to apache\n</pre></section>",
1994
1994
  "license": "<section class=\"plaintext\"><pre>Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n</pre></section>",
1995
1995
  "created_at": "2013-07-09 12:47:10 -0700",
@@ -2315,7 +2315,7 @@
2315
2315
  "file_size": 13280,
2316
2316
  "file_md5": "b00db93a5ee05c20207bbadcf85af2d6",
2317
2317
  "downloads": 308,
2318
- "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;webmaster@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Notes</h2>\n\n<p>Since Puppet cannot ensure that all parent directories exist you need to\nmanage these yourself. In the more advanced example above, you need to ensure \nthat <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.</p>\n</section>",
2318
+ "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;web@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Notes</h2>\n\n<p>Since Puppet cannot ensure that all parent directories exist you need to\nmanage these yourself. In the more advanced example above, you need to ensure \nthat <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.</p>\n</section>",
2319
2319
  "changelog": "<section class=\"plaintext\"><pre>2012-05-08 Puppet Labs &lt;info@puppetlabs.com&gt; - 0.0.4\ne62e362 Fix broken tests for ssl, vhost, vhost::*\n42c6363 Changes to match style guide and pass puppet-lint without error\n42bc8ba changed name =&gt; path for file resources in order to name namevar by it&#x27;s name\n72e13de One end too much\n0739641 style guide fixes: &#x27;true&#x27; &lt;&gt; true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod&#x2F;a2dismo commands optional\n98d774e (#13860) Autorequire Package[&#x27;httpd&#x27;]\n05fcec5 (#13073) Add missing puppet spec tests\n541afda (#6899) Remove virtual a2mod definition\n976cb69 (#13072) Move mod python and wsgi package names to params\n323915a (#13060) Add .gitignore to repo\nfdf40af (#13060) Remove pkg directory from source tree\nfd90015 Add LICENSE file and update the ModuleFile\nd3d0d23 Re-enable local php class\nd7516c7 Make management of firewalls configurable for vhosts\n60f83ba Explicitly lookup scope of apache_name in templates.\nf4d287f (#12581) Add explicit ordering for vdir directory\n88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall\na776a8b (#11071) Fix to work with latest firewall module\n2b79e8b (#11070) Add support for Scientific Linux\n405b3e9 Fix for a2mod\n57b9048 Commit apache::vhost::redirect Manifest\n8862d01 Commit apache::vhost::proxy Manifest\nd5c1fd0 Commit apache::mod::wsgi Manifest\na825ac7 Commit apache::mod::python Manifest\nb77062f Commit Templates\n9a51b4a Vhost File Declarations\n6cf7312 Defaults for Parameters\n6a5b11a Ensure installed\nf672e46 a2mod fix\n8a56ee9 add pthon support to apache\n</pre></section>",
2320
2320
  "license": "<section class=\"plaintext\"><pre>Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n</pre></section>",
2321
2321
  "created_at": "2012-08-08 00:23:44 -0700",
@@ -2484,7 +2484,7 @@
2484
2484
  "file_size": 27385,
2485
2485
  "file_md5": "1f95ea71528835d562c99366cea3d649",
2486
2486
  "downloads": 248,
2487
- "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;webmaster@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Notes</h2>\n\n<p>Since Puppet cannot ensure that all parent directories exist you need to\nmanage these yourself. In the more advanced example above, you need to ensure \nthat <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.</p>\n</section>",
2487
+ "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;web@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Notes</h2>\n\n<p>Since Puppet cannot ensure that all parent directories exist you need to\nmanage these yourself. In the more advanced example above, you need to ensure \nthat <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.</p>\n</section>",
2488
2488
  "changelog": "<section class=\"plaintext\"><pre>2012-05-08 Puppet Labs &lt;info@puppetlabs.com&gt; - 0.0.4\ne62e362 Fix broken tests for ssl, vhost, vhost::*\n42c6363 Changes to match style guide and pass puppet-lint without error\n42bc8ba changed name =&gt; path for file resources in order to name namevar by it&#x27;s name\n72e13de One end too much\n0739641 style guide fixes: &#x27;true&#x27; &lt;&gt; true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod&#x2F;a2dismo commands optional\n98d774e (#13860) Autorequire Package[&#x27;httpd&#x27;]\n05fcec5 (#13073) Add missing puppet spec tests\n541afda (#6899) Remove virtual a2mod definition\n976cb69 (#13072) Move mod python and wsgi package names to params\n323915a (#13060) Add .gitignore to repo\nfdf40af (#13060) Remove pkg directory from source tree\nfd90015 Add LICENSE file and update the ModuleFile\nd3d0d23 Re-enable local php class\nd7516c7 Make management of firewalls configurable for vhosts\n60f83ba Explicitly lookup scope of apache_name in templates.\nf4d287f (#12581) Add explicit ordering for vdir directory\n88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall\na776a8b (#11071) Fix to work with latest firewall module\n2b79e8b (#11070) Add support for Scientific Linux\n405b3e9 Fix for a2mod\n57b9048 Commit apache::vhost::redirect Manifest\n8862d01 Commit apache::vhost::proxy Manifest\nd5c1fd0 Commit apache::mod::wsgi Manifest\na825ac7 Commit apache::mod::python Manifest\nb77062f Commit Templates\n9a51b4a Vhost File Declarations\n6cf7312 Defaults for Parameters\n6a5b11a Ensure installed\nf672e46 a2mod fix\n8a56ee9 add pthon support to apache\n</pre></section>",
2489
2489
  "license": "<section class=\"plaintext\"><pre>Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n</pre></section>",
2490
2490
  "created_at": "2012-08-16 01:03:41 -0700",
@@ -2653,7 +2653,7 @@
2653
2653
  "file_size": 27387,
2654
2654
  "file_md5": "e7edaffc2d96a3d0ac629006ec12b117",
2655
2655
  "downloads": 233,
2656
- "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;webmaster@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Notes</h2>\n\n<p>Since Puppet cannot ensure that all parent directories exist you need to\nmanage these yourself. In the more advanced example above, you need to ensure \nthat <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.</p>\n</section>",
2656
+ "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;web@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Notes</h2>\n\n<p>Since Puppet cannot ensure that all parent directories exist you need to\nmanage these yourself. In the more advanced example above, you need to ensure \nthat <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.</p>\n</section>",
2657
2657
  "changelog": "<section class=\"plaintext\"><pre>2012-05-08 Puppet Labs &lt;info@puppetlabs.com&gt; - 0.0.4\ne62e362 Fix broken tests for ssl, vhost, vhost::*\n42c6363 Changes to match style guide and pass puppet-lint without error\n42bc8ba changed name =&gt; path for file resources in order to name namevar by it&#x27;s name\n72e13de One end too much\n0739641 style guide fixes: &#x27;true&#x27; &lt;&gt; true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod&#x2F;a2dismo commands optional\n98d774e (#13860) Autorequire Package[&#x27;httpd&#x27;]\n05fcec5 (#13073) Add missing puppet spec tests\n541afda (#6899) Remove virtual a2mod definition\n976cb69 (#13072) Move mod python and wsgi package names to params\n323915a (#13060) Add .gitignore to repo\nfdf40af (#13060) Remove pkg directory from source tree\nfd90015 Add LICENSE file and update the ModuleFile\nd3d0d23 Re-enable local php class\nd7516c7 Make management of firewalls configurable for vhosts\n60f83ba Explicitly lookup scope of apache_name in templates.\nf4d287f (#12581) Add explicit ordering for vdir directory\n88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall\na776a8b (#11071) Fix to work with latest firewall module\n2b79e8b (#11070) Add support for Scientific Linux\n405b3e9 Fix for a2mod\n57b9048 Commit apache::vhost::redirect Manifest\n8862d01 Commit apache::vhost::proxy Manifest\nd5c1fd0 Commit apache::mod::wsgi Manifest\na825ac7 Commit apache::mod::python Manifest\nb77062f Commit Templates\n9a51b4a Vhost File Declarations\n6cf7312 Defaults for Parameters\n6a5b11a Ensure installed\nf672e46 a2mod fix\n8a56ee9 add pthon support to apache\n</pre></section>",
2658
2658
  "license": "<section class=\"plaintext\"><pre>Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n</pre></section>",
2659
2659
  "created_at": "2012-08-13 18:22:45 -0700",
@@ -3014,7 +3014,7 @@
3014
3014
  "file_size": 740331,
3015
3015
  "file_md5": "306d26a53b2ee31a1c51a9ee801aa3c8",
3016
3016
  "downloads": 216,
3017
- "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::mod::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;webmaster@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Notes</h2>\n\n<p>Since Puppet cannot ensure that all parent directories exist you need to\nmanage these yourself. In the more advanced example above, you need to ensure \nthat <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.</p>\n</section>",
3017
+ "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::mod::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;web@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Notes</h2>\n\n<p>Since Puppet cannot ensure that all parent directories exist you need to\nmanage these yourself. In the more advanced example above, you need to ensure \nthat <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.</p>\n</section>",
3018
3018
  "changelog": "<section class=\"plaintext\"><pre>2012-05-08 Puppet Labs &lt;info@puppetlabs.com&gt; - 0.0.4\ne62e362 Fix broken tests for ssl, vhost, vhost::*\n42c6363 Changes to match style guide and pass puppet-lint without error\n42bc8ba changed name =&gt; path for file resources in order to name namevar by it&#x27;s name\n72e13de One end too much\n0739641 style guide fixes: &#x27;true&#x27; &lt;&gt; true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod&#x2F;a2dismo commands optional\n98d774e (#13860) Autorequire Package[&#x27;httpd&#x27;]\n05fcec5 (#13073) Add missing puppet spec tests\n541afda (#6899) Remove virtual a2mod definition\n976cb69 (#13072) Move mod python and wsgi package names to params\n323915a (#13060) Add .gitignore to repo\nfdf40af (#13060) Remove pkg directory from source tree\nfd90015 Add LICENSE file and update the ModuleFile\nd3d0d23 Re-enable local php class\nd7516c7 Make management of firewalls configurable for vhosts\n60f83ba Explicitly lookup scope of apache_name in templates.\nf4d287f (#12581) Add explicit ordering for vdir directory\n88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall\na776a8b (#11071) Fix to work with latest firewall module\n2b79e8b (#11070) Add support for Scientific Linux\n405b3e9 Fix for a2mod\n57b9048 Commit apache::vhost::redirect Manifest\n8862d01 Commit apache::vhost::proxy Manifest\nd5c1fd0 Commit apache::mod::wsgi Manifest\na825ac7 Commit apache::mod::python Manifest\nb77062f Commit Templates\n9a51b4a Vhost File Declarations\n6cf7312 Defaults for Parameters\n6a5b11a Ensure installed\nf672e46 a2mod fix\n8a56ee9 add pthon support to apache\n</pre></section>",
3019
3019
  "license": "<section class=\"plaintext\"><pre>Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n</pre></section>",
3020
3020
  "created_at": "2012-08-22 18:24:38 -0700",
@@ -3276,7 +3276,7 @@
3276
3276
  "file_size": 27389,
3277
3277
  "file_md5": "8c8f4d98653673a2563372c3f8e5dfcb",
3278
3278
  "downloads": 159,
3279
- "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;webmaster@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Notes</h2>\n\n<p>Since Puppet cannot ensure that all parent directories exist you need to\nmanage these yourself. In the more advanced example above, you need to ensure \nthat <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.</p>\n</section>",
3279
+ "readme": "<section class=\"markdown\"><h1>Puppetlabs module for Apache</h1>\n\n<p>Apache is widely-used web server and this module will allow to configure\nvarious modules and setup virtual hosts with minimal effort.</p>\n\n<h2>Basic usage</h2>\n\n<p>To install Apache</p>\n\n<pre><code>class {&#39;apache&#39;: }\n</code></pre>\n\n<p>To install the Apache PHP module</p>\n\n<pre><code>class {&#39;apache::php&#39;: }\n</code></pre>\n\n<h2>Configure a virtual host</h2>\n\n<p>You can easily configure many parameters of a virtual host. A minimal\nexample is:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n}\n</code></pre>\n\n<p>A slightly more complicated example, which moves the docroot and\nlogfile to an alternate location, might be:</p>\n\n<pre><code>apache::vhost { &#39;www.example.com&#39;:\n priority =&gt; &#39;10&#39;,\n vhost_name =&gt; &#39;192.0.2.1&#39;,\n port =&gt; &#39;80&#39;,\n docroot =&gt; &#39;/home/www.example.com/docroot/&#39;,\n logroot =&gt; &#39;/srv/www.example.com/logroot/&#39;,\n serveradmin =&gt; &#39;web@example.com&#39;,\n serveraliases =&gt; [&#39;example.com&#39;,],\n}\n</code></pre>\n\n<h2>Notes</h2>\n\n<p>Since Puppet cannot ensure that all parent directories exist you need to\nmanage these yourself. In the more advanced example above, you need to ensure \nthat <code>/home/www.example.com</code> and <code>/srv/www.example.com</code> directories exist.</p>\n\n<h2>Contributors</h2>\n\n<ul>\n<li>A cast of hundreds, hopefully you too soon</li>\n</ul>\n\n<h2>Copyright and License</h2>\n\n<p>Copyright (C) 2012 <a href=\"https://www.puppetlabs.com/\">Puppet Labs</a> Inc</p>\n\n<p>Puppet Labs can be contacted at: <a href=\"mailto:info@puppetlabs.com\">info@puppetlabs.com</a></p>\n\n<p>Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at</p>\n\n<p><a href=\"http://www.apache.org/licenses/LICENSE-2.0\">http://www.apache.org/licenses/LICENSE-2.0</a></p>\n\n<p>Unless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.</p>\n</section>",
3280
3280
  "changelog": "<section class=\"plaintext\"><pre>2012-05-08 Puppet Labs &lt;info@puppetlabs.com&gt; - 0.0.4\ne62e362 Fix broken tests for ssl, vhost, vhost::*\n42c6363 Changes to match style guide and pass puppet-lint without error\n42bc8ba changed name =&gt; path for file resources in order to name namevar by it&#x27;s name\n72e13de One end too much\n0739641 style guide fixes: &#x27;true&#x27; &lt;&gt; true, $operatingsystem needs to be $::operatingsystem, etc.\n273f94d fix tests\na35ede5 (#13860) Make a2enmod&#x2F;a2dismo commands optional\n98d774e (#13860) Autorequire Package[&#x27;httpd&#x27;]\n05fcec5 (#13073) Add missing puppet spec tests\n541afda (#6899) Remove virtual a2mod definition\n976cb69 (#13072) Move mod python and wsgi package names to params\n323915a (#13060) Add .gitignore to repo\nfdf40af (#13060) Remove pkg directory from source tree\nfd90015 Add LICENSE file and update the ModuleFile\nd3d0d23 Re-enable local php class\nd7516c7 Make management of firewalls configurable for vhosts\n60f83ba Explicitly lookup scope of apache_name in templates.\nf4d287f (#12581) Add explicit ordering for vdir directory\n88a2ac6 (#11706) puppetlabs-apache depends on puppetlabs-firewall\na776a8b (#11071) Fix to work with latest firewall module\n2b79e8b (#11070) Add support for Scientific Linux\n405b3e9 Fix for a2mod\n57b9048 Commit apache::vhost::redirect Manifest\n8862d01 Commit apache::vhost::proxy Manifest\nd5c1fd0 Commit apache::mod::wsgi Manifest\na825ac7 Commit apache::mod::python Manifest\nb77062f Commit Templates\n9a51b4a Vhost File Declarations\n6cf7312 Defaults for Parameters\n6a5b11a Ensure installed\nf672e46 a2mod fix\n8a56ee9 add pthon support to apache\n</pre></section>",
3281
3281
  "license": "<section class=\"plaintext\"><pre>Copyright (C) 2012 Puppet Labs Inc\n\nPuppet Labs can be contacted at: info@puppetlabs.com\n\nLicensed under the Apache License, Version 2.0 (the &quot;License&quot;);\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:&#x2F;&#x2F;www.apache.org&#x2F;licenses&#x2F;LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an &quot;AS IS&quot; BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n</pre></section>",
3282
3282
  "created_at": "2012-08-16 00:25:44 -0700",
@@ -3284,4 +3284,4 @@
3284
3284
  "deleted_at": null
3285
3285
  }
3286
3286
  ]
3287
- }
3287
+ }
@@ -92,12 +92,41 @@ describe PuppetForge::Connection do
92
92
  end
93
93
 
94
94
  context 'when an authorization value is provided' do
95
- before(:each) do
96
- allow(described_class).to receive(:authorization).and_return("auth-test value")
95
+ let(:key) { "abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789" }
96
+ let(:prepended_key) { "Bearer #{key}" }
97
+
98
+ context 'when the key already includes the Bearer prefix as expected' do
99
+ before(:each) do
100
+ allow(described_class).to receive(:authorization).and_return(prepended_key)
101
+ end
102
+
103
+ it 'does not prepend it again' do
104
+ expect(subject.headers).to include(:authorization => prepended_key)
105
+ end
97
106
  end
98
107
 
99
- it 'sets authorization header on requests' do
100
- expect(subject.headers).to include(:authorization => "auth-test value")
108
+ context 'when the key does not includ the Bearer prefix' do
109
+ context 'when the value looks like a Forge API key' do
110
+ before(:each) do
111
+ allow(described_class).to receive(:authorization).and_return(key)
112
+ end
113
+
114
+ it 'prepends "Bearer"' do
115
+ expect(subject.headers).to include(:authorization => prepended_key)
116
+ end
117
+ end
118
+
119
+ context 'when the value does not look like a Forge API key' do
120
+ let(:key) { "auth-test value" }
121
+
122
+ before(:each) do
123
+ allow(described_class).to receive(:authorization).and_return(key)
124
+ end
125
+
126
+ it 'does not alter the value' do
127
+ expect(subject.headers).to include(:authorization => key)
128
+ end
129
+ end
101
130
  end
102
131
  end
103
132
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet_forge
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet Labs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-28 00:00:00.000000000 Z
11
+ date: 2021-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -280,7 +280,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
280
280
  - !ruby/object:Gem::Version
281
281
  version: '0'
282
282
  requirements: []
283
- rubygems_version: 3.0.8
283
+ rubygems_version: 3.1.6
284
284
  signing_key:
285
285
  specification_version: 4
286
286
  summary: Access the Puppet Forge API from Ruby for resource information and to download