Yii2后端显示500内部服务器错误

时间:2017-04-13 02:16:39

标签: yii2

当我访问http://alpha.myweb.com/administrator/company时,我获得了500 Internal Server Error

但我可以访问localhost。

我如何调试我的问题?

这是我的backend\config\main.php

<?php
$params = array_merge(
    require(__DIR__ . '/../../common/config/params.php'),
    require(__DIR__ . '/../../common/config/params-local.php'),
    require(__DIR__ . '/params.php'),
    require(__DIR__ . '/params-local.php')
);

return [
    'id' => 'app-backend',
    'basePath' => dirname(__DIR__),
    'controllerNamespace' => 'backend\controllers',
    'bootstrap' => ['log'],
    'modules' => [
        'agent' => [
            'class' => 'backend\modules\agent\Agent',
        ],
        'company' => [
                'class' => 'backend\modules\company\Company',
                'defaultRoute' => 'home',
        ],
        'vendor' => [
                'class' => 'backend\modules\vendor\Vendor',
                        'defaultRoute' => 'default',
        ],
        'services' => [
                        'class' => 'backend\modules\services\Services',
                        'defaultRoute' => 'site',
        ],


    ],

        'homeUrl' => 'http://alpha.myweb.com/administrator',
        'components' => [

        'formatter' => [
                                        'class' => 'yii\i18n\Formatter',


                                 'thousandSeparator' => '.',
                                    'decimalSeparator' => ',',
                                    //'currencyCode' => '$'
                    ],
    'user' => [
        'identityClass' => 'common\models\UserBeo',
        'enableAutoLogin' => false,
        //'authTimeout' => 120
    ],
    'log' => [
        'traceLevel' => YII_DEBUG ? 3 : 0,
        'targets' => [
            [
                'class' => 'yii\log\FileTarget',
                'levels' => ['error', 'warning'],
            ],
        ],
    ],
    'errorHandler' => [
        'errorAction' => 'site/error',
    ],
     'urlManager' => [
             'class' => 'yii\web\UrlManager',
             'enablePrettyUrl' => true,
             'showScriptName' => false,
             'showScriptName' => false,
         /*
            'rules' => array(
            '<controller:\w+>/<id:\d+>' => '<controller>/view',
            '<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',
            '<controller:\w+>/<action:\w+>' => '<controller>/<action>',
    ),

          */
    ],
            'request' => [
            'baseUrl' => '/administrator',

            'parsers' => [
                            'application/json' => 'yii\web\JsonParser',
            ]

            ],
                    /*
                    'response' => [
                                    'format' => yii\web\Response::FORMAT_JSON,
                                    'charset' => 'UTF-8',
                                    // ...
                    ]
                    */
],
'params' => $params,
];

这是我的.htaccess

# prevent directory listings
Options -Indexes
IndexIgnore */*

# follow symbolic links
Options FollowSymlinks
RewriteEngine on
RewriteRule ^administrator(/.+)?$ backend/web/$1 [L,PT]
RewriteRule ^(.+)?$ frontend/web/$1

#RewriteCond %{HTTP_HOST} ^alpha\.myweb\.com [NC]
#RewriteRule ^(.*)$ http://alpha.myweb.com/$1 [L,R=301]

那么是什么导致了这个问题,因为我可以毫无错误地打开前端网站。

如果您需要更多信息,请与我们联系。

提前致谢,感谢任何帮助。

0 个答案:

没有答案
相关问题