Yii2 basic problem in deploying in freehost

Hi, I have problem in deploying the basic yii2 template in my freehost.

my problem is that this path

home/myapps/public_html

is appending to the url

http://myapps.x10host.com/home/myapps/public_html/site/index

how can I make it to remove the extra path,I want only my url looks like this

http://myapps.x10host.com/site/index

Thank you in advance.

This is the logic for how the base url is worked out:

$baseUrl = $this->showScriptName || !$this->enablePrettyUrl ? $this->getScriptUrl() : $this->getBaseUrl();

If you check your config for these values you can work out what is happening but anyway…

…you can set baseUrl as a property of urlManager in your config which should override anything that is incorrect: http://www.yiiframework.com/doc-2.0/yii-web-urlmanager.html#$baseUrl-detail