1

I am using homestead as my dev environment for my yii2 tutorial and my problem is I cannot configure the lines below to access gii in http://hostname/index.php?r=gii

    'gii' => [
    'class' => 'yii\gii\Module',
    'allowedIPs' => ['127.0.0.1', '::1', '192.168.0.*', '192.168.178.20'] 
],

1 Answers1

0

I have Gii working with this config in conf/web.php

if (YII_ENV_DEV) {
    // configuration adjustments for 'dev' environment

    $config['bootstrap'][] = 'gii';
    $config['modules']['gii'] = [
        'class' => 'yii\gii\Module',
        'allowedIPs' => ['192.168.56.1'],
    ];
}

Using Yii 2.0.4

Look for YII_ENV_DEV in the web.php file

Forgot to mention. If you're using Vagrant, I can share my bootstrap.sh file which creates a Yii2 enviroment from Ubuntu Precise. Not homestead needed at all. Just drop me a note if you need it.

Aldo Bassanini
  • 475
  • 4
  • 16
  • hey! thanks! I already found the answer. 'allowedIPs' => ['192.168.10.*'], because my ip in my .yaml file is 192.168.10.10 – Noel Pastrana Aug 04 '15 at 00:19