diff --git a/etc/alternc/templates/apache2/vhost.conf b/etc/alternc/templates/apache2/vhost.conf index 918fa45b..a656f2f5 100644 --- a/etc/alternc/templates/apache2/vhost.conf +++ b/etc/alternc/templates/apache2/vhost.conf @@ -3,7 +3,7 @@ DocumentRoot "%%document_root%%" - php_admin_value open_basedir "%%document_root%%:/usr/share/php/:/var/alternc/tmp:/tmp" + php_admin_value open_basedir "%%account_root%%:/usr/share/php/:/var/alternc/tmp:/tmp" Options +MultiViews -FollowSymLinks +SymLinksIfOwnerMatch AllowOverride AuthConfig FileInfo Limit Options Indexes diff --git a/src/functions_hosting.sh b/src/functions_hosting.sh index 37bcea00..31cf438f 100644 --- a/src/functions_hosting.sh +++ b/src/functions_hosting.sh @@ -58,6 +58,7 @@ host_create() { local USER=$(get_account_by_domain $FQDN) local user_letter=`print_user_letter "$USER"` local DOCUMENT_ROOT="${HTML_HOME}/${user_letter}/${USER}/$TARGET_DIR" + local ACCOUNT_ROOT="${HTML_HOME}/${user_letter}/${USER}/" local FILE_TARGET="$VHOST_DIR/${user_letter}/$USER/$FQDN.conf" # In case VTYPE don't have the same name as the template file, @@ -86,6 +87,7 @@ host_create() { sed -i \ -e "s#%%fqdn%%#$FQDN#g" \ -e "s#%%document_root%%#$DOCUMENT_ROOT#g" \ + -e "s#%%account_root%%#$ACCOUNT_ROOT#g" \ -e "s#%%redirect%%#$REDIRECT#g" \ $TMP_FILE