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.

    评论

报告相同问题?

悬赏问题

  • ¥20 求数据集和代码#有偿答复
  • ¥15 关于下拉菜单选项关联的问题
  • ¥20 java-OJ-健康体检
  • ¥15 rs485的上拉下拉,不会对a-b<-200mv有影响吗,就是接受时,对判断逻辑0有影响吗
  • ¥15 使用phpstudy在云服务器上搭建个人网站
  • ¥15 应该如何判断含间隙的曲柄摇杆机构,轴与轴承是否发生了碰撞?
  • ¥15 vue3+express部署到nginx
  • ¥20 搭建pt1000三线制高精度测温电路
  • ¥15 使用Jdk8自带的算法,和Jdk11自带的加密结果会一样吗,不一样的话有什么解决方案,Jdk不能升级的情况
  • ¥15 画两个图 python或R