i got it to work, in index.php:
$pathsPath = realpath('/www/wwwroot/sites/appfolder/Config/Paths.php');
i tend to keep my apps folder below the public_html, or where ever your apps folder is.
apps folder/Config/Path.php:
public $systemDirectory = '/www/wwwroot/system-4.0.4';
public $appDirectory = '/www/wwwroot/sites/appfolder';
public $writableDirectory = '/www/wwwroot/sites/appfolder/writable';
public $testsDirectory = '/www/wwwroot/sites/appfolder/tests';
public $viewDirectory = '/www/wwwroot/sites/appfolder/Views';
with default .htaccess file
my appfolder is named usually the domain name minus the dots too for clarity.