|
|
@@ -1072,6 +1072,17 @@ if [ "$nginx" = 'yes' ]; then
|
|
|
service php$fpm_v-fpm start >> $LOG
|
|
|
check_result $? "php$fpm_v-fpm start failed"
|
|
|
fi
|
|
|
+
|
|
|
+ # Redirect unassigned hosts to default "Success" page
|
|
|
+ if [ -f /usr/local/hestia/data/ips/* ]; then
|
|
|
+ for ip in /usr/local/hestia/data/ips/*; do
|
|
|
+ ipaddr=${ip##*/}
|
|
|
+ rm -f /etc/nginx/conf.d/$ip.conf
|
|
|
+ cp -f $HESTIA/install/deb/nginx/unassigned.inc /etc/nginx/conf.d/$ipaddr.conf
|
|
|
+ sed -i 's/directIP/'$ipaddr'/g' /etc/nginx/conf.d/$ipaddr.conf
|
|
|
+ done
|
|
|
+ fi
|
|
|
+
|
|
|
update-rc.d nginx defaults > /dev/null 2>&1
|
|
|
service nginx start >> $LOG
|
|
|
check_result $? "nginx start failed"
|
|
|
@@ -1118,6 +1129,17 @@ if [ "$apache" = 'yes' ]; then
|
|
|
sed -i 's/#//g' $HESTIA/data/templates/web/apache2/*.stpl
|
|
|
fi
|
|
|
fi
|
|
|
+
|
|
|
+ # Add unassigned hosts configuration to apache2
|
|
|
+ if [ -f /usr/local/hestia/data/ips/* ]; then
|
|
|
+ for ip in /usr/local/hestia/data/ips/*; do
|
|
|
+ ipaddr=${ip##*/}
|
|
|
+ rm -f /etc/apache2/conf.d/$ip.conf
|
|
|
+ cp -f $HESTIA/install/deb/apache2/unassigned.conf /etc/apache2/conf.d/$ipaddr.conf
|
|
|
+ sed -i 's/directIP/'$ipaddr'/g' /etc/apache2/conf.d/$ipaddr.conf
|
|
|
+ done
|
|
|
+ fi
|
|
|
+
|
|
|
update-rc.d apache2 defaults > /dev/null 2>&1
|
|
|
service apache2 start >> $LOG
|
|
|
check_result $? "apache2 start failed"
|