yii2 用apache时,访问不了 http://yii.mc.test:8888/site/test ,

来源:-

qq_清心_3

2018-04-30 23:06

yii2 用apache时,.htaccess 加里,可以访问 http://yii.mc.test:8888 ,

但 http://yii.mc.test:8888/site/test 就出现下面图

访问不了

https://img2.mukewang.com/5ae730a600010b6506600264.jpg

补充:

vagrant@vagrant-ubuntu-trusty:/var/log/apache2$ tail -f error.log 

[Mon Apr 30 14:12:25.393716 2018] [core:notice] [pid 5233] AH00094: Command line: '/usr/sbin/apache2'

[Mon Apr 30 14:44:26.094988 2018] [mpm_prefork:notice] [pid 5233] AH00169: caught SIGTERM, shutting down

[Mon Apr 30 14:44:27.155596 2018] [mpm_prefork:notice] [pid 5357] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.24 configured -- resuming normal operations

[Mon Apr 30 14:44:27.155665 2018] [core:notice] [pid 5357] AH00094: Command line: '/usr/sbin/apache2'

[Mon Apr 30 14:59:13.374324 2018] [mpm_prefork:notice] [pid 5357] AH00169: caught SIGTERM, shutting down

[Mon Apr 30 14:59:14.432292 2018] [mpm_prefork:notice] [pid 5441] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.24 configured -- resuming normal operations

[Mon Apr 30 14:59:14.432371 2018] [core:notice] [pid 5441] AH00094: Command line: '/usr/sbin/apache2'

[Mon Apr 30 23:40:19.105968 2018] [mpm_prefork:notice] [pid 5441] AH00169: caught SIGTERM, shutting down

[Tue May 01 00:10:20.847926 2018] [mpm_prefork:notice] [pid 1033] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.24 configured -- resuming normal operations

[Tue May 01 00:10:20.849862 2018] [core:notice] [pid 1033] AH00094: Command line: '/usr/sbin/apache2'


这跟我以前配置过有关么?我前后配置对照

      域名                路径                                        config.vm.box

前 yii.imooc.test   ~/Desktop/imooc/imooc/yii2     ubuntu/trusty64


后 yii.mc.test      ~/Desktop/mc/imooc/yii2         mc





写回答 关注

1回答

  • qq_清心_3
    2018-05-01 15:26:49

    解决了 忘 记 apache 开启  rewrite 了

    开启rewrite功能

      • sudo a2enmod rewrite


vagrant打造跨平台可移动的开发环境

Vgarant是开发者必备利器之一,本课程主要分为理论和实践两部分

13889 学习 · 117 问题

查看课程

相似问题