Linux: Activate Apache2 .htaccess files

Activate .htaccess files in Linux, Ubuntu.

At the weekend I installed Nextcloud on my new server again. When I checked the system, I was told that the data directories were accessible because the .htaccess files were not being respected.

A freshly installed Apache web server does not have any .htaccess files activated at first, this has to be done in the configuration file.

To do this, we edit the “apache2.conf” in the “/etc/apache2” directory:

sudo vim /etc/apache2/apache2.conf

Here we now scroll to the “Directory” entry for our web directory and set the value for “AllowOverride” to “All”. We then restart Apache.

Leave a Reply

Your email address will not be published. Required fields are marked *