How to enable Apache mod_rewrite and mod_headers in Ubuntu server?

Posted under » Ubuntu » Apache updated on on 05 April 2020

You have to install it like this.

$ sudo a2enmod rewrite
$ sudo a2enmod headers

The above are necessary for CMS like Drupal etc.

You can enable mod proxy and mod ssl (probably already enabled) this way too.

$ sudo a2enmod proxy

To see the list of apache mods that are enabled

$ apache2ctl -M

This old method might work to

ln -s /etc/apache2/mods-available/proxy.load /etc/apache2/mods-enabled/proxy.load

The Apache config needs to enable writting too.

But don't forget to restart Apache.

web security linux ubuntu python django git Raspberry apache mysql php drupal cake javascript css AWS data