为了账号安全,请及时绑定邮箱和手机立即绑定

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

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

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

访问不了

https://img1.sycdn.imooc.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 回答

解决了 忘 记 apache 开启  rewrite 了

开启rewrite功能

    • sudo a2enmod rewrite


0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

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

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信