sudo sh -c "chown -R $SCRIPT_USER \"$DIR\"/logs/php.log* \"$DIR\"/logs/wipi.log*"
sudo sh -c "chown -R $HTTPD_USER \"$DIR\"/logs/access.log*"
-# Now, set the error_log setting in php.ini
+# Now, set the error_log setting in php.ini. This ensures each domein will have
+# a separate logfile for errors, since lighttpd only supports a single error
+# log (When error_log is not set, error messages will go to lighttpd's log
+# automatically).
echo Updating `basename $PHP_CONFIG`
-
sudo sed -i "s#^error_log *=.*#error_log = $DIR/$PHP_ERRORLOG#" "$DIR/$PHP_CONFIG"
sudo update-php.ini