Cookbooks
apache2
documentation
Resource Apache2 Config

apache2_config

Back to resource list

Properties

nameTypeDefaultDescription
root_groupStringnode['root_group']Group that the root user on the box runs as. Defaults to platform specific value from ohai root_group
access_file_nameString.htaccessAccess filename
log_dirStringdefault_log_dirLog directory location. Defaults to platform specific locations, see libraries/helpers.rb
error_logStringdefault_error_logError log location. Defaults to platform specific locations, see libraries/helpers.rb
log_levelStringwarnLog level for apache2
apache_userStringdefault_apache_userSet to override the default apache2 user. Defaults to platform specific locations, see libraries/helpers.rb
apache_groupStringdefault_apache_groupSet to override the default apache2 user. Defaults to platform specific locations, see libraries/helpers.rb
keep_aliveStringOnPersistent connection feature of HTTP/1.1 provide long-lived HTTP sessions
max_keep_alive_requestsInteger100MaxKeepAliveRequests
keep_alive_timeoutInteger5KeepAliveTimeout
docroot_dirStringdefault_docroot_dirApache document root. Defaults to platform specific locations, see libraries/helpers.rb
timeoutInteger, String300The number of seconds before receives and sends time out
server_nameStringlocalhostSets the ServerName directive
run_dirStringdefault_run_dirSets the DefaultRuntimeDir directive. Defaults to platform specific locations, see libraries/helpers.rb'
template_cookbookStringapache2Cookbook to source the template file from

Examples

  apache2_config 'apache2.conf' do
    access_file_name
    log_dir '/var/log/httpd/super_error_log'
    error_log '/var/log/httpd/super_error_log'
    log_level 'error'
    apache_user 'superApacheUser'
    apache_group 'superApacheUser'
    keep_alive 'On'
    max_keep_alive_requests 15
    keep_alive_timeout 100
    docroot_dir '/var/www/serverRootDir'
    timeout 60
    server_name '127.0.0.1'
  end