@@ -135,19 +135,23 @@ chmod 751 $HESTIA/data/templates/web/unassigned/js
135135chmod 751 $HESTIA /data/templates/web/unassigned/webfonts
136136
137137# Add unassigned hosts configuration to nginx and apache2
138- if [ -f /usr/local/hestia/data/ips/* ]; then
139- for ip in /usr/local/hestia/data/ips/* ; do
140- ipaddr=${ip##*/ }
141- rm -f /etc/nginx/conf.d/$ip .conf
142- cp -f $HESTIA /install/deb/nginx/unassigned.inc /etc/nginx/conf.d/$ipaddr .conf
143- sed -i ' s/directIP/' $ipaddr ' /g' /etc/nginx/conf.d/$ipaddr .conf
144-
145- rm -f /etc/apache2/conf.d/$ip .conf
146- cp -f $HESTIA /install/deb/apache2/unassigned.conf /etc/apache2/conf.d/$ipaddr .conf
147- sed -i ' s/directIP/' $ipaddr ' /g' /etc/apache2/conf.d/$ipaddr .conf
148- done
138+ if [ " $WEB_BACKEND " = " php-fpm" ]; then
139+ echo " (!) Unassigned hosts configuration for Apache not necessary on PHP-FPM installations."
140+ elif [ " $WEB_BACKEND " = " apache2" ]; then
141+ if [ -f /usr/local/hestia/data/ips/* ]; then
142+ for ip in /usr/local/hestia/data/ips/* ; do
143+ ipaddr=${ip##*/ }
144+ rm -f /etc/nginx/conf.d/$ip .conf
145+ cp -f $HESTIA /install/deb/nginx/unassigned.inc /etc/nginx/conf.d/$ipaddr .conf
146+ sed -i ' s/directIP/' $ipaddr ' /g' /etc/nginx/conf.d/$ipaddr .conf
147+
148+ rm -f /etc/apache2/conf.d/$ip .conf
149+ cp -f $HESTIA /install/deb/apache2/unassigned.conf /etc/apache2/conf.d/$ipaddr .conf
150+ sed -i ' s/directIP/' $ipaddr ' /g' /etc/apache2/conf.d/$ipaddr .conf
151+ done
152+ fi
149153fi
150-
154+
151155# Set Purge to false in roundcube config - https://goo.gl/3Nja3u
152156if [ -f /etc/roundcube/config.inc.php ]; then
153157 sed -i " s/\['flag_for_deletion'] = 'Purge';/\['flag_for_deletion'] = false;/gI" /etc/roundcube/config.inc.php
188192if [ ! -d /usr/local/hestia/web/edit/server/clamav-daemon ]; then
189193 mv /usr/local/hestia/web/edit/server/clamd /usr/local/web/edit/server/clamav-daemon
190194fi
195+
0 commit comments