403 error when Yii accesses Gii (scaffolding)

Source: Internet
Author: User
Tags yii
This article provides information on the 403 wrong solutions for Yii's access to the GII (scaffolding), and the required friends can refer to the following

Today configured the server (Win Server + UPUPW (nginx+mysql)) within the YII Framework 2, test the project's GII settings, the results appear
#403错误页面:

Error 403
You is not a allowed to access the this page.

1, adjust the file read and write permission, through the domain name access (external network access, local access), still 403 error.
2, then the server local access (HTTP://LOCALHOST/BACKEND/WEB/INDEX.PHP?R=GII) still error 403.
3, in accordance with common online solutions (query native ip:188.33.66.88), modify backend/config/main-local.php Add Access address:

$config [' Modules '] [' gii '] = [
' Class ' = ' Yii\gii\module ',
' Allowedips ' = [' 127.0.0.1 ', ':: 1 ', ' 188.33.66.88 '],
];

Still did not solve, still 403 error.

Because the local use of Nginx virtual host, directly bound domain name access, so directly migrated to the server locally, bound 127.0.0.1 and localhost, and then again local access Http://localhost/backend/web/index.php?r =gii, the GII management interface appears.

Related Article

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.