Dominus77 / yii2-advanced-start

Yii2 Start Project Advanced Template

Home Page:https://dominus77.github.io/yii2-advanced-start/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error load bootstrap

kinzinho666 opened this issue · comments

boostrap url worng

php yii serve --port=8888
Document root "C:\xampp\htdocs\sistema1\console/web" does not exist.

so... i use

php yii serve --docroot="backend/web/" --port=8888

Running Ok, but when a load page, assests dont load.

Not Found
The requested resource /admin/assets/5efe5e8b/css/bootstrap.css?v=1599183088 was not found on this server.

if i try without "/admin/' it´s OK
assets/5efe5e8b/css/bootstrap.css?v=1599183088

/*!

Files:
common/config/bootstrap.php

Yii::setAlias('@common', dirname(__DIR__)); Yii::setAlias('@frontend', dirname(dirname(__DIR__)) . '/frontend'); Yii::setAlias('@backend', dirname(dirname(__DIR__)) . '/backend'); Yii::setAlias('@console', dirname(dirname(__DIR__)) . '/console'); Yii::setAlias('@modules', dirname(dirname(__DIR__)) . '/modules'); Yii::setAlias('@api', dirname(dirname(__DIR__)) . '/api'); Yii::setAlias('@upload', dirname(dirname(__DIR__)) . '/frontend/web/');

common/config/params-local.php
return [ 'user.passwordResetTokenExpire' => 3600, 'domainFrontend' => 'http://localhost:8888', 'domainBackend' => 'http://localhost:8888/admin', 'frontendUrl' => 'http://localhost:8888', 'backendUrl' => 'http://localhost:8888/admin' ];

Hello, to run your application this way you need to change the settings in backend/config/main.php
the homeUrl and baseUrl of the component request are the same as in the frontend

'homeUrl' => '/admin',

'homeUrl' => '/',

'baseUrl' => '/admin'

'baseUrl' => ''

It is not recommended to run the application in this way, it is best to install a development environment and run in it, for example XAMPP