here is gamer.lc.conf file

<VirtualHost *:80> ServerAdmin webmaster@localhost ServerName gamer.lc ServerAlias www.gamer.lc documentRoot /var/www/gamer.lc <Directory /var/www/gamer.lc > Options Indexes FollowSymlinks AllowOverride All Require all granted </Directory> ErrorLog /var/www/error.log CustomLog /var/www/access.log combined </VirtualHost> sudo a2enmod rewrite 

connected and apache after that is overloaded here htaccess

 Options +FollowSymLinks IndexIgnore */* RewriteEngine on # if request begins with /admin remove admin and ad /backend/web/ RewriteCond %{REQUEST_URI} ^/admin RewriteRule ^admin/?(.*) /backend/web/$1 # other requests add /frontend/web/$1 RewriteCond %{REQUEST_URI} !^/(frontend/web|backend/web|admin) RewriteRule (.*) /frontend/web/$1 # if frontend request RewriteCond %{REQUEST_URI} ^/frontend/web RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /frontend/web/index.php # if backend request RewriteCond %{REQUEST_URI} ^/backend/web RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /backend/web/index.php 

gives 500 error here log

 [Thu Jun 02 10:59:56.290501 2016] [core:alert] [pid 1397] [client 127.0.0.1:43767] /var/www/gamer.lc/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration 

please explain where I am stupid

    1 answer 1

    Apache ambiguously hints that you forgot to enable the module. In this case, mod_rewrite. On SO there is a description of how to do this.

    • you didn’t say anything in my message sudo a2enmod rewrite is connected and apache is overloaded after that - Sergalas
    • then I have three options - 1) the module still does not apache2ctl -M on - apache2ctl -M . 2) the module is turned on, but RewriteEngine is written with an error (for example, through Cyrillic e). 3) module from another apache / no access. - KoVadim
    • it turns out that the Apache did not reboot helped restart the computer thanks a lot - Sergalas