V
V
Vanookay2020-05-26 16:46:22
Yii
Vanookay, 2020-05-26 16:46:22

How to enter the admin panel?

Hello, I need help.
I work with Yii2, docker, apache2
I have two folders in the root: public_html and core.
Public_html contains an index file, folders with styles and js scripts.
Also in this folder is the admin folder, it contains its own index file.
The essence of the problem: when working in OpenServer, when entering site / admin, the admin panel opens successfully, when deploying the docker when entering site / admin, the following picture:
5ecd1d0ec9531769487396.png
.htaccess in both folders looks like this:

RewriteEngine On

RedirectMatch 404 /\.git
RedirectMatch 404 /composer
RedirectMatch 404 /.bowerrc

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . index.php

What to do to make it work, even the styles are not loaded, in the apache2 config it is set that DocumentRoot /var/www/html/public_html

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vanookay, 2020-05-26
@Vanookay

God, all I had to do was add to the /backend/config/main.php file:

'components' => [
        'request' => [
            'baseUrl' => '/admin',
        ],

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question