main.php
1.06 KB
<?php
return [
'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
'components' => [
'cache' => [
'class' => 'yii\caching\FileCache',
'keyPrefix' => 'yoho-live',
],
'redis' => [
'class' => 'yii\redis\Connection',
'hostname' => '123.56.138.21',
'password' => 'yohoglobal',
'port' => 6379,
'database' => 0,
],
'pageCache' => [
'class' => 'soa\components\pagecache\Redis',
'redis' => 'redis',
],
'db' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=yii2advanced',
'username' => 'root',
'password' => '',
'charset' => 'utf8',
],
'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
'rules' => [
//'<controller:\w+>/<action:\w+>/<id:[\d-]+>' => '<controller>/<action>',
],
],
],
'defaultRoute'=>'index/index',
];