The problem is rasprastranenaya, first climbed a bunch of manuals and tried various options, in the end did not go. Now I am writing. I only delve into linux. put apache2 there I shoved mod_rewrite, created a virtual host (I threw a project on yii2 with openservera there)

<Directory /> AllowOverride All </Directory> 

the following is written in the Apache settings, namely here /etc/apache2/apache2.conf: AccessFileName .htaccess

the virtual host is loading - there are no problems with this, but the .htaccess file does not see the focus. I will note that there are no errors in the syntax of the project itself, as the working project with win OpenServer is taken.

and an additional question apache and apache2, the difference in versions?

tell me what to do with it?

Maybe I did not install any mods?

    2 answers 2

    I solved the problem, maybe someone else will have the same. in these manuals it is written with an error. I'll leave it here.

    in order for the .htaccess file to be visible, in addition to the settings of the virtual host, you need to register the / /etc/apache2/apache2.conf / /etc/apache2/apache2.conf / /etc/apache2/apache2.conf in the Apache /etc/apache2/apache2.conf :

     AccessFileName .htaccess 

    and this:

     <Directory /var/www/> Options Includes Indexes FollowSymLinks AllowOverride All </Directory> 

    Often the rewrite module is turned off (in ubuntu and debian by default). Enable a2enmod rewrite