yii2 用apache時(shí),訪問不了 http://yii.mc.test:8888/site/test ,
yii2 用apache時(shí),.htaccess 加里,可以訪問 http://yii.mc.test:8888?,
但?http://yii.mc.test:8888/site/test 就出現(xiàn)下面圖
訪問不了
補(bǔ)充:
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'
這跟我以前配置過有關(guān)么?我前后配置對(duì)照
? ? ? 域名 ? ? ? ? ? ? ? ?路徑 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?config.vm.box
前?yii.imooc.test ??~/Desktop/imooc/imooc/yii2 ? ??ubuntu/trusty64
后?yii.mc.test? ? ??~/Desktop/mc/imooc/yii2 ? ? ? ??mc
2018-05-01
解決了 忘 記 apache 開啟 ?rewrite 了
開啟rewrite功能
sudo a2enmod rewrite