今天配置好了服务器(win server + upupw(nginx+mysql))内的 Yii framework 2,测试项目的Gii设置,结果出现
#403错误页面:
Error 403
You are not allowed to access this page.
1、调整了文件的读写权限,通过域名访问(外网访问、本地访问),仍然403报错。
2、 然后在服务器本地访问(http://localhost/backend/web/index.php?r=gii) 仍报错403。
3
Apache 从2.2升级到 Apache2.4.x 后配置文件 httpd.conf 的设置方法有了大变化,以前是将 deny from all 全部改成 Allow from all 实现外网访问,现在是将 Require all denied 以及 Require local 都该为 Require all granted 就可以了。
.htaccess 如果不起作用将 LoadModule rewrite_module modules/mod_rewrite.so 前面的注释(#)去掉就