From ea5946187f5f6b7afc38c3d57004d2ab127fe18d Mon Sep 17 00:00:00 2001 From: Ben Roberts Date: Sun, 23 Nov 2014 23:41:37 +0000 Subject: [PATCH] Fix up paths to install directory --- manifests/config.pp | 10 ++-------- templates/vhost.conf.erb | 12 ++++++------ 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/manifests/config.pp b/manifests/config.pp index 124d791..b630e32 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -43,21 +43,15 @@ class dokuwiki::config ( $superuser = $dokuwiki::superuser, ) { - if $base_path == '' or $base_path =~ /\/$/ { - $base_path_suffix = '' - } else { - $base_path_suffix = '/' - } - file { - "${install_dir}/${base_path}${base_path_suffix}conf/local.php": + "${install_dir}/htdocs/${base_path}conf/local.php": content => template($local_conf_template), owner => 'root', group => 'root', mode => '0444', replace => false; - "${install_dir}/${base_path}${base_path_suffix}conf/local.protected.php": + "${install_dir}/htdocs/${base_path}conf/local.protected.php": content => template($protected_conf_template), owner => 'root', group => 'root', diff --git a/templates/vhost.conf.erb b/templates/vhost.conf.erb index 79b6854..ae84ee5 100644 --- a/templates/vhost.conf.erb +++ b/templates/vhost.conf.erb @@ -1,7 +1,7 @@ ServerName <%= @vhost %> - DocumentRoot <%= @install_dir %>/<%= @base_path %> + DocumentRoot <%= @install_dir %>/htdocs # Permit larger file uploads php_value upload_max_filesize 20M @@ -9,7 +9,7 @@ # for the form metadata php_value post_max_size 24M - /<%= @base_path %><%= @base_path_suffix %>"> + /htdocs<%= @base_path %>"> AllowOverride None Options +FollowSymLinks Order Allow,Deny @@ -24,7 +24,7 @@ <%- end -%> RewriteEngine on - RewriteBase /<%= @base_path %><%= @base_path_suffix %> + RewriteBase /<%= @base_path %> RewriteRule ^_media/(.*) lib/exe/fetch.php?media=$1 [QSA,L] RewriteRule ^_detail/(.*) lib/exe/detail.php?media=$1 [QSA,L] RewriteRule ^_export/([^/]+)/(.*) doku.php?do=export_$1&id=$2 [QSA,L] @@ -36,17 +36,17 @@ # Explicitly deny access to all code and configuration directories - /<%= @base_path %><%= @base_path_suffix %>/inc"> + /htdocs<%= @base_path %>/inc"> Order Deny,Allow Deny from all - /<%= @base_path %><%= @base_path_suffix %>/inc/lang"> + /htdocs<%= @base_path %>/inc/lang"> Order Deny,Allow Deny from all - /<%= @base_path %><%= @base_path_suffix %>/lib/_fla"> + /htdocs<%= @base_path %>/lib/_fla"> ## no access to the fla directory Order allow,deny Deny from all