search
Homephp教程php手册Yii 访问 Gii(脚手架)时出现 403 错误

Yii 访问 Gii(脚手架)时出现 403 错误

Jun 13, 2016 am 10:56 AM
giiyiiInsideAppearhourserverofscaffoldvirtual machineaccessConfigurationmistake

    今天配置好了虚拟机服务器内的 Yii framework v1.1.3,测试项目的Gii设置,
 

    结果出现#403错误页面:
    Error 403
    You are not allowed to access this page.

    开始误以为是文件授权不足的原因,修改文件和文件夹授权后,依然如故。查官网上的wiki发现,原来是yii为了安全考虑,默认只允许在本机上访问Gii。

    解决此问题,修改配置如下:

      'modules' => array(
        'gii' => array(
          'class' => 'system.gii.GiiModule',
          'password' => 'password',
          'ipFilters' => array('10.0.0.119'),
        ),
      )

    修改其中的ipFilters定义,把工作机的IP加入允许访问列表中,即

    'ipFilters' => array('10.0.0.119')

    终于可以在工作机上正常访问Gii了。
 

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software