I recently reinstalled the operating system on my computer and thus had to re-install all my applications and development environments.

While I was configuring my web environments I was getting some weird errors when I was trying to access one of my local sites. The error wasn’t really descriptive of the problem, but looking at the error logs I found this:

/home/adrian/www/site.dev/.htaccess Invalid command 'RewriteEngine' perhaps misspelled ...

At first it was a little confusing, because I know that RewriteEngine is a valid command, but then I remembered that it is included by the mod-rewrite module that doesn’t come by default with apache. Installing it on Ubuntu is very easy, you just need to input this command on a terminal:

sudo a2enmod rewrite

And you will need to restart apache for the changes to take effect:

sudo /etc/init.d/apache2 restart

Now RewriteEngine is a recognized command for your .htaccess files.

[ apache  linux  ]
Socket Statistics with ss
Making your local server accessible from anywhere
PHP Warning: date(): It is not safe to rely on the system's timezone settings
sudo: unable to resolve host
Local Apache and OpenSSL configuration