From a82af5595e1e51961903873b6171bd5e08857d60 Mon Sep 17 00:00:00 2001 From: Alessandro Grassi Date: Tue, 3 Sep 2013 00:12:22 +0200 Subject: [PATCH] Add configuration options for ServerTokens and ServerSignature --- README.md | 9 ++++++++- manifests/init.pp | 2 ++ templates/httpd.conf.erb | 4 ++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3e6a127165..1ae80d11f2 100644 --- a/README.md +++ b/README.md @@ -275,6 +275,14 @@ Changes the location of the directory Apache log files are placed in. Defaut is Changes the name of the file containing Apache ports configuration. Default is `${conf_dir}/ports.conf`. +#####`server_tokens` + +Controls how much information Apache sends to the browser about itself and the operating system. See Apache documentation for 'ServerTokens'. Defaults to 'OS'. + +#####`server_signature` + +Allows the configuration of a trailing footer line under server-generated documents. See Apache documentation for 'ServerSignature'. Defaults to 'On'. + ####Class: `apache::default_mods` Installs default Apache modules based on what OS you are running @@ -525,7 +533,6 @@ Sets the order of processing `Allow` and `Deny` statements as per [Apache core d } ``` - ######`auth_type` Sets the value for `AuthType` as per the [Apache AuthType diff --git a/manifests/init.pp b/manifests/init.pp index da3004c05e..09f4570690 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -43,6 +43,8 @@ $keepalive_timeout = $apache::params::keepalive_timeout, $logroot = $apache::params::logroot, $ports_file = $apache::params::ports_file, + $server_tokens = 'OS', + $server_signature = 'On', ) inherits apache::params { package { 'httpd': diff --git a/templates/httpd.conf.erb b/templates/httpd.conf.erb index 2bfb2734ae..ea0018d722 100644 --- a/templates/httpd.conf.erb +++ b/templates/httpd.conf.erb @@ -1,6 +1,6 @@ # Security -ServerTokens OS -ServerSignature On +ServerTokens <%= @server_tokens %> +ServerSignature <%= @server_signature %> TraceEnable Off ServerName "<%= @servername %>"