Yii 2,无法从远程位置访问gii

时间:2019-12-05 14:34:34

标签: yii2

好吧,我正在尝试从远程位置访问yii,我已将yii配置为允许我的IP,但我仍然收到403错误,但不允许访问此页面,以下是我的配置文件

main.php
'modules' => [
        'debug' => [
            'class' => 'yii\debug\Module',
            ],
        'gii' => [
            'class' => 'yii\gii\Module',
            'allowedIPs' =>  ['127.0.0.1', '::1', '192.168.*', '37.113.136.121'] // adjust this to your needs
            ]
      ], 

main-local.php


if (!YII_ENV_TEST) {
    // configuration adjustments for 'dev' environment
    $config['bootstrap'][] = 'debug';
    $config['modules']['debug'] = [
        'class' => 'yii\debug\Module',
    ];

    $config['bootstrap'][] = 'gii';
    $config['modules']['gii'] = [
        'class' => 'yii\gii\Module',
        'allowedIPs' => ['127.0.0.1', '::1', '192.168.*', '37.113.136.121'] // adjust this to your needs
    ];
}

我阅读了很多有关此问题的文章,有人说我需要将gii添加到我的main.php文件中,还需要添加allowedIps,所以我添加了它,但是没有用,我仍然没有删除它工作。我在做什么错了?

0 个答案:

没有答案