What I did was System > Server Config > and after selecting server, on the Web tab, I changed website basedir, path and symlinks (in each line I replaced /var/www with a different path). Naturally after this change the web interface was not loaded with "unable to connect".
Not much later I realized this was completely unnecessary as I can achieve my goal much easier by loading /var/www with "mount --bind" in the desired directory (the one I changed the path to earlier). But after doing this, the "unable to connect" message remained. The I've also tried to copy the contents (with working symlink in the case of the ispconfig folder) but had still no success.
I solved the problem by reinstalling ispconfig, but the question still remains: after a failed basedir/path/symlink change, is there a way to reset this setting in the database or in a config file?