Made app compatible with vhosts.