added support for multisite and proxy