Browse Source

Undo all changes made to add Apache2 support

Jaap Marcus 5 years ago
parent
commit
d87a95fe0d
2 changed files with 14 additions and 19 deletions
  1. 12 17
      bin/v-add-web-domain-redirect
  2. 2 2
      bin/v-delete-web-domain-redirect

+ 12 - 17
bin/v-add-web-domain-redirect

@@ -54,23 +54,18 @@ if [ "$WEB_SYSTEM" = 'nginx' ] || [ "$PROXY_SYSTEM" = 'nginx' ]; then
     sconf="$HOMEDIR/$user/conf/web/$domain/nginx.ssl.conf_redirect"
     sconf="$HOMEDIR/$user/conf/web/$domain/nginx.ssl.conf_redirect"
 fi
 fi
 # Insert redirect commands
 # Insert redirect commands
-#if [ ! -z "$PROXY_SYSTEM" ] || [ "$WEB_SYSTEM" = 'nginx' ]; then
-#    echo "if (\$host != \"$redirect\") {" > $conf
-#    echo "   return $code \$scheme://$redirect\$request_uri;" >> $conf
-#    echo "}" >> $conf
-#    
-#    if [ ! -e "$sconf" ]; then
-#        ln -s "$conf" "$sconf"
-#    fi
-#else
-   if [ ! -e "$HOMEDIR/$user/web/$domain/public_html/.htaccess" ]; then
-       conf="$HOMEDIR/$user/web/$domain/public_html/.htaccess"
-       echo "redirect $code http://$redirect" > $conf
-   else
-       conf="$HOMEDIR/$user/web/$domain/public_html/.htaccess"
-       echo "redirect $code http://$redirect" >> $conf
-   fi
-#fi
+if [ ! -z "$PROXY_SYSTEM" ] || [ "$WEB_SYSTEM" = 'nginx' ]; then
+    echo "if (\$host != \"$redirect\") {" > $conf
+    echo "   return $code \$scheme://$redirect\$request_uri;" >> $conf
+    echo "}" >> $conf
+    
+    if [ ! -e "$sconf" ]; then
+        ln -s "$conf" "$sconf"
+    fi
+else
+    echo "Non supported please use .htaccess instead" 
+    exit 2;
+fi
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 #                       Hestia                             #
 #                       Hestia                             #

+ 2 - 2
bin/v-delete-web-domain-redirect

@@ -49,8 +49,8 @@ if [ "$WEB_SYSTEM" = 'nginx' ] || [ "$PROXY_SYSTEM" = 'nginx' ]; then
     rm $HOMEDIR/$user/conf/web/$domain/nginx.conf_redirect"
     rm $HOMEDIR/$user/conf/web/$domain/nginx.conf_redirect"
     rm $HOMEDIR/$user/conf/web/$domain/nginx.ssl.conf_redirect"
     rm $HOMEDIR/$user/conf/web/$domain/nginx.ssl.conf_redirect"
 else
 else
-    conf="$HOMEDIR/$user/web/$domain/public_html/.htaccess"
-    echo "redirect $code http://$redirect" >> $conf
+     echo "Non supported please use .htaccess instead" 
+     exit 2;
 fi
 fi
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#