apache virtual host path error

Hi,
i have installed apache by vhosts mode alias enabled, the root directory of my websites are:
/var/www/ext/www.website1/
/var/www/ext/www.website2/
/var/www/ext/www.website3/ ect… ect…

If I use the original path I see a blank page of spreeadsheet, I must specify all path to work correctly…
but is there another way to use correct variable $url?

$url = "http://".$baseurl.str_replace($root, "", $path).'/';^M

protected function get_url() {^M $path = str_replace("\\", "/", pathinfo(__FILE__, PATHINFO_DIRNAME));^M $root = $_SERVER['DOCUMENT_ROOT'];^M $baseurl = $_SERVER['SERVER_NAME'];^M $baseurl .= (strrpos($baseurl, '/') === strlen($baseurl) - 1) ? '' : '/';^M $url = "http://[b]www.website1[/b]/plugins/content/spreadsheet/";^M return $url;^M

Unfortunately there is no way to fix it for now. Setting url manually is the best way.