Answer the question
In order to leave comments, you need to log in
Why can't I open the web yii2 folder in the browser?
Good afternoon.
Started learning yii advanced.
I work in ubuntu.
I use apache2 installed via laradock as a server.
I just installed yii, did not change anything in the files, and when I go along the frontend/web/ path, a message appears that the page was not found.
Could it be an apache issue?
Here are its settings.
And in /etc/hosts also registered 127.0.0.1 elisdn.loc Thanks
in advance for the hint.
Answer the question
In order to leave comments, you need to log in
Most likely, you need to write explicit paths to the web in .htaccess, which should be located at the root of the project, here is an example
Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/(web)
RewriteRule ^assets/(.*)$ /web/assets/$1 [L]
RewriteRule ^favicon.ico$ /web/favicon.ico$1 [L]
RewriteRule ^css/(.*)$ web/css/$1 [L]
RewriteRule ^js/(.*)$ web/js/$1 [L]
RewriteRule ^img/(.*)$ web/img/$1 [L]
RewriteRule ^files/(.*)$ web/files/$1 [L]
RewriteRule ^fonts/(.*)$ web/fonts/$1 [L]
RewriteRule (.*) /web/$1
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /web/index.php
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question