Skip to content

Commit d87a95f

Browse files
committed
Undo all changes made to add Apache2 support
1 parent 903df9c commit d87a95f

File tree

2 files changed

+14
-19
lines changed

2 files changed

+14
-19
lines changed

bin/v-add-web-domain-redirect

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -54,23 +54,18 @@ if [ "$WEB_SYSTEM" = 'nginx' ] || [ "$PROXY_SYSTEM" = 'nginx' ]; then
5454
sconf="$HOMEDIR/$user/conf/web/$domain/nginx.ssl.conf_redirect"
5555
fi
5656
# Insert redirect commands
57-
#if [ ! -z "$PROXY_SYSTEM" ] || [ "$WEB_SYSTEM" = 'nginx' ]; then
58-
# echo "if (\$host != \"$redirect\") {" > $conf
59-
# echo " return $code \$scheme://$redirect\$request_uri;" >> $conf
60-
# echo "}" >> $conf
61-
#
62-
# if [ ! -e "$sconf" ]; then
63-
# ln -s "$conf" "$sconf"
64-
# fi
65-
#else
66-
if [ ! -e "$HOMEDIR/$user/web/$domain/public_html/.htaccess" ]; then
67-
conf="$HOMEDIR/$user/web/$domain/public_html/.htaccess"
68-
echo "redirect $code http://$redirect" > $conf
69-
else
70-
conf="$HOMEDIR/$user/web/$domain/public_html/.htaccess"
71-
echo "redirect $code http://$redirect" >> $conf
72-
fi
73-
#fi
57+
if [ ! -z "$PROXY_SYSTEM" ] || [ "$WEB_SYSTEM" = 'nginx' ]; then
58+
echo "if (\$host != \"$redirect\") {" > $conf
59+
echo " return $code \$scheme://$redirect\$request_uri;" >> $conf
60+
echo "}" >> $conf
61+
62+
if [ ! -e "$sconf" ]; then
63+
ln -s "$conf" "$sconf"
64+
fi
65+
else
66+
echo "Non supported please use .htaccess instead"
67+
exit 2;
68+
fi
7469

7570
#----------------------------------------------------------#
7671
# Hestia #

bin/v-delete-web-domain-redirect

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ if [ "$WEB_SYSTEM" = 'nginx' ] || [ "$PROXY_SYSTEM" = 'nginx' ]; then
4949
rm $HOMEDIR/$user/conf/web/$domain/nginx.conf_redirect"
5050
rm $HOMEDIR/$user/conf/web/$domain/nginx.ssl.conf_redirect"
5151
else
52-
conf="$HOMEDIR/$user/web/$domain/public_html/.htaccess"
53-
echo "redirect $code http://$redirect" >> $conf
52+
echo "Non supported please use .htaccess instead"
53+
exit 2;
5454
fi
5555

5656
#----------------------------------------------------------#

0 commit comments

Comments
 (0)