Module apache_httpd
In: /modules/apache_httpd/manifests/init.pp


apache_httpd   file  

Classes and Modules

Class apache_httpd::service


apache_httpd( $user => 'apache', $logrotate_freq => 'false', $logrotate_files => '/var/log/httpd/*log', $options => 'false', $ssl => 'false', $maxclients => '256', $timeout_seconds => '60', $serveradmin => 'root@localhost', $group => 'apache', $maxrequestsperchild => '4000', $minspareservers => '2', $maxkeepaliverequests => '100', $servertokens => 'Prod', $welcome => 'true', $listen => ['"80"'], $threadsperchild => '32', $maxsparethreads => '75', $httpd_lang => 'false', $logrotate_opts => ['"missingok"', '"notifempty"', '"sharedscripts"', '"delaycompress"'], $serversignature => 'On', $maxspareservers => '8', $modules => ['"authz_host"', '"include"', '"mime"', '"negotiation"', '"alias"'], $namevirtualhost => [], $startservers => '4', $keepalivetimeout => '15', $documentroot => '/var/www/html', $usecanonicalname => 'Off', $serverlimit => '256', $keepalive => 'Off', $extendedstatus => 'Off', $minsparethreads => '25', $pidfile => 'false' )

Define: apache_httpd

Apache httpd web server main definition.

The title must be ‘prefork’ (RHEL default) or ‘worker’. The defaults are as close as possible to the original RHEL defaults. The configuration files are based on RHEL6‘s httpd 2.2 files, but work fine with RHEL5‘s 2.0 httpd.

Note that by default a minimal set of modules is enabled in order to have the original testing page work, but passing an array of module names as the ‘modules’ parameter resets them to only the ‘log’ module.


 Too many to list here. See the module's init.pp file.

Sample Usage :

 apache_httpd { 'prefork':
     modules => [ 'mime' ],
file( $source => 'undef', $confd => '/etc/httpd/conf.d', $group => 'root', $content => 'undef', $mode => '0644', $ensure => 'undef', $owner => 'root' )

Define: apache_httpd::file

Apache httpd server configuration file definition. Any new, removed or changed files will automatically reload the httpd server. Note that for major changes, such as address binds, SSL certificate changes, etc. it might still be needed to force a full restart of the service.


   The puppet file type 'source' value where to take the configuration file
   from. Mutually exclusive with $content. Default: none.
   The puppet file type 'content' value for the configuration file's content.
   Mutually exclusive with $source. Default: none.
   Whether the file should be 'present' or 'absent'. Defaults to 'present'.

Sample Usage :

 apache_httpd::file { '':
     source => 'puppet:///files/apache_httpd/',
 apache_httpd::file { 'foo.conf':
     content => "LoadModule foo_module modules/\nFooDirective\n",
 apache_httpd::file { 'mod_unwanted.conf':
     ensure => absent,