Forge Home

apache2

Module to manage Apache2 v2.4 in OpenSuSE 13.1

10,680 downloads

8,122 latest version

2.6 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 0.4.1 (deleted)
  • 0.4.0 (latest)
  • 0.3.0
  • 0.1.0
released Nov 6th 2015
This version is compatible with:

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'sharumpe-apache2', '0.4.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add sharumpe-apache2
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install sharumpe-apache2 --version 0.4.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

sharumpe/apache2 — version 0.4.0 Nov 6th 2015

apache2

This is focused on the needs that we have, specifically around Apache2 on OpenSuSE. As such, it is not currently capable of managing every aspect of Apache2. Please take a look at the .pp files to see default values for arguments.

Basic usage looks like this:

#
# Set up a basic Apache2 installation.
#
# reloadOnChange (bool): if true, reload after config changes
# useDefaultModules (bool): if true, load standard set of modules
#   defined in params.pp
# (un)loadModules (array): module names to ensure are (un)loaded. This
#   works with the defaultModules, adding or removing and creating
#   a single final list of modules to enable.
# serverInfoAccessIp (ip): allow this ip to access /server-info (if the
#   info module is enabled)
# serverStatusAccessIp (ip): allow this ip to access /server-status (if
#   the status module is enabled)
#
# The AccessIp configs could also be done via apache2::grantAccessToIp
#
class { 'apache2':
    reloadOnChange          => true,
    useDefaultModules       => true,
    loadModules             => [ 'desiredModule' ],
    unloadModules           => [ 'undesiredModule' ],
    serverInfoAccessIp      => '192.168.1.0/24',
    serverStatusAccessIp    => '192.168.1.0/24',
}

#
# Set up the ldap module.
# This loads the ldap module and sets up /ldap-status. There is no need
# to add 'ldap' to the loadModules list above if you use this class.
#
# ldapStatusAccessIp (ip): allow this ip to access /ldap-status
#
class { 'apache2::ldap' :
    ldapStatusAccessIp      => '192.168.1.0/24',
}

#
# Set up the jk module for use with Tomcat.
# This installs the apache2-mod_jk package and loads the jk module.
#
# jkLogLevel (string): sets the same param for JK
# jkWorkerHost (string): sets the same param for JK
# jkWorkerPort (string): sets the same param for JK
# apps (array): set up a jkMount for the specified locations.
#
class { 'apache2::jk' :
    jkLogLevel  => 'error',
    jkWorkerHost    => 'localhost',
    jkWorkerPort    => 8009,
    apps        => [ 'manager' ],
}

#
# You can also specify jkMount locations this way:
#
apache2::jk::addApp { 'host-manager' : }

#
# Add access to any location based on ip.  Can also add access based
# on host by using grantAccessToHost with a "host" argument.
# Note: this access control works for anything you can reference via
#       Apache's <Location> blocks.
#
apache2::grantAccessToIp { 'jk-manager-cts' :
    location        => '/manager',
    ip              => '192.168.1.0/24',
}
apache2::grantAccessToIp { 'jk-host-manager-cts' :
    location        => '/host-manager',
    ip              => '192.168.1.0/24',
}

#
# Turn on php5 (currently 5.4 in OpenSuSE 13.1)
# This installs the apache2-php5 module and loads the php5 module.
# Arguments specified in here override the defaults in php.ini, and
# that file is left un-touched.
# The apps "turn on" php for a specific <Location> or <Directory>. This
# allows us to limit php use to the places where it is needed.
#
# phpVersion (string): one of [ '5.4', '5.5', '5.6' ] (default is 5.4)
# phpMemoryLimit (string): overrides the memory_limit
# phpErrorLog (string): location of the php-specific error log
# phpExposePhp (string): on/off -- don't let on that php is running
# phpTimezone (string): some things are angry if this isn't set
# appDirs (array): set up php for the specified <Directory>(s)
# appLocs (array): set up php for the specified <Location>(s)
#
class { 'apache2::php' :
    phpVersion  => '5.4',
    phpMemoryLimit  => '96M',
    appDirs         => [ '/srv/www/htdocs/phpapp' ],
    appLocs         => [ '/phpapp2' ],
}

Contact

nospam@macwebb.com

Support

Please log tickets and issues at the GitHub site. (https://github.com/sharumpe/puppet-apache2)