- Description
- Setup - The basics of getting started with apache
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
This module lets you manage the Apache httpd web server.
Classes:
- apache
- apache::mod_auth_gssapi
- apache::mod_info
- apache::mod_passenger
- apache::mod_ssl
- apache::mod_status
- apache::mod_wsgi
- apache::package
- apache::service
Defined types:
Data types:
This class manages the primary configuration, SELinux settings and firewall. This also implies management of the minimal packaging and the service.
Should SELinux allow httpd to modify public files used for public file transfer services? Either true
or false
(default).
Should SELinux allow httpd scripts and modules execmem/execstack? Either true
or false
(default).
Limits the level of messages logged to the error_log
file. Valid values are regulated by the Apache::Log_level. The default is 'warn'
.
If true
, open the HTTP port on the firewall. Otherwise the firewall is left unaffected. Defaults to true
.
Should SELinux allow httpd scripts and modules to connect to the network using TCP? Either true
or false
(default).
Should SELinux allow httpd scripts and modules to connect to databases over the network? Either true
or false
(default).
Should SELinux allow httpd to send mail? Either true
or false
(default).
Should SELinux allow serving content reached via NFS? Either true
or false
(default).
This class manages the Apache web server to provide authorization via Kerberos using only GSSAPI calls.
Literal content or URI for the Kerberos keytab file content. If neither content nor source is given, the file will be left unmanaged. This may be desirable when using gssproxy that has a keytab elsewhere.
URI of the Kerberos keytab file content. If neither content nor source is given, the content of the file will be left unmanaged.
An array of package names needed for httpd authorization via Kerberos using only GSSAPI calls. The default should be correct for supported platforms.
This class manages the Apache info module which provides a comprehensive overview of the server configuration. Access will only be allowed for any successful match of allow_from_host
or allow_from_ip
-- the client need not match both.
This parameter controls the location used to access the server info page. Defaults to '/server-info'
.
An array of hostnames which to be allowed access to the server info page. Defaults to []
.
An array of IPs or IP ranges in CIDR format to be allowed access to the server info page. Defaults to ['127.0.0.1', '::1']
.
This class manages the Apache web server to provide Phusion Passenger support.
An array of package names needed for httpd Phusion Passenger support. The default should be correct for supported platforms.
This class manages the Apache web server to provide HTTPS support.
If true
, open the HTTPS port on the firewall. Otherwise the firewall is left unaffected. Defaults to true
.
This class manages the Apache status module which provides information on server activity and performance. Access will only be allowed for any successful match of allow_from_host
or allow_from_ip
-- the client need not match both.
This parameter controls the location used to access the server status page. Defaults to '/server-status'
.
An array of hostnames which to be allowed access to the server status page. Defaults to []
.
An array of IPs or IP ranges in CIDR format to be allowed access to the server status page. Defaults to ['127.0.0.1', '::1']
.
This class manages the Apache web server to provide Web Server Gateway Interface support.
An array of package names needed for WSGI support. The default should be correct for supported platforms.
This class manages packages needed for a minimal installation.
An array of package names needed for a minimal installation. The default should be correct for supported platforms.
This class manages the service itself.
The service name of the httpd daemon. The default should be correct for supported platforms.
Instance is to be started at boot. Either true
(default) or false
.
Instance is to be 'running'
(default) or 'stopped'
. Alternatively, a Boolean value may also be used with true
equivalent to 'running'
and false
equivalent to 'stopped'
.
This defined type manages a miscellaneous file for the web server. These will land in /etc/httpd/${filename}
.
An arbitrary identifier for the file instance unless the filename parameter is not set in which case this must provide the value normally set with the filename parameter.
Literal content for the file. If neither content nor source is given, the content of the file will be left unmanaged.
Instance is to be 'present'
(default) or 'absent'
. Alternatively, a Boolean value may also be used with true
equivalent to 'present'
and false
equivalent to 'absent'
.
Name to be given to the file, without any path details. This may be used in place of namevar if it's beneficial to give namevar an arbitrary value.
File group account. Defaults to 'apache'
which is appropriate for most files.
File access mode. Defaults to '0640'
which is appropriate for most files.
File owner account. Defaults to 'root'
which is appropriate for most files.
URI of the file content. If neither content nor source is given, the content of the file will be left unmanaged.
This defined type manages a module configuration file for the web server. These will land in /etc/httpd/conf.modules.d/${filename}.conf
.
An arbitrary identifier for the file instance unless the filename parameter is not set in which case this must provide the value normally set with the filename parameter.
Literal content for the file. If neither content nor source is given, the content of the file will be left unmanaged.
Instance is to be 'present'
(default) or 'absent'
. Alternatively, a Boolean value may also be used with true
equivalent to 'present'
and false
equivalent to 'absent'
.
Name to be given to the file, without any path details nor a .conf
suffix. This may be used in place of namevar if it's beneficial to give namevar an arbitrary value.
File group account. Defaults to 'apache'
which is appropriate for most files.
File access mode. Defaults to '0640'
which is appropriate for most files.
File owner account. Defaults to 'root'
which is appropriate for most files.
URI of the file content. If neither content nor source is given, the content of the file will be left unmanaged.
This defined type manages a site-specific configuration file for the web server. These will land in /etc/httpd/conf.d/${filename}.conf
.
An arbitrary identifier for the file instance unless the filename parameter is not set in which case this must provide the value normally set with the filename parameter.
Literal content for the file. If neither content nor source is given, the content of the file will be left unmanaged.
Instance is to be 'present'
(default) or 'absent'
. Alternatively, a Boolean value may also be used with true
equivalent to 'present'
and false
equivalent to 'absent'
.
Name to be given to the file, without any path details nor a .conf
suffix. This may be used in place of namevar if it's beneficial to give namevar an arbitrary value.
File group account. Defaults to 'apache'
which is appropriate for most files.
File access mode. Defaults to '0640'
which is appropriate for most files.
File owner account. Defaults to 'root'
which is appropriate for most files.
URI of the file content. If neither content nor source is given, the content of the file will be left unmanaged.
Matches acceptable values for Apache's various log levels. Valid values are: 'debug'
, 'info'
, 'notice'
, 'warn'
, 'error'
, 'crit'
, 'alert'
, 'emerg'
.
Tested on modern Fedora and CentOS releases, but likely to work on any Red Hat variant. Adaptations for other operating systems should be trivial as this module follows the data-in-module paradigm. See data/common.yaml
for the most likely obstructions. If "one size can't fit all", the value should be moved from data/common.yaml
to data/os/%{facts.os.name}.yaml
instead. See hiera.yaml
for how this is handled.
This should be compatible with Puppet 3.x and is being used with Puppet 4.x as well.
Contributions are welcome via pull requests. All code should generally be compliant with puppet-lint.