Apache - Ubuntu - Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration

Материал из Wiki - Iphoster - the best ever hosting and support. 2005 - 2023
Версия от 21:22, 15 октября 2019; Admin iph (обсуждение | вклад) (Новая страница: «=== Apache - Ubuntu - Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration === Ошибки в ap…»)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к:навигация, поиск

Apache - Ubuntu - Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration

Ошибки в apache вида:

Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
Invalid command 'RewriteRule', perhaps misspelled or defined by a module not included in the server configuration

Означает, что не включен модуль для Rewrite правил. Подключить для Ubuntu можно командами:

# a2enmod rewrite
# systemctl restart apache2

Должен появится файл для подгрузки модуля в директории:

# cat /etc/apache2/mods-enabled/rewrite.load
LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so