Version information
released Mar 1st 2017
This version is compatible with:
- , ,
Start using this module
Add this module to your Puppetfile:
mod 'aneesh-apache', '1.5.0'
Learn more about managing modules with a PuppetfileDocumentation
aneesh/apache — version 1.5.0 Mar 1st 2017
APACHE Module
Overview
This module install and configure apache web server.
Usage
Default configuration:
include apache
Change configuration file settings:
class { 'apache':
servername => 'www.example.com',
listen => [ '80' ],
include => [ 'sites-enabled/*.conf' ],
serversignature => 'Off',
servertokens => 'Prod',
fileetag => 'None',
timeout => '60',
keepalivetimeout => '15',
limitrequestfields => '100',
limitrequestfieldsize => '8190',
namevirtualhost => [ '*.80' ],
}
Create virtualhost:
class { 'apache::virtualhost':
filename => 'example.com.conf',
virtualhost => {
'*:80' => [
'ServerAdmin admin@example.com',
'DocumentRoot /var/www/example.com/public_html/',
'ServerName example.com',
'ServerAlias www.example.com',
'ErrorLog /var/www/example.com/error.log',
'CustomLog /var/www/example.com/access.log combined',
],
},
}
Proxy customisation:
class { 'apache':
proxyrequests => 'Off',
proxypass => '/ balancer://cluster lbmethod=byrequests',
proxy => {
'*' => [
'Order deny,allow',
'Deny from none',
'Allow from all',
],
'balancer://cluster' => [
'BalancerMember http://node1.example.com/ loadfactor=1',
'BalancerMember http://node2.example.com/ loadfactor=1',
],
},
}
Modsecurity customisation:
class { 'apache::modsecurity':
secruleengine => 'On',
secrequestbodyaccess => 'On',
secresponsebodyaccess => 'On',
secdatadir => undef,
}
Modevasive customisation:
class { 'apache::modevasive':
dosemailnotify => 'admin@example.com',
dospagecount => '2',
dossitecount => '50',
dosblockingperiod => '10',
doslogdir => '/var/log/mod_evasive',
doswhitelist => [ '127.0.0.1', '192.168.0.*' ],
}
Copyright 2017 Aneesh C Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.