Reference to Http://www.linuxidc.com/Linux/2015-02/114116.htm
YII2 Advanced version replication new items will encounter the following error message:
Exception ' yii\base\invalidrouteexception ' with message ' Unable to resolve the request ' site/error '. ' In/users/yuzhiyuan /documents/htdocs/yii-application/vendor/yiisoft/yii2/base/module.php:461
Stack Trace:
#0/users/yuzhiyuan/documents/htdocs/yii-application/vendor/yiisoft/yii2/web/errorhandler.php: yii\base\ Module->runaction (' Site/error ')
#1/users/yuzhiyuan/documents/htdocs/yii-application/vendor/yiisoft/yii2/base/errorhandler.php (): yii\web\ Errorhandler->renderexception (Object (yii\web\notfoundhttpexception))
#2 [Internal function]: yii\base\errorhandler->handleexception (Object (yii\web\notfoundhttpexception))
#3 {main}
Previous Exception:
Exception ' yii\base\invalidrouteexception ' with message ' Unable to resolve the request ' site/index '. ' In/users/yuzhiyuan /documents/htdocs/yii-application/vendor/yiisoft/yii2/base/module.php:461
Stack Trace:
#0/users/yuzhiyuan/documents/htdocs/yii-application/vendor/yiisoft/yii2/web/application.php (yii\base\): Module->runaction (' Site/index ', Array)
#1/users/yuzhiyuan/documents/htdocs/yii-application/vendor/yiisoft/yii2/base/application.php (375): Yii\web\ Application->handlerequest (Object (yii\web\request))
#2/users/yuzhiyuan/documents/htdocs/yii-application/mobile/web/index.php: Yii\base\application->run ()
#3 {main}
Next exception ' yii\web\notfoundhttpexception ' with message ' Page not found. ' In/users/yuzhiyuan/documents/htdocs/ Yii-application/vendor/yiisoft/yii2/web/application.php:95
Stack Trace:
#0/users/yuzhiyuan/documents/htdocs/yii-application/vendor/yiisoft/yii2/base/application.php (375): Yii\web\ Application->handlerequest (Object (yii\web\request))
#1/users/yuzhiyuan/documents/htdocs/yii-application/mobile/web/index.php: Yii\base\application->run ()
#2 {main}
Workaround:
Find common\config\bootstrap.php
Locate the file above and add a new alias:
Yii::setalias (' Application name ', DirName (dirname (__dir__)). '/directory name ');
For example: Yii::setalias (' Mobile ', DirName (dirname (__dir__)). '/mobile ');
YII2 Advanced version replication new project problem Resolution (GO)