如何在远程机器上启用对yii2 gii模块的访问

时间:2018-07-04 13:56:34

标签: yii2

嗨,我想在远程机器上访问yii2 gii,但是我遇到了禁止访问(#403)错误。您不允许访问此页面。我知道这是拒绝访问,因为我可以在本地主机上访问它,但是我尝试将我的ip添加到配置文件下允许的ip列表中,但仍然无法正常工作,这是我的app / config / mail-local.php文件

    if (!YII_ENV_TEST) {
    // configuration adjustments for 'dev' environment
    $config['bootstrap'][] = 'debug';
    $config['modules']['debug'] = [
        'class' => 'yii\debug\Module',
        // uncomment and adjust the following to add your IP if you are not connecting from localhost.
        //'allowedIPs' => ['127.0.0.1', '::1'],
    ];
    $config['bootstrap'][] = 'gii';
    $config['modules']['gii'] = [
        'class' => 'yii\gii\Module',
        // uncomment and adjust the following to add your IP if you are not 
connecting from localhost.
       'allowedIPs' => ['192.168.1.103'],
    ];
}

return $config;

我该如何解决此问题?在此先感谢您的帮助

0 个答案:

没有答案