we replace the openbasedir to the document root by one on the root of relevant alternc account. Restore the behavior of pre-1.0 version. Now you can go back to the other behavior (1.0 one) by changing the vhost.conf template
This commit is contained in:
parent
c9ca59b969
commit
846a215986
|
@ -3,7 +3,7 @@
|
|||
DocumentRoot "%%document_root%%"
|
||||
|
||||
<Directory "%%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
|
||||
</Directory>
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue