Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gii Return 403 on Docker Container #192

Closed
deshario opened this issue Feb 5, 2019 · 3 comments
Closed

Gii Return 403 on Docker Container #192

deshario opened this issue Feb 5, 2019 · 3 comments

Comments

@deshario
Copy link

deshario commented Feb 5, 2019

After I run yii2 on docker ... i gonna use gii but it seems like not working ... it return
Forbidden (#403) => You are not allowed to access this page. but webapp is working well.

Docker

yii2 docker

Config

gii config

APP

gii error

APP URL : http://localhost:8010/
GII URL : http://localhost:8010/gii

Is there anything that missing from me ...

@machour
Copy link
Member

machour commented Feb 5, 2019

You need to allow your host IP in the configuration file for the gii module.
Since this is a docker setup, it won't be 127.0.0.1 but something else.
<?php var_dump($_SERVER['REMOTE_ADDR']); ?> Should tell you what it is.

@machour machour closed this as completed Feb 5, 2019
@deshario
Copy link
Author

deshario commented Feb 7, 2019

@machour Thanks. REMOTE_ADDR works.

@o251298
Copy link

o251298 commented Aug 25, 2021

Вы лучший)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants