Skip to content

Commit b44fcd8

Browse files
authored
defined secure configs as separate variables
1 parent 60df6ee commit b44fcd8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

bin/v-add-web-domain-httpauth

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ source $VESTA/conf/vesta.conf
2424
# Defining htpasswd file
2525
htaccess="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.$domain.conf_htaccess"
2626
htpasswd="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.$domain.htpasswd"
27+
shtaccess="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.$domain.conf_htaccess"
28+
shtpasswd="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.$domain.htpasswd"
2729
docroot="$HOMEDIR/$user/web/$domain/public_html"
2830

2931

@@ -75,15 +77,15 @@ chgrp $user $htpasswd $htaccess
7577
sed -i "/^$auth_user:/d" $htpasswd
7678
echo "$auth_user:$auth_hash" >> $htpasswd
7779

78-
ln -s "$HOMEDIR/$user/conf/web/$WEB_SYSTEM.$domain.conf_htaccess" "$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.$domain.conf_htaccess"
79-
ln -s "$HOMEDIR/$user/conf/web/$WEB_SYSTEM.$domain.htpasswd" "$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.$domain.htpasswd"
80+
# Symbolic link for secure web templates
81+
ln -s $htpasswd $shtpasswd
82+
ln -s $htaccess $shtaccess
8083

8184
# Restarting web server
8285
if [ "$restart" != 'no' ] && [ "$restart_required" = 'yes' ]; then
8386
$BIN/v-restart-web
8487
fi
8588

86-
8789
#----------------------------------------------------------#
8890
# Vesta #
8991
#----------------------------------------------------------#

0 commit comments

Comments
 (0)