doubo6658 2016-11-29 15:25
浏览 98

在Localhost下安装Yii2 Starter Kit

I am a complete newbie at Yii2 Frameworks and I have been recommended to install the Yii2 Starter Kit to get a web framework up fast (see https://github.com/trntv/yii2-starter-kit).

I am trying to install the kit in a local development environment with PHPStorm and the in-built web-server. I have followed all the (applicable) instructions in the setup guide here:

https://github.com/trntv/yii2-starter-kit/blob/master/docs/installation.md#important-notes

After installation, I can't seem to browse any of my localhost urls (http://):

localhost:63342/yii-starter-kit

localhost:63342/yii-starter-kit/backend

localhost:63342/yii-starter-kit/frontend

Nor if my PHPStorm startup folder is set to the "yii-startup-kit" project folder:

localhost:63342/

I seem to be left with an installation that has no index.php in the root project folder, nor in backend or frontend folders so hence when I browse anywhere I get a "The requested resource was not found on this server" error. Could someone tell me what I am missing? Is it a requirement to run under Vagrant/Docker (VMs?).

Thank you.

P.S. I have also seen this question: Error deploying yii2-starter-kit Yii2 installation, however from what I can see, the Yii Starter kit now works in a single domain mode.

  • 写回答

1条回答 默认 最新

  • dsfgds4215 2016-11-29 21:43
    关注

    It appears that (for some reason) Yii2-starter-kit is designed to "rewrite" all the backend and frontend URLs. This implies that PHP's simple in-built server can't handle the task (without doing quite a bit of fiddling to implement a PHP-based rewrite rule).

    In the end, installing Apache was the only solution to get the framework to work. This requires implementing the "virtual host" configuration mentioned in the Installation Guide.

    评论

报告相同问题?

悬赏问题

  • ¥15 一道python难题2
  • ¥15 一道python难题
  • ¥15 用matlab 设计一个不动点迭代法求解非线性方程组的代码
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
  • ¥15 教务系统账号被盗号如何追溯设备