mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 13:01:52 -07:00
defined secure configs as separate variables
This commit is contained in:
parent
60df6eea56
commit
b44fcd8929
1 changed files with 5 additions and 3 deletions
|
@ -24,6 +24,8 @@ source $VESTA/conf/vesta.conf
|
||||||
# Defining htpasswd file
|
# Defining htpasswd file
|
||||||
htaccess="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.$domain.conf_htaccess"
|
htaccess="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.$domain.conf_htaccess"
|
||||||
htpasswd="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.$domain.htpasswd"
|
htpasswd="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.$domain.htpasswd"
|
||||||
|
shtaccess="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.$domain.conf_htaccess"
|
||||||
|
shtpasswd="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.$domain.htpasswd"
|
||||||
docroot="$HOMEDIR/$user/web/$domain/public_html"
|
docroot="$HOMEDIR/$user/web/$domain/public_html"
|
||||||
|
|
||||||
|
|
||||||
|
@ -75,15 +77,15 @@ chgrp $user $htpasswd $htaccess
|
||||||
sed -i "/^$auth_user:/d" $htpasswd
|
sed -i "/^$auth_user:/d" $htpasswd
|
||||||
echo "$auth_user:$auth_hash" >> $htpasswd
|
echo "$auth_user:$auth_hash" >> $htpasswd
|
||||||
|
|
||||||
ln -s "$HOMEDIR/$user/conf/web/$WEB_SYSTEM.$domain.conf_htaccess" "$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.$domain.conf_htaccess"
|
# Symbolic link for secure web templates
|
||||||
ln -s "$HOMEDIR/$user/conf/web/$WEB_SYSTEM.$domain.htpasswd" "$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.$domain.htpasswd"
|
ln -s $htpasswd $shtpasswd
|
||||||
|
ln -s $htaccess $shtaccess
|
||||||
|
|
||||||
# Restarting web server
|
# Restarting web server
|
||||||
if [ "$restart" != 'no' ] && [ "$restart_required" = 'yes' ]; then
|
if [ "$restart" != 'no' ] && [ "$restart_required" = 'yes' ]; then
|
||||||
$BIN/v-restart-web
|
$BIN/v-restart-web
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
# Vesta #
|
# Vesta #
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue