0

I'm using Yii2 advance template and I can access gii tool successfully in my local machine. But when I upload it into real server, there is a message "You are not allowed to access this page." Could you tell me which file should I have to config and could you print screen or paste the whole content of that config file?

Thanks you before hand.

soju
  • 25,111
  • 3
  • 68
  • 70
Chhorn Soro
  • 3,061
  • 8
  • 27
  • 43

1 Answers1

5

You should simply add your IP address in gii config :

'gii' => [
    'class' => 'yii\gii\Module',
    'allowedIPs' => ['127.0.0.1', '::1'] // adjust this to your needs
],

http://www.yiiframework.com/doc-2.0/guide-start-gii.html

EDIT : in advanced app, gii conf is in

  • environments/dev/backend/config/main-local.php
  • environments/dev/frontend/config/main-local.php
soju
  • 25,111
  • 3
  • 68
  • 70