From fcc4d43f46ee2a0d835b7bbf1ba90387eabf3719 Mon Sep 17 00:00:00 2001 From: abednarik Date: Wed, 28 Oct 2015 12:10:47 -0300 Subject: [PATCH] (MODULES-2651) Default document root update for Ubuntu 14.04 and Debian 8 For security reasons Debian changes default docroot to /var/www/html. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=730372 --- README.md | 2 +- manifests/params.pp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8abaa5819..5089cfc94 100644 --- a/README.md +++ b/README.md @@ -907,7 +907,7 @@ class { 'apache': Sets the default [`DocumentRoot`][] location. Default: Determined by your operating system. -- **Debian**: `/var/www` +- **Debian**: `/var/www/html` - **FreeBSD**: `/usr/local/www/apache22/data` - **Gentoo**: `/var/www/localhost/htdocs` - **Red Hat**: `/var/www/html` diff --git a/manifests/params.pp b/manifests/params.pp index a2ab7382c..36d2815fa 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -223,7 +223,11 @@ $fastcgi_lib_path = '/var/lib/apache2/fastcgi' $mime_support_package = 'mime-support' $mime_types_config = '/etc/mime.types' - $docroot = '/var/www' + if ($::operatingsystem == 'Ubuntu' and versioncmp($::operatingsystemrelease, '13.10') >= 0) or ($::operatingsystem == 'Debian' and versioncmp($::operatingsystemrelease, '8') >= 0) { + $docroot = '/var/www/html' + } else { + $docroot = '/var/www' + } $cas_cookie_path = '/var/cache/apache2/mod_auth_cas/' $mellon_lock_file = undef $mellon_cache_size = undef