403 error when Yii accesses Gii (scaffolding) _ PHP Tutorial

Source: Internet
Author: User
A 403 error occurs when Yii accesses Gii (scaffold. Today, Yiiframeworkv1.1.3 in the VM server is configured, and Gii settings of the test project are displayed. the #403 error page is displayed: Error403Youarenotallowedtoaccessthispage. starting today, we have configured Yii framework v1.1.3 in the virtual machine server, and configured Gii in the test project,

Result #403 error page:
Error 403
You are not allowed to access this page.

At first, I mistakenly thought it was the cause of insufficient file authorization. after modifying the file and folder authorization, it remains the same. Check the wiki on the official website and find that yii is used for security consideration. by default, Gii can only be accessed on the local machine.

To solve this problem, modify the configuration as follows:

'Modules' => array (
'Giii '=> array (
'Class' => 'system. gii. GiiModule ',
'Password' => 'password ',
'Ipfilters '=> array ('10. 0.0.119 '),
),
)

Modify the definition of ipFilters and add the IP address of the worker to the allowed access list, that is

'Ipfilters '=> array ('10. 0.0.119 ')

Finally, you can access Gii normally on the working machine.

Policyii framework v1.1.3, Gii settings of the test project, the #403 Error page is displayed: Error 403 You are not allowed to access this page. start...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.