Version information
released Nov 21st 2016
This version is compatible with:
- , ,
Start using this module
Add this module to your Puppetfile:
mod 'aneesh-apache', '1.2.0'
Learn more about managing modules with a PuppetfileDocumentation
aneesh/apache — version 1.2.0 Nov 21st 2016
APACHE Module
Overview
This module install and configure apache web server.
Usage
Default configuration:
include apache
Change configuration file settings:
class { 'apache':
servername => 'www.nanonet.com',
include => [ 'Include sites-enabled/*.conf' ],
}
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',
],
},
}
Create proxy:
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',
],
},
}
Copyright 2016 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.