Skip to content

Commit

Permalink
Merge pull request #443 from ptomulik/server_root
Browse files Browse the repository at this point in the history
added $server_root parameter
  • Loading branch information
Ashley Penney committed Nov 8, 2013
2 parents 356e14b + 45779d2 commit 02e795f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,10 @@ Sets the servername. Defaults to fqdn provided by facter.

Makes Apache use the Linux kernel 'sendfile' to serve static files. Defaults to 'On'.

#####`server_root`

A value to be set as `ServerRoot` in main configuration file (`httpd.conf`). Defaults to `/etc/httpd` on RedHat and `/etc/apache2` on Debian.

#####`error_documents`

Enables custom error documents. Defaults to 'false'.
Expand Down
Binary file added manifests/.params.pp.swp
Binary file not shown.
2 changes: 2 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
$error_documents = false,
$timeout = '120',
$httpd_dir = $apache::params::httpd_dir,
$server_root = $apache::params::server_root,
$confd_dir = $apache::params::confd_dir,
$vhost_dir = $apache::params::vhost_dir,
$vhost_enable_dir = $apache::params::vhost_enable_dir,
Expand Down Expand Up @@ -235,6 +236,7 @@
# - $apxs_workaround
# - $keepalive
# - $keepalive_timeout
# - $server_root
file { "${apache::params::conf_dir}/${apache::params::conf_file}":
ensure => file,
content => template($conf_template),
Expand Down
2 changes: 2 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
$apache_name = 'httpd'
$service_name = 'httpd'
$httpd_dir = '/etc/httpd'
$server_root = '/etc/httpd'
$conf_dir = "${httpd_dir}/conf"
$confd_dir = "${httpd_dir}/conf.d"
$mod_dir = "${httpd_dir}/conf.d"
Expand Down Expand Up @@ -93,6 +94,7 @@
$apache_name = 'apache2'
$service_name = 'apache2'
$httpd_dir = '/etc/apache2'
$server_root = '/etc/apache2'
$conf_dir = $httpd_dir
$confd_dir = "${httpd_dir}/conf.d"
$mod_dir = "${httpd_dir}/mods-available"
Expand Down
2 changes: 1 addition & 1 deletion templates/httpd.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ServerSignature <%= @server_signature %>
TraceEnable Off

ServerName "<%= @servername %>"
ServerRoot "<%= @httpd_dir %>"
ServerRoot "<%= @server_root %>"
PidFile <%= @pidfile %>
Timeout <%= @timeout %>
KeepAlive <%= @keepalive %>
Expand Down

0 comments on commit 02e795f

Please sign in to comment.