diff --git a/manifests/resource/location.pp b/manifests/resource/location.pp index 4af9fd3cb..c57de66e7 100644 --- a/manifests/resource/location.pp +++ b/manifests/resource/location.pp @@ -407,8 +407,12 @@ $config_file = "${server_dir}/${server_sanitized}.conf" - $location_sanitized_tmp = regsubst($location, '\/', '_', 'G') - $location_sanitized = regsubst($location_sanitized_tmp, '\\\\', '_', 'G') + if !($location =~ /^~/) { + $location_sanitized_tmp = regsubst($location, '\/', '_', 'G') + $location_sanitized = regsubst($location_sanitized_tmp, '\\\\', '_', 'G') + } else { + $location_sanitized = $location_sanitized_tmp + } if $ensure == present and $fastcgi != undef and !defined(File[$fastcgi_params]) { file { $fastcgi_params: