/var/www/html/public/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration code example
Example: Invalid command 'RewriteEngine'
a2enmod rewrite
systemctl restart apache2
a2enmod rewrite
systemctl restart apache2