at var / www / created diary.lc/ at / etc / apache2 / sites-available / created diary.lc.conf with these parameters

<VirtualHost *:80> ServerName diary.lc ServerAlias www.diary.lc DocumentRoot /var/www/diary.lc <Directory /var/www/diary.lc/> Options Indexes FollowSymlinks AllowOverride All Require all granted </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> 

at /var/www/diary.lc uploaded and installed yii2 advanced
there put .htaccess

  Options +FollowSymLinks IndexIgnore */* RewriteEngine on # Если запрос начинается с /admin, то заменяем на /backend/web/ RewriteCond %{REQUEST_URI} ^/admin RewriteRule ^admin\/?(.*) /backend/web/$1 # Если запрос начинается с /api, то заменяем на /rest/web/ RewriteCond %{REQUEST_URI} ^/api RewriteRule ^api\/?(.*) /rest/web/$1 # Добавляем другой запрос /frontend/web/$1 RewriteCond %{REQUEST_URI} !^/(frontend/web|backend/web|rest/web|admin|api) RewriteRule (.*) /frontend/web/$1 # Если frontend запрос RewriteCond %{REQUEST_URI} ^/frontend/web RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} ^/frontend/web RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /frontend/web/index.php # Если api запрос RewriteCond %{REQUEST_URI} ^/rest/web RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /rest/web/index.php # Если backend запрос RewriteCond %{REQUEST_URI} ^/backend/web RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /backend/web/index.php 

in the browser I drive diary.lc the apache2 start page is displayed if I enter diary.lc/frontend/web/ error 404

here are the urlmanager settings

 'urlManager' => [ 'class' => 'yii\web\UrlManager', 'enablePrettyUrl' => true, 'showScriptName' => false, 'rules' => [ 'index' =>'frontend/web/index', '<action>'=> 'site/<action>', ] ], 

here are the logs

 127.0.0.1 - - [24/Mar/2016:15:00:12 +0300] "GET /icons/ubuntu-logo.png HTTP/1.1" 200 3688 "http://diary.lc/" "Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:45.0) Gecko/20100101 Firefox/45.0" 

tell me what the problem

  • “See logs” ™. - aleksandr barakin pm
  • @alexanderbarakin 127.0.0.1 - - [24 / Mar / 2016: 15: 00: 12 +0300] "GET /icons/ubuntu-logo.png HTTP / 1.1" 200 3688 " diary.lc " "Mozilla / 5.0 (X11; Ubuntu; Linux i686; rv: 45.0) Gecko / 20100101 Firefox / 45.0 "here are the logs - Sergalas
  • There is nothing about the 404th error you mention. - aleksandr barakin 1:28 pm
  • @alexanderbarakin here for a 404 error 127.0.0.1 - - [24 / Mar / 2016: 15: 00: 27 +0300] "GET / frontend / web / HTTP / 1.1" 404 500 "-" "Mozilla / 5.0 (X11; Ubuntu ; Linux i686; rv: 45.0) Gecko / 20100101 Firefox / 45.0 " - Sergalas

0