E
E
Evgeny Pavlenko2016-05-30 13:51:15
Yii
Evgeny Pavlenko, 2016-05-30 13:51:15

Yii2 Advanced on hosting - how to run gii?

Yii2 Advanced installed on linux hosting, how to run gii? The problem is that I tried to insert the following code into the config:
'modules' => [
'bootstrap' => ['gii','debug'],
'gii' => [
'class' => \yii\gii\ Module::className(),
'allowedIPs' => ['Your IP']
],
'debug' => \yii\debug\Module::className(),
// ..........
] ,
But an error 404 comes out. If I understand correctly, then it needs to be written in the main-local.php file, yes?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Pantyukhov, 2016-05-30
@Paromon

I'm a beginner myself. I have the following in my main-local.php file:

$config['bootstrap'][] = 'debug';
$config['modules']['debug'] = 'yii\debug\Module';

$config['bootstrap'][] = 'gii';
$config['modules']['gii'] = [
    'class' => 'yii\gii\Module',
    'allowedIPs' => ['Ваш IP']

Try it will help.

E
Evgeny Bukharev, 2016-05-30
@evgenybuckharev

'allowedIPs' => ['Your IP'] At first, it's better to remove it, since you may have a dynamic ip and access is blocked because of it, also check the UrlManager for rules for gii, it is possible that you do not get to the gii module entering the path to it in the browser

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question