M
M
MaikMain2019-09-17 18:57:55
Yii
MaikMain, 2019-09-17 18:57:55

Subdomain issues. Yii2?

Good afternoon, the problem is that I created a site on Yii2. And posted it on site.ru hosting. All is well, works great. But I had to move it to the subdomain sub.site.ru As the administrative panel (sub.site.ru/admin) stopped working. And gives an error: Error (#8) An internal server error has occurred. Dedbug panel shows status 500.
What could be the problem? Tell me please. Thank you very much in advance

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Maxim, 2019-09-17
@MaikMain

1. Switch to DEV mode and turn on debug to understand the error in the index file of the web folder

defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');

2. Set up a subdomain in htaccess

M
MaikMain, 2019-09-17
@MaikMain

Everything turned out to be much easier. It was necessary to configure the template connection from dmstr - adminLTE in the config.
I wrote it like this and everything worked fine:

'components' => [
        'view' => [
            'theme' => [
                'pathMap' => [
                    '@app/views' => '@vendor/dmstr/yii2-adminlte-asset/example-views/yiisoft/yii2-app'
                ],
            ],
        ],
],

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question